Skip to content

App tokens

CompozyOS App tokens HTTP endpoints.

For people running agent work32 pages in this section
GET
/api/app-tokens

Query Parameters

state?string

Token state; defaults to active

Value in"active""revoked""all"

Response Body

Active tokens first, then revoked; newest first within each group

application/json
  1. response
app_tokens*array<>
curl -X GET "https://example.com/api/app-tokens"
{  "app_tokens": [    {      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "last_used_at": "2019-08-24T14:15:22Z",      "name": "string",      "origins": [        "string"      ],      "revoked_at": "2019-08-24T14:15:22Z"    }  ]}
POST
/api/app-tokens

Request Body

JSON request body

application/json
  1. body
name*string
origins?array<string>

Response Body

App token created; store the secret now

application/json
  1. response
app_token*
token*string
curl -X POST "https://example.com/api/app-tokens" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "app_token": {    "created_at": "2019-08-24T14:15:22Z",    "id": "string",    "last_used_at": "2019-08-24T14:15:22Z",    "name": "string",    "origins": [      "string"    ],    "revoked_at": "2019-08-24T14:15:22Z"  },  "token": "string"}
PATCH
/api/app-tokens/{app_token_id}

Path Parameters

app_token_id*string

App token id

Request Body

JSON request body

application/json
  1. body
name?string|null
origins?array<string>|null

Response Body

Updated

application/json
  1. response
app_token*
curl -X PATCH "https://example.com/api/app-tokens/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "app_token": {    "created_at": "2019-08-24T14:15:22Z",    "id": "string",    "last_used_at": "2019-08-24T14:15:22Z",    "name": "string",    "origins": [      "string"    ],    "revoked_at": "2019-08-24T14:15:22Z"  }}
DELETE
/api/app-tokens/{app_token_id}

Path Parameters

app_token_id*string

App token id

Response Body

App token revoked; changed is false when already revoked

application/json
  1. response
app_token*
canceled*integer
changed*boolean
curl -X DELETE "https://example.com/api/app-tokens/string"
{  "app_token": {    "created_at": "2019-08-24T14:15:22Z",    "id": "string",    "last_used_at": "2019-08-24T14:15:22Z",    "name": "string",    "origins": [      "string"    ],    "revoked_at": "2019-08-24T14:15:22Z"  },  "canceled": 0,  "changed": true}