Teach Your Assistant — Knowledge
An assistant is only as good as what it knows. The knowledge base is where you give it your facts — your services, prices, opening hours, policies — so it answers with your information instead of improvising. Upload web pages, plain text or files; the platform ingests them in the background and the assistant draws on them in every conversation.
Each app has its own knowledge base. Ingestion is asynchronous:
uploads return a jobId you can poll.
Requires edit_knowledge.
JSON for URLs / text:
Files (PDF, DOCX, etc.) use a two-step JSON flow — no multipart. Ask for a presigned URL, then PUT the file bytes to it:
Response (200):
- URL / text:
{ "jobId": "...", "status": "processing", "estimatedCompletionTime": "...", "contentId": "..." } - File:
{ "uploadUrl": "...", "finalUrl": "...", "jobId": "...", "contentId": "..." }
curl -X POST https://api.everycallhandled.com/api/v1/apps/$APP_ID/knowledge \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{ "type": "url", "content": "https://example.com/help" }'# 1. Request an upload URL (JSON)
curl -X POST https://api.everycallhandled.com/api/v1/apps/$APP_ID/knowledge \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{ "type": "file", "filename": "manual.pdf", "contentType": "application/pdf" }'
# → { "uploadUrl": "https://...", "finalUrl": "https://...", "jobId": "...", "contentId": "..." }
# 2. PUT the file bytes to the returned uploadUrl
curl -X PUT "$UPLOAD_URL" \
-H 'Content-Type: application/pdf' \
--data-binary @./manual.pdfRequires view_knowledge.
Response (200):
{ "items": [ { "contentId": "...", "filename": "...", "fileType": "...", "createdAt": "...", "createdBy": "..." } ] }
curl 'https://api.everycallhandled.com/api/v1/apps/{appId}/knowledge' \
-H 'Authorization: Bearer YOUR_TOKEN'Requires edit_knowledge. Removes the item; the assistant
stops using it shortly afterwards (re-indexing runs in the
background).
curl -X DELETE 'https://api.everycallhandled.com/api/v1/apps/{appId}/knowledge/{contentId}' \
-H 'Authorization: Bearer YOUR_TOKEN'Requires view_knowledge.
Response (200):
Poll every ~3 seconds while processing. Most ingestion
jobs complete within 30 seconds; large PDFs may take a few minutes.
Knowledge takes effect as soon as ingestion completes — it applies to your live assistant immediately, so you can refresh its facts at any time.
curl 'https://api.everycallhandled.com/api/v1/apps/{appId}/knowledge/jobs/{jobId}' \
-H 'Authorization: Bearer YOUR_TOKEN'{
"jobId": "...",
"status": "queued" | "processing" | "completed" | "failed",
"progress": 67,
"documentsProcessed": 12,
"error": null
}