Rest API
Instruct the content library agent
POST /api/v1/wiki/chat
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 withtaskId,changesStaged,agentSummaryandsessionId. 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
sessionIdback to continue a conversation. Omit it and a new one is generated
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” 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.
Request Body required
Section titled “Request Body required ”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."}Responses
Section titled “ Responses ”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.