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.

Path Parameters

tokenName
string
required

The name of the api token.

Response

200 - application/json
name
string

The name given to the API Token.

id
string

The ID generated by Turso for 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.