Skip to content

Create Agency Client

POST
/agency/clients

Create a client org under this agency.

Returns 201 with the new client (created: true). Send Idempotency-Key and/or external_ref: creates that share either are serialized per agency (a concurrent one gets 409, retry shortly) and a repeat answers 200 with created: false and the same client, so exactly one org exists per reference. With neither there is nothing to deduplicate on. If the new org cannot be linked to the agency it is deleted again and the call answers 502. The workspace is built in the background: provisioning is pending until it is ready.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string
Idempotency-Key
Any of:
string

Retry-safety key: replaying one returns the original response instead of creating a second org.

Request Body required

object
external_ref
Any of:
string
>= 1 characters <= 128 characters
name
required

Display name of the new client org.

string
>= 1 characters <= 120 characters
owner_email
Any of:
string

Responses

201

Successful Response

object
data
required
object
created
Any of:
boolean
external_ref
Any of:
string
name
required
string
org_id
required

Client org id (org_xxx). Send it as X-Target-Org-Id.

string
owner_invite
Any of:
string
Allowed values: invited existing_account failed
provisioning
required

pending until the org’s workspace has been set up; targeting it answers 503 until then.

string
Allowed values: ready pending
status
required
string
Allowed values: active suspended
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string