System Accounts - Access Tokens

Create System Account Access Token

Changed on

Creates an access token for the specified system account (SA). The access token can be used for authenticating API and CLI requests. The token will only be displayed once on creation. Returns a 409 if the system account already has a token with the same name.

post/v3/system-accounts/{accountId}/access-tokens

Request

  • Base URL: https://global.api.konghq.com
  • URL: https://global.api.konghq.com/v3/system-accounts/{accountId}/access-tokens
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Request body

namestring required
expires_atstring date-time required

Response

A response including a single system account access token with the token.

idstring uuid

ID of the system account access token.

namestring

Name of the system account access token.

created_atstring date-time

Timestamp of when the system account access token was created.

updated_atstring date-time

Timestamp of when the system account access token was last updated.

expires_atstring date-time

Timestamp of when the system account access token will expire.

last_used_atstring date-time

Timestamp of when the system account access token was last used.

tokenstring

The token of the system account access token.

Example response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "Sample Access Token",
  "created_at": "2022-08-01T14:16:09Z",
  "updated_at": "2022-08-02T08:35:49Z",
  "expires_at": "2022-12-31T12:52:23Z",
  "last_used_at": "2022-10-24T13:05:42Z",
  "token": "spat_12345678901234567890123456789012345678901234567890"
}

Changes

    • warning

      added the new 401.00 enum value to the response property for the response status

    • warning

      added the new 404.00 enum value to the response property for the response status

    • warning

      added the new 409.00 enum value to the response property for the response status

    • breaking

      the response's body type changed from no type to object for status

    • breaking

      the response's body type changed from no type to object for status

    • breaking

      the response's body type changed from no type to object for status

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status