v1

latestOpenAPI 3.1.02026-08-0413468163.9 KB
v1-api-keys

Create New Api Key

Create a new API key for the organization.

Requires 'api_keys.create' permission.

⚠️ IMPORTANT: The secret key is only shown ONCE upon creation. Store it securely - you won't be able to retrieve it again!

The API key will be granted a role assignment with the specified role_id. The role determines what permissions the API key has access to.

Common role IDs:

  • role_org_viewer: Read-only access
  • role_org_member: Create and modify resources
  • role_org_admin: Full administrative access (except deleting org)
  • role_org_owner: Full control over organization

Args: org_id: Organization ID body: API key details (name, role_id, scopes, expiration)

Returns: API key details INCLUDING the secret key (only time it's shown)

post/v1/orgs/{org_id}/api-keys

Path parameters

org_idstring required

Request body

namestring required

Descriptive name for the key

role_idstring required

Role ID to grant to this API key (e.g., role_org_member)

scopesstring[]

Permission keys like connectors.read, a subset of the role's; empty uses all.

expires_daysinteger nullable

Days until expiration (null = never expires)

Response

The created key, including the secret — shown only this once.

api_key_idstring required

ID of the created key.

api_keystring required

The full secret key; shown only this once — store it now.

namestring required

Human-readable key name.

key_prefixstring required

First characters of the key, for identifying it in lists.

scopesstring[] required

Permission scopes granted to the key.

expires_atstring nullable

When the key expires. Null when it does not expire.

created_atstring required

When the key was created.

warningstring required

Reminder that the secret cannot be retrieved again.

role_idstring required

ID of the role granted to the key.

role_keystring required

The role's stable key, for example role_org_member.