Knowledge base
Upload file to knowledge base
Upload a PDF file. The file content must be Base64 encoded.
POST /knowledge_base /create
Bearersession
Body
3 fields
·
Reseller keys only: act as one of your clients by its user id. Omit it to act on your own account. [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).
Base64-encoded file content.
Filename including the .pdf extension.
curl -X POST 'https://omnidim.io/api/v1/knowledge_base/create' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "user_id": 1234, "filename": "sample.pdf" }'
Example response
{ "success": true, "message": "File uploaded successfully", "file": { "id": 964, "name": "sample.pdf", "original_filename": "sample.pdf", "file_size": 524288, "mime_type": "application/pdf", "upload_status": "uploaded", "upload_date": "05/08/2026 10:30:00", "user_id": 1234, "user_name": "Demo User", "organization_id": 14 } }
BearerAuthheader
AuthorizationBearer <token>Bearer token authentication. Obtain your API key from the OmniDimension dashboard.
application/jsonuser_id?ClientUserIdReseller keys only: act as one of your clients by its user id. Omit it to act on your own account. How acting for a client works.
file*stringBase64-encoded file content.
filename*stringFilename including the .pdf extension.
Response body
application/jsonUploaded file metadata.
application/jsonsuccess?booleanmessage?stringfile?A file uploaded to the knowledge base.
Was this page helpful?
