Skip to main content
POST
Provision Workspace
Create a fully configured Penbox workspace for one of your clients, seed it with case templates, register its admins, and receive an API token scoped to that workspace — in a single call. For the end-to-end flow, see Onboard a Client.
Workspace provisioning must be enabled on your account — talk to Penbox. A token without it is rejected with a 401.
Two silent admins are created. The admin in the payload is your client’s. Penbox also adds your own support account, read from the support_email configured once on your partner workspace — it is never sent here. Without one, the call still succeeds and says so in warnings.
The token is returned exactly once, in the 201 response that creates the workspace. Penbox stores nothing but its hash — persist it before you do anything else.

Idempotency

The call is idempotent on integration.legalops.source_workspace_id: one Penbox workspace per workspace on your side. Use the status code to tell a creation from a replay:
Provisioning never fails halfway: an optional step that did not complete is reported in the warnings array, not as an error.

Authorizations

Authorization
string
header
required

API token (starts with pnbx_). Create at https://app.penbox.io/workspace/settings/api. Include as: Authorization: Bearer {token}

Body

application/json
name
string
required

Workspace name. The slug is derived from it, with a numeric suffix when that slug is already taken.

Required string length: 3 - 64
Example:

"Acme Legal"

admin
object
required

The client's administrator. Created as a silent member: Penbox never emails them.

integration
object
required

Identifies the client workspace on your side. This is what makes the call idempotent.

template_source
object

Case templates to copy into the new workspace.

Response

A workspace already exists for this source_workspace_id. Same payload, without token.

replayed
boolean

False when this call created the workspace, true when it returned one that already existed.

workspace
object

The Penbox workspace

integration
object

The link back to the workspace on your side

token
string

API token scoped to the new workspace. Returned exactly ONCE, in the 201 that created it: Penbox stores only its hash and can never show it again. Absent from a replay.

Example:

"pnbx_0f1e2d3c4b5a69788796a5b4c3d2e1f00112233445566778"

warnings
string[]

Optional steps that did not complete. The workspace is fully created either way — these are not errors. Absent when there is nothing to report.

Example: