Docs/Secrets API/Service Accounts
REST API Reference

Service Accounts API

Create, list, rotate, revoke, and delete machine service account credentials for CI/CD runners, Kubernetes operators, and automated workloads.

Create Service Account

Mints a high-entropy secret token with assigned scopes (read, write, or admin) and an optional expiry date.


Create Service AccountAuth

Mint a new machine service account token.

Payload Example

{
  "name": "github-actions-staging",
  "scopes": ["read"],
  "expires_at": "2027-01-01T00:00:00Z"
}

Status Codes

  • Name
    201
    Type
    HTTP
    Description
    Service account and API token created.
  • Name
    400
    Type
    HTTP
    Description
    Invalid scope string or expiration timestamp.
Request
POST/v1/secrets/projects/{id}/service-accounts
Response 201

Rotate Service Account Token

Generates a new token and immediately revokes the old secret value.


Rotate TokenAuth

Rotate the bearer API key for a service account.

Status Codes

  • Name
    200
    Type
    HTTP
    Description
    Successfully issued new token value.
  • Name
    404
    Type
    HTTP
    Description
    Service account ID not found.
Request
POST/v1/secrets/service-accounts/{saId}/rotate
Response 200

We use cookies and similar technologies to measure traffic and improve the site. You can choose which categories to allow. Manage Preferences.