Submit a message to a session

Changed on
post/v0/city/{cityName}/session/{id}/submit

Request

  • The document declares no server URL.
  • Auth: none declared. Required headers: X-GC-Request

Path parameters

cityNamestring required

City name.

idstring required

Session ID, alias, or runtime session_name.

Headers

X-GC-Requeststring required

Anti-CSRF header required on mutation requests. Any non-empty value is accepted; the header's presence is what the server checks.

Idempotency-Keystring

Idempotency key for safe retries.

Request body

intent'default' | 'follow_up' | 'interrupt_now'

Semantic delivery choice for a user message on a session submit request.

messagestring required

Message text to submit.

resumeboolean

Start or resume the session here if it is not running (an operator's own message; it consumes an operator's hold). Without it, a message to a session that is not running is queued for its next run (expiring after 24h) and the controller is asked to start it; the result's will_start says whether it will.

Response

Accepted

event_cursorstring required

City event-stream sequence captured before the async request was accepted. Pass this value as after_seq to /v0/city/{cityName}/events/stream to receive the request result without replaying unrelated historical backlog. A value of 0 can also mean no event provider is configured or the event log is empty.

request_idstring required

Correlation ID. Watch the city event stream for request.result.session.create, request.result.session.message, request.result.session.submit, or request.failed with this request_id.

statusstring required

Async request status.

Example response

{
  "status": "accepted"
}

Changes