Knowledge
List knowledge bases and add text or a web page to them with the Callpme API.
List knowledge basesLink to this section
GET/api/v1/knowledge
Common parameters: limit (1 to 100, default 50), cursor, created_after, created_before. See Pagination.
curl "https://callpme.com/api/v1/knowledge" \
-H "Authorization: Bearer $CALLPME_API_KEY"Retrieve a knowledge baseLink to this section
GET/api/v1/knowledge/{id}
Returns the knowledge base and its documents (300 at most, from newest to oldest).
Add a documentLink to this section
POST/api/v1/knowledge
| Field | Type | Description |
|---|---|---|
source (required) | text or url | Content type |
knowledgeBaseId or agentId | string | Exactly one of the two; with agentId, the agent's knowledge base is used (or created and linked) |
title | string, ≤ 160 | Document title |
content | string, ≤ 400,000 | Required if source is text |
url | string, ≤ 500 | Required if source is url; public addresses only |
curl -X POST "https://callpme.com/api/v1/knowledge" \
-H "Authorization: Bearer $CALLPME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "text",
"agentId": "cm4agent01",
"title": "Year-end opening hours",
"content": "The practice is closed from December 24 to January 2 inclusive."
}'