Skip to content
OrbContext
22 pages

API reference

Knowledge authoring

Write, publish and unpublish a bot’s text, Markdown and Q&A entries from code.

List authored knowledge entries

GET/v1/bots/{botId}/knowledge/entriesscope: knowledge:drafts

Requires the knowledge:drafts scope on a key restricted to one bot, in a workspace whose plan includes the knowledge authoring API (Starter, Pro and Enterprise).

Parameters

botId
path · stringrequired
—
limit
query · integer
Default: 50 · Min: 1 · Max: 100
cursor
query · string
—

Example

curl -X GET '$ORBCONTEXT_API_URL/v1/bots/{botId}/knowledge/entries' \
  -H "Authorization: Bearer $ORBCONTEXT_API_KEY"
Response 200
{
  "items": [
    {
      "id": "string",
      "format": "txt",
      "title": "string",
      "collectionId": "string",
      "order": 0,
      "revision": 0,
      "lastSavedAt": "2026-10-21T10:00:00.000Z",
      "publishedRevision": 0,
      "publishingRevision": 0,
      "status": "draft",
      "error": "string"
    }
  ],
  "nextCursor": "string"
}

Responses

200400401402403404413415429500503

Cursor-paginated metadata and publication status.

Error responses share one shape; see Errors & limits.

Create an authored draft

POST/v1/bots/{botId}/knowledge/entriesscope: knowledge:drafts

Requires the knowledge:drafts scope on a key restricted to one bot, in a workspace whose plan includes the knowledge authoring API (Starter, Pro and Enterprise).

Parameters

botId
path · stringrequired
—
Idempotency-Key
header · stringrequired
—

Request body · application/json

value
object | objectrequired
—

Example

curl -X POST '$ORBCONTEXT_API_URL/v1/bots/{botId}/knowledge/entries' \
  -H "Authorization: Bearer $ORBCONTEXT_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: catalog-import-123' \
  -d '{ "format": "txt", "title": "string", "body": "string" }'
Response 201
{
  "id": "string",
  "format": "txt",
  "title": "string",
  "collectionId": "string",
  "order": 0,
  "revision": 0,
  "lastSavedAt": "2026-10-21T10:00:00.000Z",
  "publishedRevision": 0,
  "publishingRevision": 0,
  "status": "draft",
  "error": "string",
  "draft": {
    "format": "txt",
    "title": "string",
    "body": "string"
  }
}

Responses

201400401402403404409413415429500503

The draft, or the current entry on retry with the same key and draft.

Error responses share one shape; see Errors & limits.

Get an authored draft

GET/v1/knowledge/entries/{id}scope: knowledge:drafts

Requires the knowledge:drafts scope on a key restricted to one bot, in a workspace whose plan includes the knowledge authoring API (Starter, Pro and Enterprise).

Parameters

id
path · stringrequired
—
view
query · string
—

Example

curl -X GET '$ORBCONTEXT_API_URL/v1/knowledge/entries/{id}' \
  -H "Authorization: Bearer $ORBCONTEXT_API_KEY"
Response 200
{
  "id": "string",
  "format": "txt",
  "title": "string",
  "collectionId": "string",
  "order": 0,
  "revision": 0,
  "lastSavedAt": "2026-10-21T10:00:00.000Z",
  "publishedRevision": 0,
  "publishingRevision": 0,
  "status": "draft",
  "error": "string",
  "draft": {
    "format": "txt",
    "title": "string",
    "body": "string"
  }
}

Responses

200400401402403404413415429500503

The current draft and publication status, or just the summary.

Error responses share one shape; see Errors & limits.

Save a draft revision

PATCH/v1/knowledge/entries/{id}scope: knowledge:drafts

Requires the knowledge:drafts scope on a key restricted to one bot, in a workspace whose plan includes the knowledge authoring API (Starter, Pro and Enterprise).

Parameters

id
path · stringrequired
—

Request body · application/json

revision
integerrequired
Max: 9007199254740991
draft
object | objectrequired
—

Example

curl -X PATCH '$ORBCONTEXT_API_URL/v1/knowledge/entries/{id}' \
  -H "Authorization: Bearer $ORBCONTEXT_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{ "revision": 0, "draft": { "format": "txt", "title": "string", "body": "string" } }'
Response 200
{
  "id": "string",
  "format": "txt",
  "title": "string",
  "collectionId": "string",
  "order": 0,
  "revision": 0,
  "lastSavedAt": "2026-10-21T10:00:00.000Z",
  "publishedRevision": 0,
  "publishingRevision": 0,
  "status": "draft",
  "error": "string",
  "draft": {
    "format": "txt",
    "title": "string",
    "body": "string"
  }
}

Responses

200400401402403404409413415429500503

The saved draft and its current revision.

Error responses share one shape; see Errors & limits.

Publish a saved draft revision

POST/v1/knowledge/entries/{id}/publishscope: knowledge:publish

Requires the knowledge:publish scope on a key restricted to one bot, in a workspace whose plan includes the knowledge authoring API (Starter, Pro and Enterprise).

Parameters

id
path · stringrequired
—

Request body · application/json

revision
integerrequired
Max: 9007199254740991

Example

curl -X POST '$ORBCONTEXT_API_URL/v1/knowledge/entries/{id}/publish' \
  -H "Authorization: Bearer $ORBCONTEXT_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{ "revision": 0 }'
Response 202
{
  "id": "string",
  "format": "txt",
  "title": "string",
  "collectionId": "string",
  "order": 0,
  "revision": 0,
  "lastSavedAt": "2026-10-21T10:00:00.000Z",
  "publishedRevision": 0,
  "publishingRevision": 0,
  "status": "draft",
  "error": "string"
}

Responses

202400401402403404409413415429500503

Publication accepted. Poll entry metadata with a drafts key to check indexing status.

Error responses share one shape; see Errors & limits.

Unpublish an entry

POST/v1/knowledge/entries/{id}/unpublishscope: knowledge:publish

Requires the knowledge:publish scope on a key restricted to one bot, in a workspace whose plan includes the knowledge authoring API (Starter, Pro and Enterprise).

Parameters

id
path · stringrequired
—

Example

curl -X POST '$ORBCONTEXT_API_URL/v1/knowledge/entries/{id}/unpublish' \
  -H "Authorization: Bearer $ORBCONTEXT_API_KEY"
Response 200
{
  "id": "string",
  "format": "txt",
  "title": "string",
  "collectionId": "string",
  "order": 0,
  "revision": 0,
  "lastSavedAt": "2026-10-21T10:00:00.000Z",
  "publishedRevision": 0,
  "publishingRevision": 0,
  "status": "draft",
  "error": "string"
}

Responses

200400401402403404413415429500503

The entry no longer answers questions, effective at once. Its draft is kept, so it can be published again.

Error responses share one shape; see Errors & limits.