apikeys

Create an API key.

Changed on

Mints a scoped API key; the plaintext secret is returned once, and a key never carries more scopes than its creator holds. Requires the members:write scope (owner or admin).

post/v1/apikeys

Request

Request body

descriptionstring nullable
expiresInDaysinteger nullable
personIdstring nullable

The account id of the organization member this key acts for. Required when acting in an organization, and the person the key is narrowed to and revoked with. A personal account's key is for its owner, so leave it out.

scopesstring[]
tenantIdstring nullable

Tenant to scope this key to (admin only). Keys created with a tenant_id can only access resources belonging to that tenant.

Response

API key created; the plaintext key is in this response and nowhere else, and the key records the person it acts for.

idstring required
keystring required

Changes

    • breaking

      removed the success response with the status

    • info

      the endpoint scheme security ApiKeyAuth was added to the API

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the success response with the status