Create a knowledge item
Creates a new knowledge item and asynchronously embeds its text for
retrieval. sync_status.state follows the lifecycle:
pending → syncing → synced (success) or failed (terminal).
Poll the item via GET to observe the transition. pending is
non-terminal: use a client-side polling timeout because a queueing
failure can leave the item pending. A later valid PATCH re-enqueues
indexing; contact support if the state does not progress.
Authorization
bearerAuth API key in the Authorization: Bearer <key> header.
Keys are created in the SMAO dashboard (Settings → API Keys).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/knowledge-items" \ -H "Content-Type: application/json" \ -d '{ "group_id": "65a1234567890abcdef01234", "name": "Shipping Policy", "text": "Orders ship within two business days." }'{ "data": { "id": "string", "group_id": "string", "name": "string", "active": true, "text_length": 5000000, "sync_status": { "state": "pending", "synced_at": "2019-08-24T14:15:22Z", "total_chunks": 0, "estimated_duration_ms": 0, "error": "string" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }}