Manage the public and secret keys your SDKs and servers use. Admin and developer management keys can do all of this. See API keys and environments for what each kind of key is for.
Path parameter
organization_idstringrequiredYour organization, from Describe the key. A path naming any other organization answers404.
List SDK keys
/api/v1/management/organizations/{organization_id}/sdk-keys Management keyEvery key in every environment, oldest first, revoked keys included.
Response
keysSDKKey[]The keys.15 child fields
idstringThe key's ID.namestringThe key's name.kindstringpublicorsecret.environmentstringproduction,stagingordevelopment.regionstringThe data region whose API accepts the key.prefixstringThe start of the secret, such asfly_pk_us_production.last4stringThe last four characters of the secret.allowed_originsstring[]The origins a public key is accepted from in browsers. Always empty for a secret key.statusstringactiveorrevoked.last_used_atstringWhen the key last authenticated a request. Omitted if never.expires_atstringWhen the key stops working. Omitted if it does not expire.created_atstringWhen the key was issued.created_bystringThe member who issued it. Omitted for a key issued with a management key.revoked_atstringWhen the key was revoked.revoked_bystringThe member who revoked it. Omitted when a management key did.
Issue an SDK key
/api/v1/management/organizations/{organization_id}/sdk-keys Management keyBody
namestringrequiredWhat the key is called.kindstringrequiredpublicorsecret.environmentstringrequiredproduction,stagingordevelopment.allowed_originsstring[]Required, with at least one origin, for a public key. Refused on a secret key.expires_atstringWhen the key stops working, RFC 3339. Omit for a key that lasts until revoked.
Answers 201 with key, an SDK key as above, and secret, the whole key. The secret is never returned again.
Revoke an SDK key
/api/v1/management/organizations/{organization_id}/sdk-keys/{sdk_key_id}/revoke Management keyRefuses the key from the next request on, and answers with the revoked key. There is no undo. Revoking a key that is already revoked answers 409 with key_revoked.
Replace allowed origins
/api/v1/management/organizations/{organization_id}/sdk-keys/{sdk_key_id}/origins Management keyBody
allowed_originsstring[]requiredThe complete new list. Each origin is a scheme, a host and an optional port, with no path. An empty list refuses every browser request.
Replaces the list rather than adding to it, and answers with the key. Refused with 422 on a secret key.