Send a message
Sends a follow-up on a task and returns 202 with the message's id.
Any member of the workspace can follow up on a task started from the API, CLI, MCP or dashboard. Follow up on other tasks, such as Linear or GitHub issues, where they started; here they return 409 not_an_api_task. A task that has been idle for a while picks up again when you follow up.
A message sent while the agent is working doesn't change the current turn. It waits and runs as the next turn. A message isn't refused when the workspace is running its limit of tasks: its turn takes a place in the queue, and if the queue is full, the refusal appears in the task's conversation instead.
Send an Idempotency-Key so a retry is safe: a message retried with the same key is sent once. Keys belong to their sender, so two people using the same key send two messages. The key becomes the message's messageId.
If Sinatra saves the message but can't hand it to the agent yet, it answers 503 unavailable with the messageId. Retry with that messageId as the Idempotency-Key, so the message is sent once.
/v1/workspaces/{workspaceId}/tasks/{taskId}/messagesA personal access token, which starts with sntr_. Create one on the dashboard's CLI & API page (https://app.sinatra.dev/tokens). It acts as you in every workspace you belong to, with your role in each, and expires after at most 365 days. The CLI's browser sign-in sends an OAuth access token here instead.
In: header
Path Parameters
The workspace's id, from GET /v1/me.
The task's id.
Header Parameters
Makes a retry safe. 1 to 128 printable ASCII characters, with no spaces. A request repeated with the same key answers with the first one's result and does the work once; the same key with different content is 409 idempotency_conflict. Keys belong to the person who sent them: two people using the same key start two tasks or send two messages. The key is also the messageId of the message the request sends, which is a start's first message.
^[\x21-\x7e]{1,128}$The message, up to 100,000 characters after trimming.
1 <= length <= 100000Response Body
curl -X POST "https://api.sinatra.dev/v1/workspaces/string/tasks/string/messages" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "text": "string" }'{
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}