Dociya

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

POST/chat/messages

One request/response turn through the agent. 30 requests/minute per household.

Parameters
textstringrequired

conversationIdstringoptional

Omit to start a new conversation.

deadlineIdstringoptional

Anchor the turn to a specific deadline's thread.

Response fields
pendingActionsPendingAction[]optional

Mutating 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)

POST/chat/messages/stream

The 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

POST/chat/actions/:id/approve

Human-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.
Note
Answers are sourced from the household's own documents wherever possible. When the agent goes beyond what a document says, that's labeled advisory in the response — never presented as fact with the same confidence.