Skip to content

Users

users_apikeys_create

Issue an API key for this product.

Tool

users_apikeys_create

Issue an API key for this product.

Issue an API key for this product. type='server' mints a secret backend key (usk_…) returned EXACTLY ONCE — it authenticates the code-exchange leg and is stored only as a hash, so a lost key must be replaced, never recovered. type='publishable' mints a non-secret browser key (upk_…) that only names this product and stays readable afterwards.

Behavior

HTTP
POST /users/api-keys

Arguments

NameTypeRequiredDescription
namestringA label only humans read — which backend or environment holds this key.
typestring'server' mints a SECRET key (usk_…) for the Product's backend — returned exactly once and stored hashed. 'publishable' mints a non-secret key (upk_…) that identifies this product in browser flows and stays readable.

Response

FieldTypeAlwaysDescription
idstring
keystring
namestring
typestring
valuestring
prefixstring
createdAtstring
revokedAtstring

Try it

Issue an API key for this product.

When to use

Issue an API key for this product. type='server' mints a secret backend key (usk_…) returned EXACTLY ONCE — it authenticates the code-exchange leg and is stored only as a hash, so a lost key must be replaced, never recovered. type='publishable' mints a non-secret browser key (upk_…) that only names this product and stays readable afterwards.

Example

Ask your agent something like this:

Issue an API key for this product.

The agent will invoke users_apikeys_create with these arguments:

{
  "name": "<name>",
  "type": "<type>"
}

Esc

Start typing to search the docs.

navigateselect