- Scope tokens to a single organization with
--org, especially in CI/CD and production environments. - Use environment variables when working with API tokens.
- Never share your API token in public, including repositories, and CI/CD Actions.
Authorization header:
Group-scoped tokens
A group-scoped token is a Platform API credential pinned to one group inside an organization, with an explicit list of allowed operations. It’s the right shape for automations that should be able to provision and manage databases inside a single group without being able to reach the rest of the organization. The caller minting a group-scoped token must be an admin or owner of the organization.Group-scoped tokens are control-plane credentials — they authorize requests to the Turso Platform API. They are independent from the SQL-engine tokens that your application uses to query a database. The two systems do not share key material or vocabulary.
Scope vocabulary
The platform expands the presetsread-only and full-access to the corresponding individual scopes server-side, so the values you see on a token after creation are always individual scopes.
Presets
Group create, group delete, group transfer, and AWS migration are intentionally not reachable from a group-scoped token at any scope — those operations are gated to organization-level credentials.
Lifecycle
- Group-scoped tokens are pinned by the group’s UUID, not its name. If a group is deleted and a new one is created with the same name, old tokens do not transfer — they are revoked along with the group.
- Deleting a group cascades a revoke to every token scoped to it.
- Transferring a group to a different organization cascades a revoke to every token scoped to it.
Managing organization tokens
Two endpoints let admins manage every token scoped to an organization in one place — they are what backs the dashboard’s organization-level token table:GET /v1/organizations/{organizationSlug}/api-tokens— list every org-scoped and group-scoped token, with the minting user attached.DELETE /v1/organizations/{organizationSlug}/api-tokens/{tokenId}— revoke by ID.