Send message

POST
/api/v1/threads/{threadId}/message

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Capy under Settings → API.

Path parameters

threadId*string

Request body

application/json
  1. body
text*string
files?array<>

Files to attach, such as screenshots or screen recordings, each uploaded first through POST /files. The files together must stay within 2 GiB.

model?
delivery?string

How the message reaches a working thread. interrupt (the default) cuts the running step and makes the message the next input; steer lands it at the agent's next step with nothing cancelled; queue waits until the current work finishes.

One of"queue""steer""interrupt"
clientKey?string

A key you choose for this send, unique per message. A retried send with the same key, from the same key's principal to the same thread, posts nothing new and answers the first send's message id with deduped: true.

Length1 <= length <= 64
editOf?string

Resend one of your earlier messages as a new version. The thread resets to that message before the agent reads the new text; the rows after it stay stored and can be switched back to.

Length26 <= length <= 26
switchTo?string

Make this superseded version of an edited message live before the send lands, so the message answers on that branch.

Length26 <= length <= 26
pullRequestAuthor?|

Set the thread's pull request author: capy or user sets it, null clears it back to the Git identity preference, and absent leaves it unchanged. It applies when the agent picks this message up, so a queued message never changes a pull request opened before it.

Response body

AdmitReceipt

application/json
  1. response
id*string
Length26 <= length <= 26
deduped*boolean
curl -X POST 'https://api.capy.ai/api/v1/threads/string/message' \  -H 'Content-Type: application/json' \  -d '{  "text": "string"}'
{  "id": "string",  "deduped": true}
Open in Capy