Skip to main content
POST
Provision an isolated managed workspace

Authorizations

Authorization
string
header
required

Use Authorization: Bearer pyai_live_... (or pyai_test_...).

Headers

Idempotency-Key
string
required
Pattern: ^[A-Za-z0-9:_-]{8,128}$

Body

application/json
external_workspace_id
string
required
Pattern: ^[A-Za-z0-9:_-]{1,128}$
name
string
required
Required string length: 1 - 120
knowledge_enabled
boolean
default:false
monthly_budget_cents
integer | null

Optional approved child spending ceiling. Omission uses a finite registered default. Null is permitted only when the operator explicitly allows unlimited use.

Required range: x >= 1

Response

Original managed workspace and credential, including an exact retry.

object
string
required
Allowed value: "managed_tenant"
version
string
required
Allowed value: "managed-tenant/v1"
operation_id
string
required
external_workspace_id
string
required
request_hash
string
required

SHA-256 of the normalized original request, not the raw wire body. Normalize and stringify exactly as documented in the operation description.

Pattern: ^[0-9a-f]{64}$
idempotency_key
string
required

The original operation key. A recovery consumer must match this and request_hash against its saved journal before accepting any credential.

Pattern: ^[A-Za-z0-9:_-]{8,128}$
parent_org_id
string
required
payer_org_id
string
required
child_org_id
string
required
project_id
string
required
key_id
string
required
status
string
required
Allowed value: "provisioned"
calling_ready
boolean
required
monthly_budget_cents
integer | null
required
Required range: x >= 1
scopes
string[]
required
secret
string<password>
required

Recoverable original credential, returned only to the exact registered integration. Keep server-side; never expose in a browser or log.