cURL
curl --request POST \ --url https://api.xpander.ai/v1/knowledge/{kb_id}/documents \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data ' { "document_urls": [ "<string>" ] } '
[ { "document_url": "<string>", "kb_id": "<string>", "id": "<string>", "name": "<string>" } ]
Add one or more documents to a knowledge base
curl -X POST -H "x-api-key: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "document_urls": [ "https://example.com/product-guide.pdf", "https://example.com/faq-page" ] }' \ https://api.xpander.ai/v1/knowledge/<kb-id>/documents
[ { "kb_id": "<kb-id>", "id": null, "name": null, "document_url": "https://example.com/product-guide.pdf" }, { "kb_id": "<kb-id>", "id": null, "name": null, "document_url": "https://example.com/faq-page" } ]
id
null
API Key for authentication
Request model for adding documents to a knowledge base.
Documents URLs
Successful Response
Document URL
KB identifier
Document unique identifier
Document name
Was this page helpful?
Contact support