Connect a service with a token
Owner or admin only.
Stores a pasted provider token, encrypted, and connects it for every task in the workspace. Agents reach the provider's MCP server for projectRef and read through it; Sinatra can't guarantee read-only access: the connection's grantLabel says what limits it (the catalog entry's acknowledgement explains it). Send the catalog entry's acknowledgements.token.version once its text is accepted. The token is never returned. With the taskId from an agent's connect link, an API task in the workspace is then sent a message to continue, and continued says whether it was; nothing about taskId can fail the connect. Returns 404 unless connectors are turned on for this workspace, before write authorization.
/v1/workspaces/{workspaceId}/connectorsA 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.
A catalog entry's id.
The provider's project reference, in the provider's format. Required when the catalog entry's reference.required is true, and refused when its reference is null.
Your name for the connection, 1 to 64 characters with no line breaks, control or invisible format characters. Defaults to projectRef, or to default without one. The serverName it gives must not already be in use in the workspace.
The provider token, up to 4096 bytes. It is encrypted at rest and never returned.
The catalog entry's acknowledgements.token.version, confirming you accepted its text.
Required: the catalog entry's acknowledgements.token.confirmations, exactly and in order, each accepted by the person connecting.
The task an agent's connect link came from. Once connected, an API task in this workspace is continued; anything else is left alone.
Response Body
curl -X POST "https://api.sinatra.dev/v1/workspaces/string/connectors" \ -H "Content-Type: application/json" \ -d '{ "connector": "string", "token": "string", "acknowledgementVersion": "string" }'{
"id": "string",
"connector": "string",
"name": "string",
"label": "string",
"serverName": "string",
"method": "string",
"projectRef": "string",
"grantLabel": "string",
"status": "string",
"connectedByUserId": "string",
"connectedByName": "string",
"createdAt": "2019-08-24T14:15:22Z",
"continued": true
}{
"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"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}