Liftbay
API referenceOrganizations

Create an API token

POST
/v1/orgs/{org}/tokens

Authorization

cookielb_session<token>

Dashboard session cookie, set by the sign-in endpoints.

Path Parameters

org*string

Organization slug

Request Body

application/json
  1. body
name*string
Length1 <= length <= 64
role*string
Value in"admin""developer""viewer"
expiresInDays*|
Range1 <= value <= 365

Response Body

Created; token is returned once

application/json
  1. response
id*string
name*string
role*Role
Value in"owner""admin""developer""viewer"
prefix*string
createdBy*string
lastUsedAt*string|null
expiresAt*string|null
createdAt*string
token?string
curl -X POST "https://example.com/v1/orgs/string/tokens" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "role": "admin",    "expiresInDays": 1  }'
{  "id": "string",  "name": "string",  "role": "owner",  "prefix": "string",  "createdBy": "string",  "lastUsedAt": "string",  "expiresAt": "string",  "createdAt": "string",  "token": "string"}