API Keys

Create an API key for the calling key's user.

Changed on

Mints a key for the calling key's user, so a key can be rotated without an administrator. The scopes must be a subset of those the calling key holds. The key is returned once: only its hash is stored. Recorded as an api_key_created audit event naming the calling user and API key. Requires the api-keys:write scope.

post/api/api-keys

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/api-keys
  • Auth
    HTTP bearer

Headers

Authorizationstring required

Request body

scopesstring[]

Response

The key was created. The value is returned here and nowhere else.

apiKeystring
idstring
scopesstring[]
usernamestring

Changes

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • breaking

      removed the media type */* for the response with the status

    • breaking

      removed the media type */* for the response with the status

    • breaking

      removed the media type */* for the response with the status

    • breaking

      removed the media type */* for the response with the status

    • breaking

      removed the media type */* for the response with the status

    • breaking

      removed the media type */* for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status