Use the returned URL, Content-Type, and X-Upload-Token header. The upload capability rechecks the initiating credential; a separate Bearer token is not required. Exact byte size must match. A retry returns the same document; inspect its status until ready or failed.
api.heroui.pro/v1/agents/{agentId}/knowledge/uploads/{uploadId}Send the request to see the live response from the Agents API.
KnowledgeUploadAuthorization Short-lived capability bound to one upload and its initiating credential.
In: header
The Agent targeted by this workspace API key request.
application/octet-stream
TypeScript Definitions
Use the request body type in TypeScript.
binaryapplication/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://api.heroui.pro/v1/agents/string/knowledge/uploads/string" \ -H "X-Upload-Token: string" \ -H "Content-Type: application/octet-stream" \ -d 'string'{
"character_count": 0,
"created_at": "2019-08-24T14:15:22Z",
"error_message": "string",
"file_name": "string",
"file_size_bytes": 0,
"id": "string",
"is_enabled": true,
"last_checked_at": "2019-08-24T14:15:22Z",
"last_synced_at": "2019-08-24T14:15:22Z",
"name": "string",
"next_refresh_at": "2019-08-24T14:15:22Z",
"object": "knowledge_document",
"refresh_error_message": "string",
"refresh_interval_hours": 0,
"refresh_status": "idle",
"source_type": "file",
"source_url": "http://example.com",
"status": "processing",
"updated_at": "2019-08-24T14:15:22Z"
}{
"character_count": 0,
"created_at": "2019-08-24T14:15:22Z",
"error_message": "string",
"file_name": "string",
"file_size_bytes": 0,
"id": "string",
"is_enabled": true,
"last_checked_at": "2019-08-24T14:15:22Z",
"last_synced_at": "2019-08-24T14:15:22Z",
"name": "string",
"next_refresh_at": "2019-08-24T14:15:22Z",
"object": "knowledge_document",
"refresh_error_message": "string",
"refresh_interval_hours": 0,
"refresh_status": "idle",
"source_type": "file",
"source_url": "http://example.com",
"status": "processing",
"updated_at": "2019-08-24T14:15:22Z"
}{
"message": "limit must be an integer between 1 and 100.",
"name": "bad_request"
}{
"message": "The supplied API key is invalid or revoked.",
"name": "unauthorized"
}{
"message": "string",
"name": "bad_request"
}{
"message": "The requested resource was not found.",
"name": "not_found"
}{
"message": "The knowledge document does not have indexed content yet.",
"name": "conflict"
}{
"message": "Files must be 10 MB or smaller.",
"name": "payload_too_large"
}{
"message": "The uploaded file type is not supported.",
"name": "unsupported_media_type"
}{
"message": "Too many requests. Please try again later.",
"name": "rate_limited"
}{
"message": "The API is temporarily unavailable.",
"name": "service_unavailable"
}