Upload a PDF

POSThttps://server.heyrik.com/api/v1/agents/{id}/knowledge

Path parameters

idRequired

Replace {id} in the request URL with the value for this resource.

Headers

AuthorizationstringRequired

Use Bearer $HEYRIK_API_KEY with an account-scoped API key. Keep the key on your server.

Get your API key

Parameters 1

Fields documented for this operation. See the request example for placement and structure.

filemultipart PDFRequired

A PDF document. Send multipart/form-data, not JSON.

Response

Explore the example values. This is not a complete response schema.

dataobject
Explore 4 properties
idstring

Example "kb_71a4"

namestring

Example "pricing-2026.pdf"

typestring

Example "pdf"

charsnumber

Example 18422

Error reference
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

Docs

Build sophisticated voice experiences with HeyRik.

© 2026 HeyRik · Support