API Keys

Create a new API key.

<div> <code>create:api_keys</code> </div>
post/api/v1/api_keys

Request

  • Base URL: https://your_kinde_subdomain.kinde.com
  • URL: https://your_kinde_subdomain.kinde.com/api/v1/api_keys
  • Auth: HTTP bearer

Request body

namestring required

The name of the API key.

type'user' | 'organization' | 'environment' required

The entity type that will use this API key.

api_idstring required

The ID of the API this key is associated with.

scope_idsstring[] nullable

Array of scope IDs to associate with this API key.

user_idstring nullable

The ID of the user to associate with this API key (for user-level keys).

org_codestring nullable

The organization code to associate with this API key (for organization-level keys).

Response

API key successfully created.

messagestring

A Kinde generated message.

codestring

A Kinde generated status code.

Example response

{
  "message": "API key created",
  "code": "API_KEY_CREATED",
  "api_key": {
    "id": "api_key_0195ac80a14e8d71f42b98e75d3c61ad",
    "key": "k_live_1234567890abcdef"
  }
}

Changes