Skip to content

knowledge.uploadUrl

A signed URL to upload a document to.

Reference

POST/api/v1/knowledge-base/upload-url

Auth
API key in X-API-Key
Content
application/json
Returns
200 · DocumentUploadResponseSchema

Generate a presigned PUT URL for uploading a document. This endpoint: 1. Generates a unique document UUID for organizing the S3 key 2. Generates a presigned S3/MinIO URL for uploading the file 3. Returns the upload URL and document metadata After uploading to the returned URL, call /process-document to create the document record and trigger processing. Access Control: * All authenticated users can upload documents scoped to their organization.

Arguments

ArgumentInTypeRequiredDescription
filenamebodystringrequiredName of the file to upload
mime_typebodystringrequiredMIME type of the file
custom_metadatabodyobjectoptionalOptional custom metadata

Example request

curl -X POST "https://api.decibyl.ai/api/v1/knowledge-base/upload-url" \
  -H "X-API-Key: dcb_your_key" \
  -H "Content-Type: application/json" \
  -d '{"filename":"string","mime_type":"string","custom_metadata":{}}'

Response

{
  "upload_url": "string",
  "document_uuid": "string",
  "s3_key": "string"
}

Errors

StatusWhen
404Not found
422Validation Error