Skip to main content
POST
/
tokens
Create a token
curl --request POST \
  --url https://app.strix.ai/api/v1/tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "personal",
  "name": "<string>",
  "scopes": [
    "<string>"
  ],
  "expires_in_days": 123,
  "expires_at": "2023-11-07T05:31:56Z"
}
'
{
  "token": "<string>",
  "token_record": {
    "id": "<string>",
    "type": "personal",
    "name": "<string>",
    "scopes": [
      "<string>"
    ],
    "secret_prefix": "<string>",
    "expires_at": "2023-11-07T05:31:56Z",
    "last_used_at": "2023-11-07T05:31:56Z",
    "revoked_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

API token from Settings > API Access

Body

application/json
type
enum<string>
required
Available options:
personal,
service
name
string
required
scopes
string[]
expires_in_days
integer
expires_at
string<date-time>

Response

201 - application/json

Token created. The token secret is returned only once.

token
string

The full token secret (shown only once)

token_record
object