Read the conversation
Returns the conversation of a task started from the API, CLI, MCP or dashboard, oldest first.
A task that started elsewhere has no conversation here (409 not_an_api_task); its conversation is where it started.
The conversation holds final answers and questions, not progress. The agent posts one reply per turn: its answer, or a question when it needs your input. Sinatra adds its own notices, such as errors and refusals.
Each entry's role and kind say what it is:
userandmessage: a message a person sent.messageIdis its idempotency key, or a generated id.agentandresponse: the agent's answer for a turn.agentandclarify: a question the agent needs answered to continue.platformandresponseorerror: a message from Sinatra itself, such as a refusal, an error, a stop, or files the agent produced.
When next isn't null, more entries follow: pass next as after to get the next page.
There is no streaming. To wait for a reply, poll this endpoint with after set to the id of the last entry you read, and check the task's status with Get a task. The turn is done when the task stops working, for example when it reaches replied or pr_open. While a task is queued, its conversation stays quiet; its queued field says so.
/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.
Query Parameters
The id of the last entry you've read. Returns only later entries. An id that isn't an entry of this task is invalid_cursor.
How many entries to return, 1 to 200.
1001 <= value <= 200Response Body
curl -X GET "https://api.sinatra.dev/v1/workspaces/string/tasks/string/messages?after=string&limit=100"{
"messages": [
{
"id": "string",
"messageId": "string",
"role": "string",
"kind": "string",
"body": "string",
"createdAt": "2019-08-24T14:15:22Z"
}
],
"next": "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"
}