Upload a PDF
POST
https://server.heyrik.com/api/v1/agents/{id}/knowledgePath parameters
idRequiredReplace {id} in the request URL with the value for this resource.
Headers
AuthorizationstringRequiredUse Bearer $HEYRIK_API_KEY with an account-scoped API key. Keep the key on your server.
Parameters 1
Fields documented for this operation. See the request example for placement and structure.
filemultipart PDFRequiredA PDF document. Send multipart/form-data, not JSON.
Response
Explore the example values. This is not a complete response schema.
dataobjectExplore 4 properties
idstringExample "kb_71a4"
namestringExample "pricing-2026.pdf"
typestringExample "pdf"
charsnumberExample 18422
POST/agents/{id}/knowledge
cURL
curl -X POST https://server.heyrik.com/api/v1/agents/agc_9f2a1c30/knowledge \
-H "Authorization: Bearer $HEYRIK_API_KEY" \
-F "file=@pricing-2026.pdf"Response example
JSON
{
"data": { "id": "kb_71a4", "name": "pricing-2026.pdf", "type": "pdf", "chars": 18422 }
}Illustrative examples · No live request is sent
