Sinatra Docs
API ReferenceRepositories

Create or rotate a repository secret

Owners and admins can supply a secret.

Creation requires allowed hosts; on rotation omitted proxy fields retain their stored values. A capabilityRequestId requires repository environments and matching allowed hosts. The value is encrypted and never returned.

PUT/v1/workspaces/{workspaceId}/repos/{repoId}/secrets/{name}
AuthorizationBearer <token>

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.

In: header

Path Parameters

workspaceIdstring

The workspace's id, from GET /v1/me.

repoIdstring

The repository id from the repos data in GET /v1/workspaces/{workspaceId}.

namestring

The repository secret's environment-variable name.

valuestring

Secret value, encrypted at rest and never returned. Do not pass it through MCP.

Length1 <= length
hosts?array<string>

Allowed proxy target hosts. Required and nonempty on creation; omitted fields retain their stored values on rotation.

header?string
prefix?string
capabilityRequestId?string
Length1 <= length <= 128

Response Body

curl -X PUT "https://api.sinatra.dev/v1/workspaces/string/repos/string/secrets/string" \  -H "Content-Type: application/json" \  -d '{    "value": "string"  }'
{
  "id": "string",
  "name": "string",
  "hosts": [
    "string"
  ],
  "header": "string",
  "prefix": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "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"
}