Skip to main content
POST
Create a sub-workspace

Authorizations

Authorization
string
header
required

Workspace API key from the Avina dashboard (Settings → API keys).

Headers

Idempotency-Key
string

Any unique string. Retrying with the same key returns the first response instead of repeating the action.

Maximum string length: 255

Body

application/json
name
string
required
Required string length: 1 - 100
domain
string
required

The company's website or domain (https://www.acme.com/about or acme.com). Stored and returned as the bare domain (acme.com).

external_id
string

Your own reference for this workspace, unique among this workspace's sub-workspaces. Repeating a create with it returns the existing workspace. Matching ignores case (CRM-42 and crm-42 are the same external_id).

Required string length: 1 - 191
billed_to
enum<string>
default:parent

parent: the sub-workspace is paid while the parent's subscription is. self: it is billed on its own.

Available options:
parent,
self
admin_emails
string<email>[]

Each gets an email invite to join the sub-workspace as an admin. Duplicates (ignoring case) are invited once. The parent's admins are admins already and need no invite.

Maximum array length: 10
Maximum string length: 191

Response

The sub-workspace already created with this external_id; nothing new was created and no invites were sent (invited_admins is empty).

object
string
required
Allowed value: "workspace"
id
string<uuid>
required
name
string
required
domain
string | null
required
external_id
string | null
required
billed_to
enum<string>
required
Available options:
parent,
self
parent_workspace
object
required
created_at
string<date-time>
required
provisioning
object
required
invited_admins
string[]

Only in the POST /workspaces response. The admin_emails invited by that request (empty when the request returned an existing workspace). An email that is already a member of the workspace is not invited.