POST
/
v1
/
auth
/
api-tokens
/
{tokenName}
curl -L -X POST https://api.turso.tech/v1/auth/api-tokens/{tokenName} \
  -H 'Authorization: Bearer TOKEN'
{
  "name": "my-token",
  "id": "clGFZ4STEe6fljpFzIum8A",
  "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'

Path Parameters

tokenName
string
required

The name of the api token.

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.