Send Message
Not available yet. This operation is part of the published contract and answers
501 not_implementeduntil it is built. The request and response shapes below are final for this contract version.
Send a message. The response streams the run as stream events until it ends or pauses.
HTTPBearerAuthorizationBearer <token>Bearer credential. API keys look like sqk_<geo>_<key_id>_<secret>: treat them as opaque and never put one in a browser. Older keys without the geo part stay valid until rotated. Find a geo's endpoints through GET /.well-known/sparq-discovery before sending a key.
session_id*Session IduuidSparq-Workspace?stringFor a person signed in to a console with several workspaces: the workspace this call is for, one of their memberships (listMyMemberships). Without it such a person gets workspace_required (400); a workspace they are not a member of is forbidden. It never grants anything, and other callers' credentials ignore it.
uuidIdempotency-Key?stringMakes a retry safe: the same key, route and body within 24 hours returns the stored response and the same result id. The same key with a different body or route is idempotency_conflict; while the first request runs, idempotency_in_progress.
8 <= length <= 128application/json- body
Body of POST /v1/sessions/{session_id}/messages. The response is a stream.
text*Text1 <= length <= 100000features?idempotency_key?|nullA stream of stream events: each is an id: <seq> line and a data: <JSON> line.
text/event-stream- response
One stream event, discriminated by type.
seq*SeqPosition in the run's stream; the SSE id.
0 <= valuerun_id*Run Iduuidat*Atdate-timetype?Type"run_started"agent*release_id*Release Iduuidsession_id*|nullcurl -X POST 'http://dev-sparq.centralindia.cloudapp.azure.com:8000/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages' \ -H 'Content-Type: application/json' \ -d '{ "text": "string"}'{ "seq": 0, "run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec", "at": "2019-08-24T14:15:22Z", "type": "run_started", "agent": { "name": "string", "version": "1.4.0" }, "release_id": "51d53377-463c-43a4-a864-f9b3ed9178de", "session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82"}