Skip to main content
POST
Provision a user
Pre-creates a member, a workspace, and an API key. Hand the key to an agent immediately. The person claims the account later by opening the returned link. See User provisioning. Pre-creates a member with a ready workspace and API key before they ever sign in. The key works immediately; the person claims the account by opening claimUrl and signing in, which transfers everything to their real identity. Unclaimed provisions expire after 7 days. Admin or owner. The response’s projectId field keeps its historical name on the wire; it is the workspace id.
Availability: Cloud · Enterprise (self-hosted). Not available on the Community edition: a self-hosted deployment needs ENTERPRISE_ENABLED=true, otherwise the endpoint answers 403 with error.type: "enterprise_license_required".

Authorizations

Authorization
string
header
required

A workspace API key (oc_…) or organization API key (oc_org_…). Workspace-scoped endpoints called with an organization key also need X-Workspace-Id.

Body

application/json
role
enum<string>
default:member
Available options:
admin,
member
skipOnboarding
boolean
default:true

Response

The provision

Returned once when a user is provisioned. The API key is shown only here.

id
string

Provision record ID.

userId
string

Placeholder user ID (becomes the real user after the claim).

projectId
string

The pre-created workspace ID. The field keeps its historical name on the wire.

apiKey
string

Workspace API key (oc_…), usable immediately.

claimUrl
string

Link the user opens to claim the account.

expiresAt
string<date-time>

When the unclaimed provision expires (7 days from creation).