v1

latestOpenAPI 3.0.3MIT2026-07-24122271451.2 KB
User and Workspace management

Create API Key

Generate a new API key for the workspace. Check out API Key Authentication article for detailed API Keys description.

📘

  • Only an Org Admin can generate an API keys.
  • To make another user a key's owner, pass user_id of this user. The user should has an Admin role in the workspace.
  • Generating a new key invalidates existing key with the same type. Using this request, you can deactivate the key you're using for the request.
post/public/v1/workspaces/{workspace_id}/api-keys

Path parameters

workspace_idstring required

Workspace id.

Request body

user_idstring
type'production' | 'sandbox' required

A type of API key.

Example request

{
  "user_id": "2eWSKSvVqmuVCnuUK3iWwD",
  "type": "sandbox"
}

Response

OK

user_idstring

A unique identifier of the user.

type'production' | 'sandbox'

A type of API key.

workspace_idstring

A unique identifier of the workspace.

keystring

A New Public API key.

Example response

{
  "user_id": "ajnN7eGutJZsRKjQrNuPkh",
  "type": "sandbox",
  "workspace_id": "BhVzRcxH9Z2LgfPPGXFUBa",
  "key": "5606722917eaf631cce6256e64b4afbd30d0e5fa"
}