Create a session

Changed on
post/v0/city/{cityName}/sessions

Request

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

Path parameters

cityNamestring required

City 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.

Request body

aliasstring

Optional session alias.

asyncboolean

Create session asynchronously (agent only).

kindstring

Session target kind: agent or provider.

messagestring

Initial message to send to the session.

namestring

Agent or provider name.

optionsobject

Provider/agent option overrides.

project_idstring

Opaque project context identifier.

session_namestring

Deprecated: use alias.

titlestring

Session title.

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