Skip to navigation

Get API keys

View as Markdown

Gets the API keys you can manage, newest first. This endpoint never returns an API key’s full value.

The keys you get depend on your permissions:

  • user-key — Your own keys. You can always get these.
  • scim-key — Your team’s SCIM keys. Requires the permission to manage SCIM keys.
  • service-account-key — Keys owned by service accounts in your team. Requires the permission to manage service accounts and the service accounts feature.
  • service-account-scim-key — SCIM keys owned by service accounts in your team. Requires the permission to manage service accounts.

Without the type query parameter, the response includes every key type you can manage. Requesting a type you cannot manage returns an HTTP 403 Forbidden response. Use the serviceAccountId query parameter to get one service account’s keys, the createdBy query parameter to get the keys a given user created, and populateUsers=true to add user details to each key’s owner and createdBy objects.

The response is not paginated. Each owner can have at most 30 API keys.

Authentication

x-api-keystring
API Key authentication via header

Query parameters

typestringOptional

A comma-separated list of key types to return, from user-key, scim-key, service-account-key, and service-account-scim-key. Defaults to every type you can manage, or only the service account types if you pass serviceAccountId. Requesting a type you cannot manage returns an HTTP 403 Forbidden response.

serviceAccountIdintegerOptional>=1

Only return the keys owned by this service account in your team. You can only combine this parameter with the service-account-key and service-account-scim-key types.

createdByintegerOptional>=1
Only return the keys created by this user.
populateUsersbooleanOptionalDefaults to false

If true, adds the name, username, email, and profilePic properties to each key’s owner and createdBy objects.

Response

Successful Response
datalist of objects
The API keys, newest first. This array is empty if there are none. The response never includes a key's full value.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error