Skip to content

Rest API

Instruct the content library agent

POST
/api/v1/wiki/chat

Give the content library agent an instruction in natural language. It reads and edits the library, streams its reasoning back as plain text, and stages the resulting changes as a task for review.

Notes

  • This endpoint streams. The body is plain text, not JSON, and arrives incrementally
  • The final line is the marker __WIKI_CHAT_RESULT__ followed by a JSON object with taskId, changesStaged, agentSummary and sessionId. Split on the marker to separate the narration from the result
  • Changes are staged, not applied. Accept them with the task endpoints below
  • Pass the previous sessionId back to continue a conversation. Omit it and a new one is generated
x-api-key
required
string

Your API key from account settings.

x-user-email
required
string

The email address of your user.

x-account-id
required
string

The ID of your account. You can find this in the account settings.

x-website-id
required
string

The ID of the workspace you want to use.

object
instruction
required

What the agent should do.

string
sessionId

Continue an earlier session. Generated when omitted.

string
Example
{
"instruction": "Add a page explaining our refund window under billing."
}

The agent’s narration, streamed as plain text, ending in the result marker.

string

Bad request - missing instruction, accountId or websiteId.

Unauthorized - invalid API key.