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
| Argument | In | Type | Required | Description |
|---|---|---|---|---|
filename | body | string | required | Name of the file to upload |
mime_type | body | string | required | MIME type of the file |
custom_metadata | body | object | optional | Optional 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
| Status | When |
|---|---|
404 | Not found |
422 | Validation Error |