Mint an API key
Mint an org key. The response carries the secret, and nothing shows it again.
The key is bound to this organization by construction and capped at what the
caller holds here - the same rule as for a personal key, applied to a
different owner. The one thing it can never carry is org_key:manage: a key
that can mint keys would hand its holder a second one without the session and
the step-up the first one cost.
Nothing else is subtracted, so an owner may give an org key owner-grade
scopes. audience: "clients" mints a key that acts in this partner's client
organizations instead of in this one.
bearerAuthAuthentifizierungBearer <token>API token generated from the fastmon dashboard (Account → API Token) or at organization level (fmo_…, one that outlives its creator). Send as Authorization: Bearer fm_... or paste the full token (including its prefix) into the Authorize dialog.
org_id*Org Iduuidapplication/json- body
Mint an org key. The step-up fields re-authenticate the acting human - the key itself belongs to nobody and never authenticates interactively.
current_password?|The account's password, when it has neither a passkey nor 2FA.
totp_code?|Code from the authenticator app, when 2FA is on and there is no passkey.
passkey_challenge_id?|Challenge from POST /auth/session/webauthn/options, required together with passkey_assertion whenever the account has a passkey.
passkey_assertion?|The WebAuthn assertion answering that challenge.
name*NameLabel the key is recognised by in the dashboard.
1 <= length <= 100audience?AudienceWhere the key acts. own: in this organization. clients: in the organizations this one is a partner of, resolved at request time, and not in this organization itself.
"own""own""clients"scopes*array<string>Permissions the key carries, analytics:read and the like. Capped at what the caller holds in this organization, and org_key:manage is never grantable.
1 <= itemsexpires_at*|When the key stops working. Required, and null means it never expires.
Successful Response
application/json- response
Response to minting: the info plus the cleartext secret, which is returned exactly once and never stored.
id*IdIdentifier of the key.
uuidkind*ApiKeyKindWhether the key belongs to a person or to an organization.
"personal""org"name?NameLabel the key is recognised by.
prefix*PrefixNon-secret lookup prefix: the scheme (fm_ for a personal key, fmo_ for an organization's) plus the first characters of the secret.
last4?Last4Last four characters of the secret, to tell two keys apart.
scopes?array<string>Permissions this key carries.
[]expires_at?Expires AtWhen the key stops working; absent means never.
date-timelast_used_at?Last Used AtAbsent until the key is first used.
date-timereach*Which organizations the key may act in: the ones it was issued for, or, for a key issued to an agency, its clients as they stand right now.
created_at*Created AtWhen the key was minted.
date-timerevoked_at?Revoked AtAbsent while the key is live. Only listings that ask for revoked keys ever see a value here.
date-timeeditable?EditableWhether the caller may change this key: its scopes, its expiry, its name, and rotating it. False for a key that holds permissions the caller does not. Revoking is never gated by it.
truevia_partner_org_id?Via Partner Org IdThe partner organization whose member minted this org key. The key keeps working after that partnership ends. Absent otherwise.
uuidkey*KeyThe secret, in full. It is returned here and nowhere else, and it is not stored - a lost secret is replaced by rotating the key.
curl -X POST 'https://api.fastmon.eu/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/api-keys' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "scopes": [ "string" ], "expires_at": "2019-08-24T14:15:22Z"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "personal", "name": "string", "prefix": "string", "last4": "string", "scopes": [], "expires_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "reach": { "scope": "string", "partner_org_id": "6d083317-c55a-4f41-82ae-8c86d8187f47", "organization_ids": [], "organization_count": 0 }, "created_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z", "editable": true, "via_partner_org_id": "4449850c-ca66-4d3c-b6e6-920e855223d4", "key": "string"}