Skip to content

users_apikeys_get

Read ONE of this product's API keys by id — its label, type, visible prefix, when it was issued and whether it has been revoked.

Tool

users_apikeys_get

Read ONE of this product's API keys by id — its label, type, visible prefix, when it was issued and whether it has been revoked.

Read ONE of this product's API keys by id — its label, type, visible prefix, when it was issued and whether it has been revoked. The same shape users_apikeys_list returns per row. A server key's SECRET is not here and never will be: that value existed in exactly one response, ever, and what is stored is a hash. An unknown id, a malformed id and a key belonging to another product all answer alike.

Behavior

HTTP
GET /users/api-keys/:id

Arguments

Name
Type
Required
Description
id
string
•
Id of the key to read — the `id` from users_apikeys_list.

Response

Field
Type
Always
Description
id
string
•
Id of the key. Pass it to users_apikeys_revoke.
name
string
•
The label a human gave this key — which backend or environment holds it.
type
string
•
`server` for a secret backend key (usk_…), `publishable` for a browser-safe one (upk_…).
value
string
•
The full value of a publishable key, which is not a secret. Null for a server key — that value exists in exactly one response, ever.
prefix
string
•
`usk_`/`upk_` plus six characters — enough to recognise a key, never to use one.
createdAt
string
•
When the key was issued (ISO 8601).
revokedAt
string
•
When the key was revoked (ISO 8601). Null while it still works.

Try it

Read ONE of this product's API keys by id — its label, type, visible prefix, when it was issued and whether it has been revoked.

When to use

Read ONE of this product's API keys by id — its label, type, visible prefix, when it was issued and whether it has been revoked. The same shape users_apikeys_list returns per row. A server key's SECRET is not here and never will be: that value existed in exactly one response, ever, and what is stored is a hash. An unknown id, a malformed id and a key belonging to another product all answer alike.

Example

Ask your agent something like this:

Read ONE of this product's API keys by id — its label, type, visible prefix, when it was issued and whether it has been revoked.

The agent will invoke users_apikeys_get with these arguments:

{
  "id": "<id>"
}

Esc

Start typing to search the docs.

↑↓navigate↵select