Skip to content
AugentaDocsOpen console ↗
Create an API key

Documentation

API reference
View Markdown

Create an API key

POST/v1/orgs/{id}/keys

Use workspaceIds to assign zero or more active Workspaces in the organization. The issuer must administer every assignment. With no assignments, the key is stateless-only and requires an organization owner/admin to issue. No Connector is required. Legacy Connector keys require the Connector owner or an organization owner/admin. The secret appears once. Direct keys are organization-owned and survive removal of their creator.

Authentication

Use your signed-in console session or a person's WorkOS access token for this setup operation. See authentication and permissions.

Request

Parameters

idstringrequired

path parameter.

Min length: 1

Body fields

Create a key with zero or more assigned Workspaces. Omit workspaceIds or send [] for stateless-only access. Each assigned Workspace grants reads and writes. Legacy Connector issuance is also supported. Labels are trimmed and capped at 120 characters.

object
labelstringrequired

Min length: 1

workspaceIdsarrayoptional

Default: []

Show item fields
object
labelstringrequired

Min length: 1

connectorIdstringrequired

Min length: 1

Responses

Save the secret now; it cannot be retrieved later.

objectstringalways present

The resource type. Always api_key.

Allowed: "api_key"

idstringalways present

Public credential identity used in administration routes. It is not the authentication secret.

Min length: 1

orgIdstringalways present

Owning Organization's Augenta ID.

Min length: 1

labelstringalways present

Human-readable credential name.

createdByUserIdstringalways present

Person who issued the credential.

createdAtstringalways present

Recorded credential creation time.

scopestringconditional

Scope metadata, when present.

workspaceIdsarrayconditional

Assigned Workspaces. An empty array permits one-shot Consolidate only.

Show item fields
workspaceIdstringconditional

Legacy single-Workspace assignment, when applicable.

connectorIdstringconditional

Legacy Connector-backed credential reference, when applicable.

lastActiveAtstringconditional

Last recorded authentication activity, when available.

revokedAtstringconditional

Recorded revocation time, when revoked.

secretstringalways present