Sinatra Docs
API Reference

API Reference

Every endpoint of the Sinatra HTTP API, generated from its OpenAPI spec.

Start, follow and stop Sinatra tasks, delegate Linear and GitHub issues, manage workspace access and read or manage billing. Send your token on every request as Authorization: Bearer sntr_..., or the access token the CLI's browser sign-in gets. Bodies are JSON. A workspace you don't belong to answers 404, never 403.

Base URL

https://api.sinatra.dev

Authentication

Send Authorization: Bearer <token> on every request.

A 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.

OpenAPI spec

The reference is generated from the API's OpenAPI 3.1.0 spec, served at https://api.sinatra.dev/openapi.json. Point a client generator or an HTTP tool at it.

For a walkthrough with curl, idempotency, errors and limits, see CLI and API.

For Node.js, Python and Go clients generated from the spec, see SDKs.

Me

The token and who it acts as.

  • Get the token's user: GET /v1/me. Returns the user the token acts as and the workspaces they belong to, ordered by name.
  • Read your account: GET /v1/me/account. Combines your dashboard profile, memberships and linked accounts.
  • Read your email preferences: GET /v1/me/email-preferences. Reads the token user's setup reminders and task alerts preferences.
  • Change your email preferences: PATCH /v1/me/email-preferences. Sets at least one of setupReminders or taskAlerts, as JSON booleans.
  • Revoke the token: DELETE /v1/me/token. Revokes the token that sends the request, and answers 204 with no body.

Workspaces

Create a workspace, and read workspace integration, repository, plan and model settings.

  • Read the external pull request review default: GET /v1/workspaces/{workspaceId}/review-external-prs. Any current workspace member can read the workspace default.
  • Set the external pull request review default: PUT /v1/workspaces/{workspaceId}/review-external-prs. Owner or admin only.
  • Create a workspace: POST /v1/workspaces. Creates a workspace and makes you its owner, so an agent or script can set up a person's first workspace without the dashboard.
  • Get a workspace overview: GET /v1/workspaces/{workspaceId}. Returns the workspace's dashboard-visible integration state, connected repository catalog, plan status and saved model default, including your role and your own linked integration identity.

Tasks

Start, read and stop tasks.

  • List tasks: GET /v1/workspaces/{workspaceId}/tasks. Lists the workspace's tasks, from every source, most recently active first.
  • Start a task: POST /v1/workspaces/{workspaceId}/tasks. Starts a task and returns 202 with the task and the id of your first message.
  • Get a task: GET /v1/workspaces/{workspaceId}/tasks/{taskId}. Returns one task.
  • Stop a task: POST /v1/workspaces/{workspaceId}/tasks/{taskId}/stop. Stops the task's running agent and returns 202 with {"accepted": true}.

Messages

A task's conversation.

  • Read the conversation: GET /v1/workspaces/{workspaceId}/tasks/{taskId}/messages. Returns the conversation of a task started from the API, CLI, MCP or dashboard, oldest first.
  • Send a message: POST /v1/workspaces/{workspaceId}/tasks/{taskId}/messages. Sends a follow-up on a task and returns 202 with the message's id.

Tickets

Find and delegate Linear and GitHub issues.

  • Search issues: GET /v1/workspaces/{workspaceId}/tickets. Lists the open Linear and GitHub issues you could delegate.
  • Delegate an issue: POST /v1/workspaces/{workspaceId}/tickets/delegate. Hands Sinatra an existing Linear or GitHub issue as you, as if you'd assigned it to Sinatra yourself, and returns 202 with {"ok": true}.

Access

Manage workspace invitations, access requests, membership and ownership.

Subscriptions

Connect and manage your own model subscriptions in a workspace.

  • List your subscriptions: GET /v1/workspaces/{workspaceId}/subscriptions. Acts only on your own subscriptions in this workspace, not another member's.
  • Get subscription usage: GET /v1/workspaces/{workspaceId}/subscriptions/{connectionId}/usage. Acts only on your own subscriptions in this workspace, not another member's.
  • Disconnect a subscription: DELETE /v1/workspaces/{workspaceId}/subscriptions/{connectionId}. Acts only on your own subscriptions in this workspace, not another member's.
  • Update a subscription: PATCH /v1/workspaces/{workspaceId}/subscriptions/{connectionId}. Acts only on your own subscriptions in this workspace, not another member's.
  • Start connecting a subscription: POST /v1/workspaces/{workspaceId}/subscriptions/{provider}/start. Acts only on your own subscriptions in this workspace, not another member's.
  • Poll subscription authorization: POST /v1/workspaces/{workspaceId}/subscriptions/{provider}/poll. Acts only on your own subscriptions in this workspace, not another member's.
  • Complete Claude authorization: POST /v1/workspaces/{workspaceId}/subscriptions/claude/complete. Acts only on your own subscriptions in this workspace, not another member's.

Models

Read workspace model defaults and configured providers; owners manage defaults and owners or admins manage API keys.

Billing

Read workspace billing status and open owner-only Stripe checkout or billing management.

  • Get workspace billing status: GET /v1/workspaces/{workspaceId}/plan-status. Any current workspace member can read the same plan, capacity, own-credentials availability and subscription state shown in dashboard settings.
  • Create a checkout URL: POST /v1/workspaces/{workspaceId}/billing/checkout. Owner only.
  • Create a billing portal URL: POST /v1/workspaces/{workspaceId}/billing/portal. Owner only.

Integrations

Get browser handoffs for workspace integrations and personal Telegram linking.

  • Get an integration browser handoff: GET /v1/workspaces/{workspaceId}/integrations/{integration}/connect. Returns the dashboard page to connect GitHub, Linear or Slack, or your Telegram account-link page.

Repositories

Inspect repository configuration and environment status, manage your own overrides and manage secret metadata. Secret values are never returned.