Skip to content

Rotate a key

POSThttps://sandbox-api.tryflume.ai/partner/v1/keys

Issues a new partner key and sets the key you called with to expire.

  • secret is returned once.
  • The key you called with keeps working for overlap_days.
  • Idempotency-Key is required.

Guide: Rotate keys

Request

Headers

HeaderRequiredDescription
X-Flume-Partner-KeyYesYour partner key. See Authentication and keys.
Idempotency-KeyYesA 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_idstring

      The key's id. Use it to revoke the key.

    • prefixstring

      The start of the key. Safe to log.

    • labelstring or null

      The name you gave the key.

    • statusenum

      ACTIVE, EXPIRING (replaced, and working until expires_at), REVOKED or EXPIRED.

    • When the key was issued, in UTC.

    • last_used_atstring or null

      When the key was last used, in UTC.

    • expires_atstring or null

      When a replaced key stops working, in UTC.

    • secretstring or null

      The new key. Returned once. null when you replay an Idempotency-Key.

    Errors

    Every error uses one envelope. Branch on error.code.

    StatusCodeMeaning
    401EMBED_TOKEN_INVALIDYou sent an Authorization header and no X-Flume-Partner-Key. Flume read the call as one from its own iframe.
    401PARTNER_KEY_INVALIDThe partner key is missing, unknown, revoked, expired, or from the other environment. On live, also a platform Flume has not enabled yet.
    409IDEMPOTENCY_IN_PROGRESSThe first call with this key is still running.
    409KEY_LIMIT_REACHEDYou already hold the maximum number of active keys.
    422IDEMPOTENCY_KEY_REUSEDThe key was already used with a different body.
    422VALIDATION_FAILEDA 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.
    429KEY_ROTATION_RATE_LIMITEDYou reached the number of keys you can issue in 24 hours. Your current key keeps working.
    500INTERNALSomething failed on Flume's side.