curl --request POST \
--url https://app.famulor.io/api/v1/knowledge-bases/{id}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "FAQ",
"content": "Q: What are your opening hours?\nA: Mon-Fri 9:00-18:00...",
"description": "Answers to common questions"
}
'{
"data": {
"document_id": "44444444-4444-4444-8444-444444444444",
"chunk_count": 12,
"total_chunks": 12,
"truncated": false
}
}Add or retry a document
Add a document using exactly one of content (raw text; name required) or url (file URL, max 20 MB). Alternatively, provide document_id alone to retry an existing document synchronously, without creating or renaming one. For a cloud drive document, retry downloads the current remote version of only that file, even when unchanged, charges normal sync credits, preserves the previous index on failure and never imports or deletes other files. The workspace must retain cloud drive sync access and no sync may already be running. Discovery is bounded to 500 files; a target beyond that listing limit returns 422. Other source types retry their retained file or website; a purged upload without a remote source cannot be retried. Creation returns 201 with the final document, including status error when ingestion fails. Retry returns 200 with processing counts; failures return a non-2xx error with a safe customer message. Required scope: knowledge:write and a workspace role allowed to write (unrestricted keys retain full scope access).
curl --request POST \
--url https://app.famulor.io/api/v1/knowledge-bases/{id}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "FAQ",
"content": "Q: What are your opening hours?\nA: Mon-Fri 9:00-18:00...",
"description": "Answers to common questions"
}
'{
"data": {
"document_id": "44444444-4444-4444-8444-444444444444",
"chunk_count": 12,
"total_chunks": 12,
"truncated": false
}
}Authorizations
API key (fam_..., created under Settings → API Keys) or an OAuth 2.0 access token (fam_at_...). REST operations also require API Access for the credential's workspace. Keys can be restricted to scopes such as assistants:read, calls:write, campaigns:write, automations:read, dashboards:read, dashboards:write, leads:write, segments:write, loop:read, loop:write, phone_numbers:write, sip_trunks:write, knowledge:write, voices:read, billing:read, billing:write, settings:write, platform:read, platform:write; a *:write scope implies the matching *:read. Automation and dashboard endpoints also accept the legacy calls:* scope. Keys without scope restrictions have full access within the workspace's available capabilities.
Path Parameters
Knowledge base ID.
Body
- Option 1
- Option 2
- Option 3
Create a document from exactly one of content or url, or retry an existing document by supplying document_id alone. All operations process synchronously. Creation returns a document (201); retry returns processing counts (200).
Response
The existing document was processed successfully. No new document was created.
Show child attributes
Show child attributes