Create an API key in the credential's mode, optionally with a name. With `replaceSameName`, the active keys of the mode with that exact name are revoked first, so an app that connects again keeps one key. A live key can be created only by an owner of the organization, signed in with a session and `X-Evictions-Mode: live` (403 `forbidden` otherwise, also for a live API key); at most 10 active keys per mode, counted after any replaced keys (409 `key_limit`, and then nothing is revoked)

post/v1/api-keys

Request

  • Base URL: https://api.evictionsapi.com
  • URL: https://api.evictionsapi.com/v1/api-keys
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Request body

namestring
replaceSameNameboolean

Response

The new key. The secret appears in this response only. An Idempotency-Key header is ignored: every request creates a key, and no response is stored or replayed.

idstring required
mode'test' | 'live' required
namestring nullable required
secretstring required

The API key (eak_test_... or eak_live_...), shown here only.

replacedstring[] required

The ids of the keys revoked by replaceSameName; empty otherwise.

Changes

No recorded changes to this operation across all 1 revision of this API.