Chat
A single tool-using agent sits behind every conversation — it reads documents, checks deadlines, and drafts changes, but it never executes a change on its own. See approving actions below.
Send a message
/chat/messagesOne request/response turn through the agent. 30 requests/minute per household.
textstringrequiredconversationIdstringoptionalOmit to start a new conversation.
deadlineIdstringoptionalAnchor the turn to a specific deadline's thread.
pendingActionsPendingAction[]optionalMutating tool calls the agent wants to make — empty unless it proposed a change. See approving actions.
curl https://api.dociya.com/chat/messages \
-H "Authorization: Bearer $DOCIYA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "text": "When does my license expire?" }'Send a message (streaming)
/chat/messages/streamThe same turn as above, but as a server-sent event stream — token events as the reply is generated, a terminal done event carrying the same ChatResult the non-streaming endpoint returns directly.
curl -N https://api.dociya.com/chat/messages/stream \
-H "Authorization: Bearer $DOCIYA_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "text": "Renew my license" }'Approve a pending action
/chat/actions/:id/approveHuman-in-the-loop is structural here, not a per-call choice: the agent never executes a mutating tool inline. It proposes an action, returned in the turn's pendingActions, and nothing happens to real data until this endpoint is called — or POST /chat/actions/:id/reject instead.
curl -X POST https://api.dociya.com/chat/actions/a771.../approve \
-H "Authorization: Bearer $DOCIYA_ACCESS_TOKEN"Also on this resource
GET /chat/conversationsActive conversations, most-recent first. Capped at 50.GET /chat/conversations/:idFull thread, including document-event timeline rows.GET /chat/search?q=Keyword search across every conversation. Capped at 30 results.POST /chat/messages/:id/regenerateRe-run the tool-loop on an existing user message.DELETE /chat/messages/:idSoft-delete — "delete for me".POST /chat/messages/:id/feedback · /reportThumbs up/down, or flag a problematic answer.