GET/v2/api-keys/{keyId}

Get an API key

Retrieves information about a specific API key. Use the key identifier to inspect its project, granted scopes, description, and usage and expiration timestamps.

1 parameter
keyIdintegerrequired
The integer identifier of the API key to retrieve.

5 status codes
200Returns the API key's identifier, project information, description, granted scopes, and usage and expiration timestamps when available.
descriptionstringrequired
Description
expiresAtintegeroptional
Timestamp of API key expiraion
idintegerrequired
ID of the API key
lastUsedAtintegeroptional
Timestamp of API key last usage
projectIdintegerrequired
Api key's project ID
projectNamestringrequired
Api key's project name
scopesarray<string>required
Api key's permission scopes
userFullNamestringoptional
Full name of user owner
usernamestringoptional
Username of user owner
400Returned when the request is invalid.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when the request is not authenticated.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user is not permitted to access the API key.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the API key cannot be found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when the request is invalid. A 401 is returned when authentication is missing or invalid, a 403 when the authenticated user lacks permission, and a 404 when the API key cannot be found. The keyId path parameter must be an integer identifying the API key to retrieve.