Skip to content
Fluxer API

Admin API keys

An Admin API key is a long-lived credential for the Admin API. It authenticates as the account that created it, has its own ACL set, and is honoured only on paths below /v1/admin.

Every operation on this page requires admin_api_key:manage. None records an Admin audit entry or reads the X-Audit-Log-Reason header. An operation that addresses one key returns 404 ADMIN_API_KEY_NOT_FOUND when no key has that identifier, when another account created the key, or when the key has expired.

A key is owned by the account that created it, and it stores its own ACL set. Narrowing the owner and narrowing the key are separate actions.

Fluxer checks both sets when a request presents a key. A request passes when all three of these hold:

  • The owning account holds admin:authenticate or *.
  • The owning account holds the ACL the operation requires, or *.
  • The key itself has that ACL, or *.

A key therefore never has wider permission than the account behind it.

FieldTypeDescription
key_idsnowflakeThe ID of the key
namestringThe name given to the key (1-100 characters)
acls1array[string]The ACLs stored on the key
created_by_user_id2snowflakeThe ID of the account that created the key, and whose identity the key assumes
created_atISO8601 timestampTime the key was created
last_used_at3?ISO8601 timestampTime the key last authenticated a request, or null when it never has
expires_at4?ISO8601 timestampTime the key expires, or null when the key does not expire

1 Bounded at 111 entries, the size of the ACL registry. Every value written through this API is a registry member

2 Never changes, so a key cannot be transferred to another account

3 Written on every successful authentication, including when the authenticated operation is a read

4 An expired key is absent from every listing and is reported as not found

{
"key_id": "1501314428688998182",
"name": "moderation-tooling",
"acls": ["user:lookup", "report:view", "report:resolve"],
"created_by_user_id": "1489200013322551296",
"created_at": "2026-05-14T09:12:44.183000+00:00",
"last_used_at": "2026-06-02T18:40:11.902000+00:00",
"expires_at": null
}

Only Create Admin API key returns this object. It has the raw credential and omits last_used_at and created_by_user_id.

FieldTypeDescription
key_idsnowflakeThe ID of the key
key1stringThe raw credential the key authenticates with
namestringThe name given to the key (1-100 characters)
created_atISO8601 timestampTime the key was created
expires_at2?ISO8601 timestampTime the key expires, or null when the key does not expire
acls3array[string]The ACLs stored on the key

1 Has the form fa_<key_id>_<32 characters> described by token formats, and is presented as Admin <token> in the Authorization header

2 Derived from expires_in_days at the instant the key is created, and null when that field is omitted

3 Reflects the stored set, so a value repeated in the request appears once

{
"key_id": "1501314428688998182",
"key": "fa_1501314428688998182_7Qk2ZbW9xLmR4TnP0vAeJdCyHs6UgF1B",
"name": "moderation-tooling",
"created_at": "2026-05-14T09:12:44.183000+00:00",
"expires_at": "2026-08-12T09:12:44.183000+00:00",
"acls": ["user:lookup", "report:view"]
}
GET/v1/admin/api-keys

Returns every Admin API key object the acting account created, as a bare JSON array with no ordering guarantee. Requires admin_api_key:manage.

A key past its expiry is never returned.

StatusBodyCondition
2001array[Admin API key object]Keys were returned

1 An account that created no key receives an empty array

200 requests per minute for each authenticated user, on the admin:lookup bucket.

POST/v1/admin/api-keys

Creates a key and returns an Admin API key creation object that has the raw credential, with HTTP 200 rather than 201. Requires admin_api_key:manage.

The acting credential must already have every value in acls, unless it has *. The key authenticates immediately, and its effective permission is the intersection described under Admin API key object.

FieldTypeDescription
name1stringThe name given to the key (1-100 characters)
expires_in_days?2integerThe number of days until the key expires (1-365)
acls3array[string]The ACLs stored on the key, each a registry value (at most 111)

1 A value that is empty after trimming is rejected, so whitespace alone is not a name

2 The stored expiry is the request instant plus this many days. Omitting the field creates a key that does not expire

3 An empty array produces a key that satisfies no operation. Fluxer compares acls against the presenting key’s own ACLs, so a key cannot mint a broader key

An ungrantable ACL fails with 403 MISSING_ACL on the first offending value, and a request that names several ungrantable ACLs still reports only that one.

StatusBodyCondition
200Admin API key creation objectKey was created
400error responseBody validation fails, including an acls value outside the ACL registry, returned as INVALID_FORM_BODY
403error responseCredential type is refused, admin_api_key:manage is absent, or acls names a value the acting credential does not have

30 requests per minute for each authenticated user, on the admin:code:generation bucket.

GET/v1/admin/api-keys/{key_id}

Returns one Admin API key object. Requires admin_api_key:manage.

This operation never returns the raw credential.

FieldTypeDescription
key_idsnowflakeThe ID of the key
StatusBodyCondition
200Admin API key objectKey was returned
404error responseADMIN_API_KEY_NOT_FOUND, which also covers an expired key and a key created by another account

200 requests per minute for each authenticated user, on the admin:lookup bucket.

PATCH/v1/admin/api-keys/{key_id}

Renames a key or replaces its ACL set, and returns the updated Admin API key object. Requires admin_api_key:manage.

An omitted field is left unchanged, and the supplied fields take effect on the key’s next authenticated request. The acting credential must already have every value in a supplied acls, unless it has *. A key with an expiry keeps it.

FieldTypeDescription
key_idsnowflakeThe ID of the key
FieldTypeDescription
name?1stringThe replacement name for the key (1-100 characters)
acls?2array[string]The complete replacement set of ACLs, each a registry value (at most 111)

1 A value that is empty after trimming is rejected

2 An empty array leaves the key with no ACLs, the narrowest state short of revocation. An empty request body is accepted and changes nothing

StatusBodyCondition
200Admin API key objectKey was updated
400error responseBody validation fails, including an acls value outside the ACL registry, returned as INVALID_FORM_BODY
4031error responseCredential type is refused, admin_api_key:manage is absent, or acls names a value the acting credential does not have
404error responseADMIN_API_KEY_NOT_FOUND, which also covers an expired key and a key created by another account

1 The ownership check runs before the ACL grant check, so a key belonging to another account returns 404 rather than 403

100 requests per minute for each authenticated user, on the admin:user:modify bucket.

DELETE/v1/admin/api-keys/{key_id}

Revokes an Admin API key and answers HTTP 200 with a response body. Requires admin_api_key:manage.

The credential stops authenticating on its next use. A request already in flight runs to completion.

FieldTypeDescription
key_idsnowflakeThe ID of the key
FieldTypeDescription
successbooleanAlways true
StatusBodyCondition
200response bodyKey was revoked
404error responseADMIN_API_KEY_NOT_FOUND, which also covers an expired key and a key created by another account

100 requests per minute for each authenticated user, on the admin:user:modify bucket.