Skip to main content
POST
/
agent
/
v1
/
chat
/
{id}
/
message
Send chat message (synchronous)
curl --request POST \
  --url https://api.case.dev/agent/v1/chat/{id}/message \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "parts": [
    {
      "type": "text",
      "text": "<string>"
    }
  ]
}
'
{
  "statusCode": 123,
  "statusMessage": "<string>",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Path Parameters

id
string
required

Chat session ID

Body

application/json

Message payload following the AI SDK UIMessage format. The body is passed through 1:1 to the underlying OpenCode session. Currently only text parts are supported.

parts
object[]

Message content parts. Currently only "text" type is supported. Additional types (e.g. file, image) may be added in future versions.

Response

Upstream OpenCode response with per-turn usage metadata when available