Youniton Docs

Assistant & AI

Assistant runs, AI policy, budgets and project AI settings.

#The tenant's AI pool, usage, reset, remaining and allocation for the current period (read-only)

GET/ai/budget
Session (app only)F-AST-06

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The tenant budget; meta.warnings may hold ai.allocation_above_budget.application/json
Errors403404One problem shape

#The tenant AI policy with its version

GET/ai/policy
Session (app only)F-AST-08

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The policy; ETag carries the version.application/json
Errors403404One problem shape

#Replace the tenant AI policy (all keys) — the write path of the assist policy keys

PUT/ai/policy
Session (app only)If-MatchF-AST-08

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

If-Matchrequiredstring

The resource version in quotes (05-api §7.1); missing answers 428, different answers 412.

Pattern ^"[0-9]+"$

Request body application/jsonrequired

Loading the schema…

Responses

200The saved policy with its new version.application/json
Errors403404412422428One problem shape

#The per-project AI table — enabled, limit, effective limit, used, derived sources, repository index states

GET/ai/project-settings
Session (app only)F-AST-07

Query parameters

qstring

Min length 2 · Max length 120

sortstring

One of: name -name used_percent -used_percent

page[number]integer

Min 1

page[size]integer

One of: 10 20 25 30 50 100

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200A page of projects; meta.warnings may hold ai.allocation_above_budget or ai.limit_below_minimum_answer.application/json
Errors403404One problem shape

#The caller's AI proposals across projects — waiting (pending) or decided — no access to the initiator's conversation follows from it

GET/assist/approvals
Session (app only)F-AST-13

Query parameters

filter[view]string

R16 (XM-1085): waiting = the pending proposals the caller may decide, soonest expiry first; decided = the proposals that are no longer pending and name the caller as a reviewer, the newest state change first. The cursor is bound to the view.

One of: waiting decided · Default: "waiting"

page[cursor]string

The opaque cursor of the previous page's links.next (05-api §5).

Max length 512

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The rows of the view, 25 per page, with the counts of both views (R16).application/json
Errors403404422One problem shape

#The person's assistant tokens of the current month

GET/assist/budget/me
Session (app only)F-AST-21

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200Used, reserved and the limit (never above the tenant pool), and when the month resets.application/json
Errors403404One problem shape

#The person's current workspace conversation with the assistant, or null

GET/assist/conversation
Session (app only)F-AST-21

Query parameters

beforestring

The cursor of older turns (from links.older).

Max length 80

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The newest 50 turns, oldest first; data is null when the person has no current conversation.application/json
Errors403404One problem shape

#Start a new workspace conversation ("New conversation")

POST/assist/conversations
Session (app only)Idempotency-KeyF-AST-21

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Responses

201The new, empty conversation; it is the person's current one.application/json
Errors403404One problem shape

#Send a message to the assistant; the answer arrives through the run's events

POST/assist/conversations/{conversationId}/messages
Session (app only)Idempotency-KeyF-AST-21

Path parameters

conversationIdrequiredstring (uuid)

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Request body application/jsonrequired

Loading the schema…

Responses

202The run that answers; messageId is the person's message, replyId the assistant's answer.application/json
Errors403404422429503One problem shape

#Edit a person message — the conversation from it on is replaced, and the assistant answers again (G256, F-AST-21.R12)

POST/assist/conversations/{conversationId}/messages/{messageId}/edit
Session (app only)Idempotency-KeyIf-MatchF-AST-21

Path parameters

conversationIdrequiredstring (uuid)
messageIdrequiredstring (uuid)

The person message to edit (a turn with editable true).

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

If-Matchrequiredstring

The resource version in quotes (05-api §7.1); missing answers 428, different answers 412.

Pattern ^"[0-9]+"$

Request body application/jsonrequired

Loading the schema…

Responses

202The run that answers the new message; messageId is the new person message, replyId the new answer.application/json
Errors400403404409412422428429503One problem shape

#Retry the answer — a new run for the same person message (G188, F-AST-21.R10)

POST/assist/conversations/{conversationId}/messages/{messageId}/retry
Session (app only)Idempotency-KeyF-AST-21

Path parameters

conversationIdrequiredstring (uuid)
messageIdrequiredstring (uuid)

The assistant answer to retry (the conversation's newest answer).

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Responses

202The new run; messageId is the same person message, replyId the new answer.application/json
Errors403404409429503One problem shape

#The caller's current conversation with one tenant or team space

GET/assist/doc-spaces/{spaceId}/conversation
Session (app only)F-DOC-23

Path parameters

spaceIdrequiredstring (uuid)

A space id; a hidden, foreign or purged space answers 404 doc_space.not_found.

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The conversation, its messages re-authorised.application/json
Errors403404One problem shape

#Start a new, empty conversation with one tenant or team space

POST/assist/doc-spaces/{spaceId}/conversations
Session (app only)Idempotency-KeyF-DOC-23

Path parameters

spaceIdrequiredstring (uuid)

A space id; a hidden, foreign or purged space answers 404 doc_space.not_found.

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Responses

201The new conversation with no messages.application/json
Errors403404One problem shape

#Ask one tenant or team space — a run whose answer arrives through the run's events

POST/assist/doc-spaces/{spaceId}/messages
Session (app only)Idempotency-KeyF-DOC-23

Path parameters

spaceIdrequiredstring (uuid)

A space id; a hidden, foreign or purged space answers 404 doc_space.not_found.

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Request body application/jsonrequired

Loading the schema…

Responses

202The run, its answer message and its events URL.application/json
Errors403404409422429503One problem shape

#The Youniton pages that the caller can open and that match a question — for the assistant's navigation answers

GET/assist/pages
Session (app only)F-AST-24

Query parameters

qrequiredstring

What the person looks for, in their words.

Min length 2 · Max length 120

projectKeystring

The project of the panel's page context — a hint only; used only when the caller can see it and the page's gate holds.

Pattern ^[A-Za-z][A-Za-z0-9]{1,9}$

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200At most 5 pages, best match first; an empty list when no page that the caller can open matches.application/json
Errors404422One problem shape

#The project's AI budget line for the current period — the same counters as AI limits

GET/assist/projects/{projectKey}/budget
Session (app only)F-AST-04

Path parameters

projectKeyrequiredstring

A project key, upper-cased and resolved through the key aliases (04 §5.3); hidden and missing are one 404.

Pattern ^[A-Za-z][A-Za-z0-9]{1,9}$

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200Used, reserved, limit, the reset instant and whether the project is in cache-only mode.application/json
Errors403404One problem shape

#The caller's current conversation in the project — messages re-authorised, the derived scope

GET/assist/projects/{projectKey}/conversation
Session (app only)F-AST-01

Path parameters

projectKeyrequiredstring

A project key, upper-cased and resolved through the key aliases (04 §5.3); hidden and missing are one 404.

Pattern ^[A-Za-z][A-Za-z0-9]{1,9}$

Query parameters

page[cursor]string

The opaque cursor of the previous page's links.next (05-api §5).

Max length 512

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The newest 50 messages (older ones by cursor); text only where released or not required and still valid.application/json
Errors403404One problem shape

#Start a new, empty current conversation in the project (D-100)

POST/assist/projects/{projectKey}/conversations
Session (app only)Idempotency-KeyF-AST-10

Path parameters

projectKeyrequiredstring

A project key, upper-cased and resolved through the key aliases (04 §5.3); hidden and missing are one 404.

Pattern ^[A-Za-z][A-Za-z0-9]{1,9}$

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Request body application/json

Loading the schema…

Responses

201The new conversation with no messages.application/json
Errors403404422One problem shape

#The project-chat facade — start a project_question run in the conversation; the answer arrives through the run's events

POST/assist/projects/{projectKey}/messages
Session (app only)Idempotency-KeyF-AST-01

Path parameters

projectKeyrequiredstring

A project key, upper-cased and resolved through the key aliases (04 §5.3); hidden and missing are one 404.

Pattern ^[A-Za-z][A-Za-z0-9]{1,9}$

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Request body application/jsonrequired

Loading the schema…

Responses

202The run, its answer message and its events URL.application/json
Errors403404409422429503One problem shape

#The project's run history for the caller — their own runs; every run's summary for an Admin

GET/assist/projects/{projectKey}/runs
Session (app only)F-AST-12

Path parameters

projectKeyrequiredstring

A project key, upper-cased and resolved through the key aliases (04 §5.3); hidden and missing are one 404.

Pattern ^[A-Za-z][A-Za-z0-9]{1,9}$

Query parameters

page[cursor]string

The opaque cursor of the previous page's links.next (05-api §5).

Max length 512

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

20025 runs per page, newest first.application/json
Errors403404One problem shape

#The suggestion chips the caller may use in this project now

GET/assist/projects/{projectKey}/suggestions
Session (app only)F-AST-02

Path parameters

projectKeyrequiredstring

A project key, upper-cased and resolved through the key aliases (04 §5.3); hidden and missing are one 404.

Pattern ^[A-Za-z][A-Za-z0-9]{1,9}$

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

2000–3 chips; disabled in cache-only mode; empty for client askers.application/json
Errors403404One problem shape

#The workflows the caller may start in this project, with their parameters, intended outcome and proposed actions

GET/assist/projects/{projectKey}/workflows
Session (app only)F-AST-11

Path parameters

projectKeyrequiredstring

A project key, upper-cased and resolved through the key aliases (04 §5.3); hidden and missing are one 404.

Pattern ^[A-Za-z][A-Za-z0-9]{1,9}$

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The catalogue entries for this caller; unavailable ones carry the reason.application/json
Errors403404One problem shape

#The reviewer's projection of one proposal by its id alone — the notification deep link (R17)

GET/assist/proposals/{proposal}
Session (app only)F-AST-13

Path parameters

proposalrequiredstring (uuid)

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The same projection as getAssistProposal; a superseded proposal names its newer version (supersededBy).application/json

#Create a durable run of a workflow; 202 only after the run and its dispatch intent committed

POST/assist/runs
Session (app only)Idempotency-KeyF-AST-11

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Request body application/jsonrequired

Loading the schema…

Responses

202The run exists; Location is /api/v1/assist/runs/{run}; follow eventsUrl.application/json
Errors403404409422429503One problem shape

#The authorised snapshot of a run — status, progress, pending proposal, receipts, outcome; text only for its actor

GET/assist/runs/{run}
Session (app only)F-AST-12

Path parameters

runrequiredstring (uuid)

The run id; unknown and not visible are one 404.

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The snapshot; sequence is the cursor to continue the stream from.application/json
Errors403404One problem shape

#Persist the cancel intent, fence new effects and answer 202 with the run's status; safe to repeat

POST/assist/runs/{run}/cancel
Session (app only)F-AST-14

Path parameters

runrequiredstring (uuid)

The run id; unknown and not visible are one 404.

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

202The cancel intent is recorded (CG-26) — the run's status and status version after it (cancelling, cancelled, or its terminal status if it had already ended); the run's events and snapshot report the end.application/json
Errors403404409One problem shape

#Request the catalogue's compensating action for one committed receipt, as a linked run that needs its own approval

POST/assist/runs/{run}/compensations
Session (app only)Idempotency-KeyF-AST-15

Path parameters

runrequiredstring (uuid)

The run id; unknown and not visible are one 404.

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Request body application/jsonrequired

Loading the schema…

Responses

202The compensation run; it proposes the inverse for approval.application/json
Errors403404409429503One problem shape

#The run's events after a cursor — text/event-stream, or paged JSON with Accept application/json

GET/assist/runs/{run}/events
Session (app only)F-AST-12

Path parameters

runrequiredstring (uuid)

The run id; unknown and not visible are one 404.

Query parameters

afterinteger

The last event sequence the client holds; SSE's Last-Event-ID carries the same value.

Min 0

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Last-Event-IDstring

Pattern ^[0-9]{1,18}$

Responses

200SSE (Cache-Control no-store, X-Accel-Buffering no) — run.status first, stored events in order, unavailable markers on replay, resync for a lost cursor, ping every 15 s; or a JSON page.text/event-stream
Errors403404One problem shape

#The reviewer's projection of one exact proposal — items, targets with versions, before/after, recipients, expiry, state

GET/assist/runs/{run}/proposals/{proposal}
Session (app only)F-AST-13

Path parameters

runrequiredstring (uuid)

The run id; unknown and not visible are one 404.

proposalrequiredstring (uuid)

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The proposal as this reviewer may see it; can tells whether they may approve or reject and which step-up is needed.application/json

#The confirmation card of the assistant's write, from its record

GET/assist/runs/{run}/proposals/{proposal}/card
Session (app only)F-AST-23

Path parameters

runrequiredstring (uuid)

The run id; unknown and not visible are one 404.

proposalrequiredstring (uuid)

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The proposal's state and the card; only the initiator reads it.application/json
Errors403404One problem shape

#Approve or reject the exact proposal version and digest; a rejection always records

POST/assist/runs/{run}/proposals/{proposal}/decision
Session (app only)Idempotency-KeyF-AST-13

Path parameters

runrequiredstring (uuid)

The run id; unknown and not visible are one 404.

proposalrequiredstring (uuid)

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Request body application/jsonrequired

Loading the schema…

Responses

200The recorded decision; for an approval the run is queued to resume (it may wait for a slot or a budget).application/json
Errors401403404409422One problem shape

#Prepare a fresh proposal for an expired or stale one — the run resumes and re-plans from current evidence

POST/assist/runs/{run}/proposals/{proposal}/renew
Session (app only)F-AST-15

Path parameters

runrequiredstring (uuid)

The run id; unknown and not visible are one 404.

proposalrequiredstring (uuid)

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200The run's snapshot, queued to prepare the new version.application/json
Errors403404409422One problem shape

#Start a linked run again after a rejected proposal; nothing of the rejected proposal executes (R18)

POST/assist/runs/{run}/proposals/{proposal}/start-again
Session (app only)Idempotency-KeyF-AST-13

Path parameters

runrequiredstring (uuid)

The run id; unknown and not visible are one 404.

proposalrequiredstring (uuid)

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Responses

202The linked run (restart_of); follow its events URL.application/json
Errors403404409422429503One problem shape

#Start a linked run of a failed, retryable run; committed receipts of the chain are never repeated

POST/assist/runs/{run}/retry
Session (app only)Idempotency-KeyF-AST-14

Path parameters

runrequiredstring (uuid)

The run id; unknown and not visible are one 404.

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Idempotency-Keyrequiredstring

Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent.

Min length 8 · Max length 128 · Pattern ^[A-Za-z0-9._:-]+$

Responses

202The linked run; follow its events URL.application/json
Errors403404409429503One problem shape

#Four starting points of the assistant panel

GET/assist/suggestions
Session (app only)F-AST-21

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

Responses

200Words only; a suggestion grants nothing.application/json
Errors403404One problem shape

#Switch a project's AI (its Project chat module) and set its monthly limit

PATCH/projects/{projectKey}/ai-settings
Session (app only)If-MatchF-AST-07

Path parameters

projectKeyrequiredstring

A project key, upper-cased and resolved through the key aliases (04 §5.3); hidden and missing are one 404.

Pattern ^[A-Za-z][A-Za-z0-9]{1,9}$

Headers

X-Kanso-Tenantrequiredstring (uuid)

The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found.

If-Matchrequiredstring

The resource version in quotes (05-api §7.1); missing answers 428, different answers 412.

Pattern ^"[0-9]+"$

Request body application/merge-patch+jsonrequired

Loading the schema…

Responses

200The project's row after the change.application/json
Errors403404409412422428One problem shape

Was this helpful?