Developers

Search the docs

Search guides and headings.

Managing keys

Create, narrow, roll and revoke API keys in the console, and who may do each in each environment.

View as Markdown

You will create an API key, narrow what it can do, roll it with a window and revoke it.

Keys are managed in the console under API keys. The API has no route to create or revoke a key. It has one route to check the key you call it with.

Who can do what#

ActionSandboxProduction
Create, narrow, roll, revokeOwner, Admin, DeveloperOwner, Admin

Use the environment switch at the top of the console to choose Sandbox or Production. Keys belong to the company, not to a member.

Before you create a key#

  • The company owner must have accepted the API terms. Until then, no key can be created.
  • A Production key can be created only after Nurish'd marks the company Live.

Create a key#

  1. Choose the environment.
  2. Select Create key.
  3. Give the key a name that says what uses it, such as order-service.
  4. Optionally narrow its scopes. See below.
  5. Create it and copy the key.

The full key is shown once. Copy it into your secret manager now. If you lose it, create a new key.

Narrow scopes#

A key with no narrowed scopes follows the company's scopes. Pick fewer scopes to limit one key, for example catalog:read for a read-only job.

  • A key can never hold a scope the company lacks.
  • If Nurish'd removes a scope from the company, every key loses it.
  • The scopes you can pick are the company's.

Confirm the result with GET /developer/v1/key/get/document. See Scopes.

Roll a key#

Rolling makes a new key and sets the old one to expire. Choose when the old one expires:

WindowUse it when
NowThe old key leaked. Services using it fail at once.
1 hourYou can deploy fast.
1 dayThe usual choice.
7 daysMany services share the key.

Copy the new key when it is shown, deploy it, check it, then let the old one expire. See Authentication.

Revoke a key#

Revoke a key to stop it for good. A revoked key answers 401 invalid_api_key. You cannot restore it. Create a new key if you need one.

A key that is expired or revoked and used for an action that needs an active key can also answer 409 key_not_active.

Next#