AgentsProcess uploaded agent document

Process uploaded agent document

Queues document extraction, chunking, embedding, and knowledge-base indexing after a document has been uploaded.

curl -X POST "https://api.sendkit.ai/v1/agents/example_string/process-document" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  "fileKey": "example_string",
  "fileUrl": "example_string",
  "fileName": "John Doe",
  "fileType": "pdf",
  "fileSize": 42
}'
{
  "success": true,
  "data": {
    "message": "example_string",
    "document": {
      "fileName": "John Doe",
      "fileKey": "example_string",
      "fileUrl": "example_string",
      "fileType": "pdf",
      "fileSize": 42,
      "uploadedAt": "2024-12-25T10:00:00Z",
      "status": "processing"
    },
    "job": {
      "id": "example_string",
      "type": "example_string"
    }
  }
}
POST
/v1/agents/{agentId}/process-document
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-Api-Key)
X-Api-Keystring
Required

Platform API key (sk_user_...) or Workspace API key (sk_...)

Platform API key (sk_user_...) or Workspace API key (sk_...)
Content-Typestring
Required

The media type of the request body

Options: application/json
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)

Path Parameters

Responses

successboolean
dataobject