secretis returned once.- The key you called with keeps working for
overlap_days. Idempotency-Keyis required.
- Docs
- API reference
- Keys
- Rotate a key
Rotate a key
Code samples show live values. Live is in early access and not yet open to new partners: see Environments.
https://sandbox-api.tryflume.ai/partner/v1/keysIssues a new partner key and sets the key you called with to expire.
Guide: Rotate keys
Request
Headers
| Header | Required | Description |
|---|---|---|
X-Flume-Partner-Key | Yes | Your partner key. See Authentication and keys. |
Idempotency-Key | Yes | A new value for each rotation. |
Body
Send application/json. A field the API does not list returns a 422 that names it. The body is optional.
Returns
201 with these fields. Every field is always present. A field with no value is null.
key_idstringThe key's id. Use it to revoke the key.
prefixstringThe start of the key. Safe to log.
labelstring or nullThe name you gave the key.
statusenumACTIVE,EXPIRING(replaced, and working untilexpires_at),REVOKEDorEXPIRED.created_atstringWhen the key was issued, in UTC.
last_used_atstring or nullWhen the key was last used, in UTC.
expires_atstring or nullWhen a replaced key stops working, in UTC.
secretstring or nullThe new key. Returned once.
nullwhen you replay anIdempotency-Key.
Errors
Every error uses one envelope. Branch on error.code.
| Status | Code | Meaning |
|---|---|---|
| 401 | EMBED_TOKEN_INVALID | You sent an Authorization header and no X-Flume-Partner-Key. Flume read the call as one from its own iframe. |
| 401 | PARTNER_KEY_INVALID | The partner key is missing, unknown, revoked, expired, or from the other environment. On live, also a platform Flume has not enabled yet. |
| 409 | IDEMPOTENCY_IN_PROGRESS | The first call with this key is still running. |
| 409 | KEY_LIMIT_REACHED | You already hold the maximum number of active keys. |
| 422 | IDEMPOTENCY_KEY_REUSED | The key was already used with a different body. |
| 422 | VALIDATION_FAILED | A field is missing, unknown or has an unusable value. field names it as a dotted path. Some refusals carry the detail in details and leave field empty. |
| 429 | KEY_ROTATION_RATE_LIMITED | You reached the number of keys you can issue in 24 hours. Your current key keeps working. |
| 500 | INTERNAL | Something failed on Flume's side. |