An API key is a stand-in for a bearer token on server-to-server calls. It is not a separate identity: every key belongs to a user and inherits that user's roles and permissions.
Using a key
apiKey: <key>
orgid: acmex-api-key is accepted as well.
CurrentUserMiddleware calls authenticateApiKey(orgId, apiKey, {}), which resolves the key to its owning user, and then injects Authorization: Bearer <token> for the rest of the pipeline. Everything downstream sees an ordinary authenticated user.
Role side effects applied at that point:
ConfigAdminorContentAdminon the owner setsdata.admin = true.Systemon the owner setsdata.system = true— which also means repository writes will then requirex-client-authorization.
Managing keys
/api-key/createJWT/api-key/listJWT/api-key/:keyIdJWT/api-key/:keyIdJWT/api-key/:keyIdJWT/api-key/regenerate/:keyIdJWT/api-key/usage/:keyIdJWTKeys are apikey records. regenerate issues a new secret against the same key record, so you can rotate without re-pointing whatever references it.
Administration
/api-key/admin/listJWT/api-key/admin/revoke/:keyIdJWTBoth require RootAdmin or ConfigAdmin.
Org users
/api-key/org/:orgidJWT/api-key/org/:orgid/createJWT/api-key/org/:orgid/deleteJWTCreate and delete require RootSystem, RootAdmin or RootPowerUser. These manage the service users that keys are issued against.
Direct authentication
/api-key/authNo authPublic. Exchanges a key for a token explicitly, rather than relying on the middleware's implicit resolution — useful when a client wants to hold a short-lived bearer token instead of sending the key on every call.
Blocking a key
/profile/blacklist/apikey/addJWT/profile/blacklist/apikey/delete/:apiKeyJWTBlacklistMiddleware rejects blocklisted keys before the request reaches a controller — the fast path for cutting off a leaked key without waiting for a rotation to propagate.
There is no per-key scope. A key issued against an Owner or ConfigAdmin user can do everything that user can. Create a dedicated low-privilege user per integration and issue the key against it.