Skip to main content
POST
/
datasources
/
{datasource_id}
/
content
Python
from meibel import MeibelClient

client = MeibelClient(api_key="your-api-key")

# Upload a file
with open("document.pdf", "rb") as f:
    result = client.datasources.file_uploads.upload_content("datasource_id_value", file=f, filename="document.pdf")
    print(result)
{
  "success": true,
  "message": "<string>",
  "datasource_id": "<string>",
  "upload_id": "<string>",
  "sse_url": "<string>",
  "estimated_files": 123,
  "estimated_size": 123
}

Authorizations

Meibel-API-Key
string
header
required

Path Parameters

datasource_id
string
required

Body

multipart/form-data
files
file[]
required

One or more files to upload

Response

Successful Response

Result of an async upload — files are accepted and streamed asynchronously.

success
boolean
required

True if the upload was accepted for processing

message
string
required

Human-readable status message

datasource_id
string
required

ID of the datasource the files were uploaded to (created on the fly if name was supplied)

upload_id
string
required

Identifier for this upload batch — use with the SSE stream to track progress

sse_url
string
required

Server-sent-events URL to stream upload progress until 'stream_complete'

estimated_files
integer | null

Number of files the server expects to process for this upload

estimated_size
integer | null

Total estimated size of the upload in bytes