For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Tokens

List API Tokens

get

Returns a paginated list of API tokens with obfuscated token IDs.

Authorizations
Query parameters
pageintegerOptional

The page number of results

Example: 1
limitintegerOptional

The number of results to return per page

Example: 10
Responses
200

OK

application/json
totalinteger · int32OptionalExample: 25
nextPagenumber · int32 · nullableOptionalExample: 2
get/v2/api-tokens
GET /v2/api-tokens HTTP/1.1
Host: api.appetize.io
Accept: */*
{
  "total": 25,
  "nextPage": 2,
  "tokens": [
    {
      "id": "6592008029c8c3e4dc76256c",
      "obfuscatedToken": "tok_abcd****",
      "label": "CI/CD Token",
      "role": "developer",
      "lastUsed": "2021-01-01T00:00:00.000Z",
      "created": "2021-01-01T00:00:00.000Z",
      "createdBy": "admin@enterprise.com"
    }
  ]
}

Create a new API token

post

Creates a new API token. Returns the full token only once. Token must be saved securely by the user.

Authorizations
Body
labelstringRequired

The label of the API token.

Example: CI/CD Token
rolestring · enumRequired

The role of the API token.

Example: developerPossible values:
Responses
201

API Token created

application/json
idstringRequired

The ID of the API token.

Example: 6592008029c8c3e4dc76256c
obfuscatedTokenstringRequired

The string representing the token obfuscated

Example: tok_abcd****
tokenstringRequired

The full token string

Example: tok_abcdefghijklmnopqrstuvwxyz
accountIdstringOptional

The ID of the account.

Example: 6592008029c8c3e4dc76256c
labelstringRequired

The label of the API token.

Example: CI/CD Token
createdBystringRequired

The email of the user who created the API token.

Example: admin@enterprise.com
createdstringRequired

The date and time the API token was created.

Example: 2021-01-01T00:00:00.000Z
lastUsedstring · nullableOptional

The date and time the API token was last used.

Example: 2021-01-01T00:00:00.000Z
rolestring · enumRequired

The role of the API token.

Example: developerPossible values:
post/v2/api-tokens
POST /v2/api-tokens HTTP/1.1
Host: api.appetize.io
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "label": "CI/CD Token",
  "role": "developer"
}
{
  "id": "6592008029c8c3e4dc76256c",
  "obfuscatedToken": "tok_abcd****",
  "token": "tok_abcdefghijklmnopqrstuvwxyz",
  "accountId": "6592008029c8c3e4dc76256c",
  "label": "CI/CD Token",
  "createdBy": "admin@enterprise.com",
  "created": "2021-01-01T00:00:00.000Z",
  "lastUsed": "2021-01-01T00:00:00.000Z",
  "role": "developer"
}

Get an API token by id

get

Retrieve a specific API token’s info.

Authorizations
Path parameters
idstringRequired

The id for the API token

Example: 6592008029c8c3e4dc76256c
Responses
200

The API token

application/json
idstringRequired

The ID of the API token.

Example: 6592008029c8c3e4dc76256c
obfuscatedTokenstringRequired

The string representing the token obfuscated

Example: tok_abcd****
labelstringRequired

The label of the API token.

Example: CI/CD Token
rolestring · enumRequired

The role of the API token.

Example: developerPossible values:
lastUsedstring · nullableOptional

The date and time the API token was last used.

Example: 2021-01-01T00:00:00.000Z
createdstringRequired

The date and time the API token was last used.

Example: 2021-01-01T00:00:00.000Z
createdBystringRequired

The email of the user who created the API token.

Example: admin@enterprise.com
get/v2/api-tokens/{id}
GET /v2/api-tokens/{id} HTTP/1.1
Host: api.appetize.io
Accept: */*
{
  "id": "6592008029c8c3e4dc76256c",
  "obfuscatedToken": "tok_abcd****",
  "label": "CI/CD Token",
  "role": "developer",
  "lastUsed": "2021-01-01T00:00:00.000Z",
  "created": "2021-01-01T00:00:00.000Z",
  "createdBy": "admin@enterprise.com"
}

Rekove an API token

delete

Revoke an API token.

Authorizations
Path parameters
idstringRequired

The id for the API token to revoke

Example: 6592008029c8c3e4dc76256c
Responses
204

API Token rekoved

No content

delete/v2/api-tokens/{id}
DELETE /v2/api-tokens/{id} HTTP/1.1
Host: api.appetize.io
Accept: */*

No content

Last updated