App tokens
CompozyOS App tokens HTTP endpoints.
GET
state?stringToken state; defaults to active
Value in
"active""revoked""all"Active tokens first, then revoked; newest first within each group
application/json- 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
JSON request body
application/json- body
name*stringorigins?array<string>App token created; store the secret now
application/json- response
app_token*token*stringcurl -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
app_token_id*stringApp token id
JSON request body
application/json- body
name?string|nullorigins?array<string>|nullUpdated
application/json- 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
app_token_id*stringApp token id
App token revoked; changed is false when already revoked
application/json- response
app_token*canceled*integerchanged*booleancurl -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}