Skip to Content
HallolaraDocs
Public APIKnowledge items

Create a knowledge item

POST
/knowledge-items

Creates a new knowledge item and asynchronously embeds its text for retrieval. sync_status.state follows the lifecycle:

pending → syncing → synced or failed. Automatic retries can still move a failed item to synced. An inactive item (active: false) is not indexed and stays pending.

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
headerAuthorizationBearer <token>

API key in the Authorization: Bearer <key> header. Keys are created in the Hallolara dashboard (Settings → API Keys).

Request Body

application/json
  1. body
group_id*string
Match^[a-f0-9]{24}$
name*string

Trimmed of leading/trailing whitespace before storage.

Length1 <= length <= 200
text*string
Length1 <= length <= 5000000
active?boolean
Defaulttrue

Response Body

Created.

application/json
  1. response
data?

Summary shape - text is omitted; use the detail endpoint for full body.

Example Request
curl -X POST 'https://api.hallolara.ai/api/v1/knowledge-items' \  -H 'Content-Type: application/json' \  -d '{  "group_id": "65a1234567890abcdef01234",  "name": "Shipping Policy",  "text": "Orders ship within two business days."}'
Example Response
{  "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"  }}