Open MercatoDocsSearch docsAPI reference

User guide

Managing API keys

Create a key for the application that needs access, give it the required features and store its value when it is shown. Rotate or revoke the key when the integration changes.

Use API keys when automations or external systems must call the Open Mercato API without a username and password. Keys inherit RBAC rules, so you can grant narrow permissions to each integration and revoke them without disturbing human accounts.

Requirements

Creating a key in the admin UI

API keys list with key names and assigned roles

  1. Open Settings → Auth → API Keys (/backend/api-keys).
  2. Select the tenant and (optionally) the organization the key should scope to.
  3. Click Create API key to launch the form.

Create an API key and choose its roles

  1. Provide a descriptive name and optional note so teammates know what the key powers.
  2. Set an expiration if the integration is temporary.
  3. Assign tenant-wide roles or organization-scoped roles as needed. The key receives the same features as those roles.
  4. Confirm to generate the secret.

Rotating or revoking a key

Automating key management with the CLI

For scripted environments, the CLI mirrors the UI workflow. Run:

yarn mercato api_keys add \
  --name "CI deployer" \
  --tenantId 4c1378aa-1d27-4bc5-9a82-5afecf05c8f3 \
  --organizationId 6b4b3a5d-9a5d-4fcf-927f-830e1d9b3eee \
  --roles admin,employee

The command prints the API key secret once. Store it in your secret manager and never commit it to version control. See the CLI guide for API keys for full flag documentation and automation tips.

Previous: Akeneo PIM Integration · Next: Attachments