List API Keys

Beta
GET/v1/auth/api-keys

This endpoint is idempotent. Learn more

Returns a paginated list of API keys.

Role type requiredValues:admin
Only API keys or agents whose role has this type can call this endpoint.
cursoroptional string

Opaque cursor token identifying where the page of results starts.

Use the cursor value embedded in a previous response's next_page_url or previous_page_url to fetch the adjacent page. Omit to start from the first page.

limitoptional integer

Maximum number of results to return in a single page.

qoptional string

Free-text search term used to filter results.

Which fields are matched against the term varies by endpoint.

statuses[]optional arrayenumValues:activeexpiredrevoked

API key statuses to filter by.

  • active: the key can be used to authenticate requests.
  • expired: the key passed its expiration time and can no longer authenticate requests.
  • revoked: the key was revoked and can no longer authenticate requests.

When omitted, keys of every status are returned.

include[]optional arrayenumValues:rolerole.permissions

Sub-objects to expand in the response. When omitted, sub-objects are returned as null.

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

next_page_urlstringnullable

Relative URL that fetches the next page of results.

null when the last page has been reached.

previous_page_urlstringnullable

Relative URL that fetches the previous page of results.

null while on the first page.

has_next_pageboolean

Whether more results exist after this page.

has_prev_pageboolean

Whether results exist before this page.

dataarray of api_key

Resources in this page.

idstring

API key ID.

objectstringenumValues:api_key

Resource type identifier.

namestring

Human-readable name for the API key.

redacted_valuestring

Redacted key value safe for display.

The key's prefix followed by its last four characters, e.g. aug_sk_prod_****hjt4.

roleroleExpandablenullable

Role assigned to the key, which determines the permissions of requests made with it.

idstring

Role ID.

objectstringenumValues:role

Resource type identifier.

namestring

Display name, unique within the account.

typestringenumValues:adminuserscanner

The kind of role.

The role's type is sometimes used to gate special behaviors and to restrict some actions to only certain types of roles. For example, only roles with the type admin can create and manage API keys.

  • admin: full administrative access, including managing API keys.
  • user: a custom role tailored to a specific need (its permissions are defined explicitly). Roles created through the API always have this type.
  • scanner: a role for scanning-station operators.
  • sales_rep: a role for sales representatives.
  • agent: a role assigned to an automated agent rather than a person.
ownerownernullable

Provenance of this role.

System-owned roles are global defaults shared across all accounts and cannot be modified or deleted; account-owned roles are custom roles created by that account.

Always returned as null in this endpoint.
permissionsarray of stringExpandablenullable

Permissions granted by this role, in {domain}:{action} format, such as customers:read.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

last_used_atstring (date-time)nullable

When the key was last used to authenticate a request.

Updated at most once every 24 hours, so it may lag the key's most recent use. null if the key has never been used.

expires_atstring (date-time)nullable

When the key expires and stops authenticating.

null if the key never expires.

revoked_atstring (date-time)nullable

When the key's revocation takes effect.

A future timestamp means revocation was scheduled (for example, during rotation) and the key continues to authenticate requests until that time. null if the key has not been revoked.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

Responses

200

Successful response for List API Keys