Knowledge

List knowledge bases and add text or a web page to them with the Callpme API.

On this page

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

FieldTypeDescription
source (required)text or urlContent type
knowledgeBaseId or agentIdstringExactly one of the two; with agentId, the agent's knowledge base is used (or created and linked)
titlestring, ≤ 160Document title
contentstring, ≤ 400,000Required if source is text
urlstring, ≤ 500Required 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."
  }'