POST
/
v1
/
organizations
/
{organizationSlug}
/
databases
/
{databaseName}
/
auth
/
tokens
curl -L -X POST 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/tokens?expiration=2w&authorization=full-access' \
  -H 'Authorization: Bearer TOKEN'
{
  "jwt": "TOKEN"
}
curl -L -X POST 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/tokens?expiration=2w&authorization=full-access' \
  -H 'Authorization: Bearer TOKEN'
{
  "jwt": "TOKEN"
}

Path Parameters

organizationSlug
string
required

The slug of the organization or user account.

databaseName
string
required

The name of the database.

Query Parameters

expiration
string
default:
never

Expiration time for the token (e.g., 2w1d30m).

authorization
enum<string>
default:
full-access

Authorization level for the token (full-access or read-only).

Available options:
full-access,
read-only

Body

application/json
Additional context such as claims required for the token.
permissions
object

The permissions for the token.

Response

200
application/json
Successful response
jwt
string

The generated authorization token (JWT).