Skip to main content
POST
/
v1
/
auth
/
api-tokens
/
{tokenName}
curl -L -X POST https://api.turso.tech/v1/auth/api-tokens/{tokenName} \
  -H 'Authorization: Bearer TOKEN'
{
  "name": "<unknown>",
  "id": "<unknown>",
  "token": "..."
}
The token in the response is never revealed again. Store this somewhere safe, and never share or commit it to source control.
curl -L -X POST https://api.turso.tech/v1/auth/api-tokens/{tokenName} \
  -H 'Authorization: Bearer TOKEN'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tokenName
string
required

The name of the api token.

Body

application/json

Optional organization restriction for the token.

organization
string

The organization slug to restrict this token to. If omitted, the token grants access to all organizations the user belongs to.

Example:

"my-org"

Response

200 - application/json

Successful response

name
any
id
any
token
string

The actual token contents as a JWT. This is used with the Bearer header, see Authentication for more details. This token is never revealed again.

Example:

"..."