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

The token in the response is never revealed again. Store this somewhere safe, and never share or commit it to source control.

Path Parameters

tokenName
string
required

The name of the api token.

Response

200 - application/json
id
string

The ID generated by Turso for the API Token.

name
string

The name given to the API Token.

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.