Basilisk
API referenceReference

Generate an API token

POST
/v1/auth/tokens

The plaintext token is returned in this response only; it is never retrievable again.

Authorization

sessionCookie
basilisk_session<token>

Browser session minted by the prefix.dev OIDC login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/auth/tokens" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "api_token": {    "created_at": "2019-08-24T14:15:22Z",    "description": "string",    "expires_at": "2019-08-24T14:15:22Z",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "key_id": "string",    "last_used_at": "2019-08-24T14:15:22Z",    "name": "string",    "revoked_at": "2019-08-24T14:15:22Z",    "status": "active"  },  "token": "string"}