v2

latestOpenAPI 3.1.02026-07-2670186350.6 KB
knowledge

Register File Upload

Register a file upload for a knowledge base by its id

Registering a file upload is a three step process:

  1. Get upload URL (GET /v2/knowledge/{knowledge_base_id}/upload_url)
  2. Upload file to the URL
  3. Register file (POST /v2/knowledge/{knowledge_base_id}/register_file)
post/knowledge/{knowledge_base_id}/register_file

Path parameters

knowledge_base_idstring uuid required

The id of the knowledge base to register the file for

The id of the knowledge base to register the file for

Request body

filenamestring required

The filename of the file to register

file_idstring uuid required

The id of the file to register

content_typestring required

The content type of the file to register

metadataobject nullable

Optional metadata to attach to the file

Example request

{
  "filename": "example.pdf",
  "content_type": "application/pdf",
  "metadata": {
    "category": "legal",
    "client": "acme"
  }
}

Response

Successful Response

idstring uuid required
keystring required
original_filenamestring required
document_idinteger required
metadataobject