{
"error": {
"code": "workspace_exists",
"message": "A workspace with this external_id already exists with a different name, domain or billed_to.",
"request_id": "req_8f2a",
"details": [
{
"field": "external_id",
"message": "is used by a workspace with different fields"
}
]
}
}
{
"error": {
"code": "rate_limited",
"message": "This workspace has reached its hourly limit for creating workspaces. Retry after Retry-After seconds.",
"request_id": "req_8f2a"
}
}
Workspaces
Create a sub-workspace
Creates a workspace under this API key’s workspace (its parent). Every workspace created
through the API is a sub-workspace of the key’s workspace; there is no way to create a
workspace without a parent, and the parent is not a request field.
Only Enterprise workspaces can create sub-workspaces, and a sub-workspace’s key cannot
(403 permission_denied).
A new sub-workspace is on the Starter plan and starts setting itself up right away
(provisioning.status).
Every admin of the parent workspace is an admin of the sub-workspace. admin_emails
also get an email invite to join it as admins.
billed_to: parent means the sub-workspace is paid while the parent’s subscription is;
self means it is billed on its own.
Send external_id (your own reference for the workspace) to make retries safe: a
create with an external_id already used under this parent returns that workspace with
200 when name, domain and billed_to match, and 409 workspace_exists when they
do not.
Each parent can create a limited number of sub-workspaces per hour
(429 rate_limited with Retry-After).
{
"error": {
"code": "workspace_exists",
"message": "A workspace with this external_id already exists with a different name, domain or billed_to.",
"request_id": "req_8f2a",
"details": [
{
"field": "external_id",
"message": "is used by a workspace with different fields"
}
]
}
}
{
"error": {
"code": "rate_limited",
"message": "This workspace has reached its hourly limit for creating workspaces. Retry after Retry-After seconds.",
"request_id": "req_8f2a"
}
}
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).
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).
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.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Avina","colors":{"primary":"#7D4CFF","light":"#7D4CFF","dark":"#7D4CFF"},"logo":{"light":"https://mintcdn.com/meshanalytics/CHGraskjmz9IeizP/Logo-WhiteText-M.png?fit=max\u0026auto=format\u0026n=CHGraskjmz9IeizP\u0026q=85\u0026s=7aa523624d78355a6b75f1d6262d0474","dark":"https://mintcdn.com/meshanalytics/CHGraskjmz9IeizP/Logo-XL.png?fit=max\u0026auto=format\u0026n=CHGraskjmz9IeizP\u0026q=85\u0026s=6bfd18e2e24fa291bdd523c7174162e2"},"favicon":"https://mintcdn.com/meshanalytics/CHGraskjmz9IeizP/Frame67(4).png?fit=max\u0026auto=format\u0026n=CHGraskjmz9IeizP\u0026q=85\u0026s=76dde5c41e23020a4b2017a8ef16be7e","styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"meshanalytics","hasAudioNarration":false,"actualSubdomain":"meshanalytics","customDomains":["docs.avina.io"],"gitSource":{"type":"github","owner":"mesh-interactive","repo":"mesh-docs","deployBranch":"avina","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae2c4836b539238c4bd8cdd","collectionId":"e9c98fcf-6a44-44ba-9982-fe31352bbd17","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae2c4836b539238c4bd8cdd"},"entitlements":{},"buildId":"6ae2c4836b539238c4bd8cdd","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"Integrations","count":42},{"language":"default","tag":"Overview","count":37},{"language":"default","tag":"API Reference","count":13},{"language":"default","tag":"Guides","count":11},{"language":"default","tag":"Audience Sources","count":11},{"language":"default","tag":"Automations","count":9},{"language":"default","tag":"Sample plays","count":8},{"language":"default","tag":"Web SDK","count":6},{"language":"default","tag":"Settings","count":5},{"language":"default","tag":"Built-in audiences","count":5}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/workspaces/create-a-sub-workspace","slug":"/api-reference/workspaces/create-a-sub-workspace","pageMetadata":{"title":"Create a sub-workspace","description":"Creates a workspace under this API key's workspace (its *parent*). Every workspace created\nthrough the API is a sub-workspace of the key's workspace; there is no way to create a\nworkspace without a parent, and the parent is not a request field.\n\n- Only Enterprise workspaces can create sub-workspaces, and a sub-workspace's key cannot\n (`403 permission_denied`).\n- A new sub-workspace is on the Starter plan and starts setting itself up right away\n (`provisioning.status`).\n- Every admin of the parent workspace is an admin of the sub-workspace. `admin_emails`\n also get an email invite to join it as admins.\n- `billed_to: parent` means the sub-workspace is paid while the parent's subscription is;\n `self` means it is billed on its own.\n- Send `external_id` (your own reference for the workspace) to make retries safe: a\n create with an `external_id` already used under this parent returns that workspace with\n `200` when `name`, `domain` and `billed_to` match, and `409 workspace_exists` when they\n do not.\n- Each parent can create a limited number of sub-workspaces per hour\n (`429 rate_limited` with `Retry-After`).\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /workspaces","href":"/api-reference/workspaces/create-a-sub-workspace","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n em: \"em\",\n li: \"li\",\n p: \"p\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Creates a workspace under this API key’s workspace (its \", _jsx(_components.em, {\n children: \"parent\"\n }), \"). Every workspace created\\nthrough the API is a sub-workspace of the key’s workspace; there is no way to create a\\nworkspace without a parent, and the parent is not a request field.\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Only Enterprise workspaces can create sub-workspaces, and a sub-workspace’s key cannot\\n(\", _jsx(_components.code, {\n children: \"403 permission_denied\"\n }), \").\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"A new sub-workspace is on the Starter plan and starts setting itself up right away\\n(\", _jsx(_components.code, {\n children: \"provisioning.status\"\n }), \").\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Every admin of the parent workspace is an admin of the sub-workspace. \", _jsx(_components.code, {\n children: \"admin_emails\"\n }), \"\\nalso get an email invite to join it as admins.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"billed_to: parent\"\n }), \" means the sub-workspace is paid while the parent’s subscription is;\\n\", _jsx(_components.code, {\n children: \"self\"\n }), \" means it is billed on its own.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Send \", _jsx(_components.code, {\n children: \"external_id\"\n }), \" (your own reference for the workspace) to make retries safe: a\\ncreate with an \", _jsx(_components.code, {\n children: \"external_id\"\n }), \" already used under this parent returns that workspace with\\n\", _jsx(_components.code, {\n children: \"200\"\n }), \" when \", _jsx(_components.code, {\n children: \"name\"\n }), \", \", _jsx(_components.code, {\n children: \"domain\"\n }), \" and \", _jsx(_components.code, {\n children: \"billed_to\"\n }), \" match, and \", _jsx(_components.code, {\n children: \"409 workspace_exists\"\n }), \" when they\\ndo not.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Each parent can create a limited number of sub-workspaces per hour\\n(\", _jsx(_components.code, {\n children: \"429 rate_limited\"\n }), \" with \", _jsx(_components.code, {\n children: \"Retry-After\"\n }), \").\"]\n }), \"\\n\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a sub-workspace","description":"Creates a workspace under this API key's workspace (its *parent*). Every workspace created\nthrough the API is a sub-workspace of the key's workspace; there is no way to create a\nworkspace without a parent, and the parent is not a request field.\n\n- Only Enterprise workspaces can create sub-workspaces, and a sub-workspace's key cannot\n (`403 permission_denied`).\n- A new sub-workspace is on the Starter plan and starts setting itself up right away\n (`provisioning.status`).\n- Every admin of the parent workspace is an admin of the sub-workspace. `admin_emails`\n also get an email invite to join it as admins.\n- `billed_to: parent` means the sub-workspace is paid while the parent's subscription is;\n `self` means it is billed on its own.\n- Send `external_id` (your own reference for the workspace) to make retries safe: a\n create with an `external_id` already used under this parent returns that workspace with\n `200` when `name`, `domain` and `billed_to` match, and `409 workspace_exists` when they\n do not.\n- Each parent can create a limited number of sub-workspaces per hour\n (`429 rate_limited` with `Retry-After`).\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /workspaces","href":"/api-reference/workspaces/create-a-sub-workspace","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Workspaces"],"operationId":"createWorkspace","summary":"Create a sub-workspace","description":"Creates a workspace under this API key's workspace (its *parent*). Every workspace created\nthrough the API is a sub-workspace of the key's workspace; there is no way to create a\nworkspace without a parent, and the parent is not a request field.\n\n- Only Enterprise workspaces can create sub-workspaces, and a sub-workspace's key cannot\n (`403 permission_denied`).\n- A new sub-workspace is on the Starter plan and starts setting itself up right away\n (`provisioning.status`).\n- Every admin of the parent workspace is an admin of the sub-workspace. `admin_emails`\n also get an email invite to join it as admins.\n- `billed_to: parent` means the sub-workspace is paid while the parent's subscription is;\n `self` means it is billed on its own.\n- Send `external_id` (your own reference for the workspace) to make retries safe: a\n create with an `external_id` already used under this parent returns that workspace with\n `200` when `name`, `domain` and `billed_to` match, and `409 workspace_exists` when they\n do not.\n- Each parent can create a limited number of sub-workspaces per hour\n (`429 rate_limited` with `Retry-After`).\n","parameters":["be9b1c90-b3b2-4ce5-96f1-b5336f5b0dae"],"requestBody":"555edf39-857c-4307-a1df-3cd1ac0c5c83","responses":{"200":"d11be50d-a5fe-4f4c-9ff7-06bde2af2ae2","201":"54d65ef2-9f2f-49fb-bde2-77ad5ab412c1","400":"af23e78a-e279-45a7-a3d3-c4f7d9f129a7","401":"d326115f-c794-4889-b236-8488a7106e56","403":"7519a0ca-1351-4fbf-ae77-726013b3cc48","409":"40e00913-6154-4f86-a5cd-8375344020a0","429":"d675318d-3546-4b65-9d23-b348b391424a"},"method":"post","type":"path","servers":["4193a43e-411e-4543-b81b-d6f1109f5886"],"security":["75feda54-aac7-4afc-838e-e33a36679bfe"],"path":"/workspaces","baseUrlOptions":["https://api.avina.io/v1"],"title":"Create a sub-workspace","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"be9b1c90-b3b2-4ce5-96f1-b5336f5b0dae":{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. Retrying with the same key returns the first response instead of repeating the action.","schema":{"type":"string","maxLength":255,"isRequired":false,"description":"Any unique string. Retrying with the same key returns the first response instead of repeating the action.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name","domain"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"isRequired":true,"uniqueKey":"name","typeLabel":"string"},"domain":{"type":"string","description":"The company's website or domain (`https://www.acme.com/about` or `acme.com`). Stored and returned as the bare domain (`acme.com`).","isRequired":true,"uniqueKey":"domain","typeLabel":"string"},"external_id":{"type":"string","minLength":1,"maxLength":191,"description":"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`).","uniqueKey":"external_id","typeLabel":"string"},"billed_to":{"type":"string","enum":["parent","self"],"default":"parent","description":"`parent`: the sub-workspace is paid while the parent's subscription is. `self`: it is billed on its own.","uniqueKey":"billed_to","typeLabel":"enum\u003cstring>"},"admin_emails":{"type":"array","maxItems":10,"items":{"type":"string","format":"email","maxLength":191,"uniqueKey":"admin_emails.items.[INDEX]","typeLabel":"string\u003cemail>"},"description":"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.","uniqueKey":"admin_emails","typeLabel":"string\u003cemail>[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"name":"Acme West","domain":"https://www.acmewest.com","external_id":"crm-account-4821","billed_to":"parent","admin_emails":["owner@acmewest.com"]},"examples":{"Example":{"title":"Example","value":{"name":"Acme West","domain":"https://www.acmewest.com","external_id":"crm-account-4821","billed_to":"parent","admin_emails":["owner@acmewest.com"]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"d11be50d-a5fe-4f4c-9ff7-06bde2af2ae2":{"description":"The sub-workspace already created with this `external_id`; nothing new was created and no invites were sent (`invited_admins` is empty).","content":{"application/json":{"schema":{"type":"object","required":["object","id","name","domain","external_id","billed_to","parent_workspace","created_at","provisioning"],"properties":{"object":{"type":"string","const":"workspace","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"domain":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"domain.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"domain.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"domain","typeLabel":"string | null"},"external_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"external_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"external_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"external_id","typeLabel":"string | null"},"billed_to":{"type":"string","enum":["parent","self"],"isRequired":true,"uniqueKey":"billed_to","typeLabel":"enum\u003cstring>"},"parent_workspace":{"type":"object","required":["name"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"parent_workspace.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"parent_workspace","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"provisioning":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["not_started","in_progress","completed"],"description":"Setting up the workspace's data takes a while after it is created. `not_started` means setup has not started yet; for a workspace created through the API, it starts again when the create is repeated with the same `external_id`. A workspace Avina staff placed under this workspace is `completed` once its own setup finished.","isRequired":true,"uniqueKey":"provisioning.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"provisioning","typeLabel":"object"},"invited_admins":{"type":"array","items":{"type":"string","uniqueKey":"invited_admins.items.[INDEX]","typeLabel":"string"},"description":"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.","uniqueKey":"invited_admins","typeLabel":"string[]"}},"example":{"object":"workspace","id":"3f2b8a52-7c1e-4d7a-9a51-2d8f0e6c4b10","name":"Acme West","domain":"acmewest.com","external_id":"crm-account-4821","billed_to":"parent","parent_workspace":{"name":"Acme"},"created_at":"2026-10-13T17:02:11Z","provisioning":{"status":"in_progress"},"invited_admins":["owner@acmewest.com"]},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"object":"workspace","id":"3f2b8a52-7c1e-4d7a-9a51-2d8f0e6c4b10","name":"Acme West","domain":"acmewest.com","external_id":"crm-account-4821","billed_to":"parent","parent_workspace":{"name":"Acme"},"created_at":"2026-10-13T17:02:11Z","provisioning":{"status":"in_progress"},"invited_admins":["owner@acmewest.com"]}}},"exampleType":"generated"}},"exampleType":"generated"},"54d65ef2-9f2f-49fb-bde2-77ad5ab412c1":{"description":"The created sub-workspace.","content":{"application/json":{"schema":{"type":"object","required":["object","id","name","domain","external_id","billed_to","parent_workspace","created_at","provisioning"],"properties":{"object":{"type":"string","const":"workspace","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"domain":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"domain.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"domain.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"domain","typeLabel":"string | null"},"external_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"external_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"external_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"external_id","typeLabel":"string | null"},"billed_to":{"type":"string","enum":["parent","self"],"isRequired":true,"uniqueKey":"billed_to","typeLabel":"enum\u003cstring>"},"parent_workspace":{"type":"object","required":["name"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"parent_workspace.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"parent_workspace","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"provisioning":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["not_started","in_progress","completed"],"description":"Setting up the workspace's data takes a while after it is created. `not_started` means setup has not started yet; for a workspace created through the API, it starts again when the create is repeated with the same `external_id`. A workspace Avina staff placed under this workspace is `completed` once its own setup finished.","isRequired":true,"uniqueKey":"provisioning.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"provisioning","typeLabel":"object"},"invited_admins":{"type":"array","items":{"type":"string","uniqueKey":"invited_admins.items.[INDEX]","typeLabel":"string"},"description":"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.","uniqueKey":"invited_admins","typeLabel":"string[]"}},"example":{"object":"workspace","id":"3f2b8a52-7c1e-4d7a-9a51-2d8f0e6c4b10","name":"Acme West","domain":"acmewest.com","external_id":"crm-account-4821","billed_to":"parent","parent_workspace":{"name":"Acme"},"created_at":"2026-10-13T17:02:11Z","provisioning":{"status":"in_progress"},"invited_admins":["owner@acmewest.com"]},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"object":"workspace","id":"3f2b8a52-7c1e-4d7a-9a51-2d8f0e6c4b10","name":"Acme West","domain":"acmewest.com","external_id":"crm-account-4821","billed_to":"parent","parent_workspace":{"name":"Acme"},"created_at":"2026-10-13T17:02:11Z","provisioning":{"status":"in_progress"},"invited_admins":["owner@acmewest.com"]}}},"exampleType":"generated"}},"exampleType":"generated"},"af23e78a-e279-45a7-a3d3-c4f7d9f129a7":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["invalid_request","invalid_api_key","permission_denied","not_found","workspace_exists","idempotency_key_reused","rate_limited","internal_error","timeout"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"invalid_request","message":"foo is not a recognized field","request_id":"req_8f2a","details":[{"field":"foo","message":"is not a recognized field"}]}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"invalid_request","message":"foo is not a recognized field","request_id":"req_8f2a","details":[{"field":"foo","message":"is not a recognized field"}]}}}},"exampleType":"examples"}},"exampleType":"examples"},"d326115f-c794-4889-b236-8488a7106e56":{"description":"The API key is missing, invalid or revoked.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["invalid_request","invalid_api_key","permission_denied","not_found","workspace_exists","idempotency_key_reused","rate_limited","internal_error","timeout"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"invalid_api_key","message":"The API key is invalid or revoked.","request_id":"req_8f2a"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"invalid_api_key","message":"The API key is invalid or revoked.","request_id":"req_8f2a"}}}},"exampleType":"examples"}},"exampleType":"examples"},"7519a0ca-1351-4fbf-ae77-726013b3cc48":{"description":"This API key's workspace may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["invalid_request","invalid_api_key","permission_denied","not_found","workspace_exists","idempotency_key_reused","rate_limited","internal_error","timeout"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"permission_denied","message":"Only Enterprise workspaces can create sub-workspaces.","request_id":"req_8f2a"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"permission_denied","message":"Only Enterprise workspaces can create sub-workspaces.","request_id":"req_8f2a"}}}},"exampleType":"examples"}},"exampleType":"examples"},"40e00913-6154-4f86-a5cd-8375344020a0":{"description":"`workspace_exists`: the `external_id` already belongs to a sub-workspace with a different\n`name`, `domain` or `billed_to`. `idempotency_key_reused`: the idempotency key was reused with a different\nbody, or its first request is still running.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["invalid_request","invalid_api_key","permission_denied","not_found","workspace_exists","idempotency_key_reused","rate_limited","internal_error","timeout"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"workspace_exists","message":"A workspace with this external_id already exists with a different name, domain or billed_to.","request_id":"req_8f2a","details":[{"field":"external_id","message":"is used by a workspace with different fields"}]}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"workspace_exists","message":"A workspace with this external_id already exists with a different name, domain or billed_to.","request_id":"req_8f2a","details":[{"field":"external_id","message":"is used by a workspace with different fields"}]}}}},"exampleType":"examples"}},"exampleType":"examples"},"d675318d-3546-4b65-9d23-b348b391424a":{"description":"Too many requests (retry after `RateLimit-Reset` seconds), or this workspace has created\nas many sub-workspaces as it may this hour (retry after `Retry-After` seconds).\n","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the hourly sub-workspace limit resets."},"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["invalid_request","invalid_api_key","permission_denied","not_found","workspace_exists","idempotency_key_reused","rate_limited","internal_error","timeout"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"rate_limited","message":"This workspace has reached its hourly limit for creating workspaces. Retry after Retry-After seconds.","request_id":"req_8f2a"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"rate_limited","message":"This workspace has reached its hourly limit for creating workspaces. Retry after Retry-After seconds.","request_id":"req_8f2a"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"75feda54-aac7-4afc-838e-e33a36679bfe":{"apiKey":{"type":"http","scheme":"bearer","description":"Workspace API key from the Avina dashboard (Settings → API keys).","scopes":[],"schemeName":"apiKey"}}},"servers":{"4193a43e-411e-4543-b81b-d6f1109f5886":{"url":"https://api.avina.io/v1","description":"Production (proposed domain)"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Workspace API key from the Avina dashboard (Settings → API keys).","scopes":[],"schemeName":"apiKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Workspace API key from the Avina dashboard (Settings → API keys).","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"apiKey","name":"Authorization"}],"title":"apiKey"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"meshanalytics","siteName":"Avina","title":"Create a sub-workspace - Avina","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-22T20:50:36.269Z","originalFileLocation":"api-reference/workspaces/create-a-sub-workspace.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a workspace under this API key\u0026#x27;s workspace (its parent). Every workspace created through the API is a sub-workspace of the key\u0026#x27;s workspace; there is no way to create a workspace without a parent, and the parent is not a request field. - Only Enterprise workspaces can create sub-workspaces, and a sub-workspace\u0026#x27;s key cannot (403 permission_denied). - A new sub-workspace is on the Starter plan and starts setting itself up right away (provisioning.status). - Every admin of the parent workspace is an admin of the sub-workspace. admin_emails also get an email invite to join it as admins. - billed_to: parent means the sub-workspace is paid while the parent\u0026#x27;s subscription is; self means it is billed on its own. - Send external_id (your own reference for the workspace) to make retries safe: a create with an external_id already used under this parent returns that workspace with 200 when name, domain and billed_to match, and 409 workspace_exists when they do not. - Each parent can create a limited number of sub-workspaces per hour (429 rate_limited with Retry-After).\">\u003cmeta data-mint-head name=\"application-name\" content=\"Avina\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/meshanalytics/dWc6HIA_p-N4qMIF/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/meshanalytics/dWc6HIA_p-N4qMIF/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/meshanalytics/dWc6HIA_p-N4qMIF/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/meshanalytics/dWc6HIA_p-N4qMIF/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/meshanalytics/dWc6HIA_p-N4qMIF/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/meshanalytics/dWc6HIA_p-N4qMIF/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/meshanalytics/dWc6HIA_p-N4qMIF/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/meshanalytics/dWc6HIA_p-N4qMIF/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/meshanalytics/dWc6HIA_p-N4qMIF/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a sub-workspace - Avina\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a workspace under this API key\u0026#x27;s workspace (its parent). Every workspace created through the API is a sub-workspace of the key\u0026#x27;s workspace; there is no way to create a workspace without a parent, and the parent is not a request field. - Only Enterprise workspaces can create sub-workspaces, and a sub-workspace\u0026#x27;s key cannot (403 permission_denied). - A new sub-workspace is on the Starter plan and starts setting itself up right away (provisioning.status). - Every admin of the parent workspace is an admin of the sub-workspace. admin_emails also get an email invite to join it as admins. - billed_to: parent means the sub-workspace is paid while the parent\u0026#x27;s subscription is; self means it is billed on its own. - Send external_id (your own reference for the workspace) to make retries safe: a create with an external_id already used under this parent returns that workspace with 200 when name, domain and billed_to match, and 409 workspace_exists when they do not. - Each parent can create a limited number of sub-workspaces per hour (429 rate_limited with Retry-After).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Avina\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.avina.io/api-reference/workspaces/create-a-sub-workspace\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://meshanalytics.mintlify.site/_mintlify/api/og/v2?division=Workspaces\u0026amp;title=Create+a+sub-workspace\u0026amp;description=Creates+a+workspace+under+this+API+key%27s+workspace+%28its+*parent*%29.+Every+workspace+created%0Athrough+the+API+is+a+sub-workspace+of+the+key%27s+workspace%3B+there+is+n\u0026amp;theme=571433d52b5d408768732404\u0026amp;signature=c80bee79598e164540eded64dc8868ef0ade1eba6d2fd94f64d4b9af6d1cc6fc\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a sub-workspace - Avina\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a workspace under this API key\u0026#x27;s workspace (its parent). Every workspace created through the API is a sub-workspace of the key\u0026#x27;s workspace; there is no way to create a workspace without a parent, and the parent is not a request field. - Only Enterprise workspaces can create sub-workspaces, and a sub-workspace\u0026#x27;s key cannot (403 permission_denied). - A new sub-workspace is on the Starter plan and starts setting itself up right away (provisioning.status). - Every admin of the parent workspace is an admin of the sub-workspace. admin_emails also get an email invite to join it as admins. - billed_to: parent means the sub-workspace is paid while the parent\u0026#x27;s subscription is; self means it is billed on its own. - Send external_id (your own reference for the workspace) to make retries safe: a create with an external_id already used under this parent returns that workspace with 200 when name, domain and billed_to match, and 409 workspace_exists when they do not. - Each parent can create a limited number of sub-workspaces per hour (429 rate_limited with Retry-After).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://meshanalytics.mintlify.site/_mintlify/api/og/v2?division=Workspaces\u0026amp;title=Create+a+sub-workspace\u0026amp;description=Creates+a+workspace+under+this+API+key%27s+workspace+%28its+*parent*%29.+Every+workspace+created%0Athrough+the+API+is+a+sub-workspace+of+the+key%27s+workspace%3B+there+is+n\u0026amp;theme=571433d52b5d408768732404\u0026amp;signature=c80bee79598e164540eded64dc8868ef0ade1eba6d2fd94f64d4b9af6d1cc6fc\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/meshanalytics/dWc6HIA_p-N4qMIF/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Avina\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7D4CFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.avina.io/api-reference/workspaces/create-a-sub-workspace\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/workspaces/create-a-sub-workspace.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.avina.io/#organization\",\"name\":\"Avina\",\"url\":\"https://docs.avina.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/meshanalytics/CHGraskjmz9IeizP/Logo-WhiteText-M.png?fit=max\u0026auto=format\u0026n=CHGraskjmz9IeizP\u0026q=85\u0026s=7aa523624d78355a6b75f1d6262d0474\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.avina.io#website\",\"name\":\"Avina\",\"url\":\"https://docs.avina.io\",\"publisher\":{\"@id\":\"https://docs.avina.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.avina.io/api-reference/workspaces/create-a-sub-workspace#webpage\",\"url\":\"https://docs.avina.io/api-reference/workspaces/create-a-sub-workspace\",\"name\":\"Create a sub-workspace\",\"description\":\"Creates a workspace under this API key's workspace (its parent). Every workspace created through the API is a sub-workspace of the key's workspace; there is no way to create a workspace without a parent, and the parent is not a request field. - Only Enterprise workspaces can create sub-workspaces, and a sub-workspace's key cannot (403 permission_denied). - A new sub-workspace is on the Starter plan and starts setting itself up right away (provisioning.status). - Every admin of the parent workspace is an admin of the sub-workspace. admin_emails also get an email invite to join it as admins. - billed_to: parent means the sub-workspace is paid while the parent's subscription is; self means it is billed on its own. - Send external_id (your own reference for the workspace) to make retries safe: a create with an external_id already used under this parent returns that workspace with 200 when name, domain and billed_to match, and 409 workspace_exists when they do not. - Each parent can create a limited number of sub-workspaces per hour (429 rate_limited with Retry-After).\",\"dateModified\":\"2026-10-22T20:50:36.269Z\",\"isPartOf\":{\"@id\":\"https://docs.avina.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.avina.io/api-reference/workspaces/create-a-sub-workspace#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.avina.io/api-reference/workspaces/create-a-sub-workspace#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Workspaces\",\"item\":\"https://docs.avina.io/api-reference/workspaces/list-sub-workspaces\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a sub-workspace\",\"item\":\"https://docs.avina.io/api-reference/workspaces/create-a-sub-workspace\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.avina.io/api-reference/workspaces/create-a-sub-workspace#apireference\",\"headline\":\"Create a sub-workspace\",\"name\":\"Create a sub-workspace\",\"description\":\"Creates a workspace under this API key's workspace (its parent). Every workspace created through the API is a sub-workspace of the key's workspace; there is no way to create a workspace without a parent, and the parent is not a request field. - Only Enterprise workspaces can create sub-workspaces, and a sub-workspace's key cannot (403 permission_denied). - A new sub-workspace is on the Starter plan and starts setting itself up right away (provisioning.status). - Every admin of the parent workspace is an admin of the sub-workspace. admin_emails also get an email invite to join it as admins. - billed_to: parent means the sub-workspace is paid while the parent's subscription is; self means it is billed on its own. - Send external_id (your own reference for the workspace) to make retries safe: a create with an external_id already used under this parent returns that workspace with 200 when name, domain and billed_to match, and 409 workspace_exists when they do not. - Each parent can create a limited number of sub-workspaces per hour (429 rate_limited with Retry-After).\",\"url\":\"https://docs.avina.io/api-reference/workspaces/create-a-sub-workspace\",\"mainEntityOfPage\":{\"@id\":\"https://docs.avina.io/api-reference/workspaces/create-a-sub-workspace#webpage\"},\"dateModified\":\"2026-10-22T20:50:36.269Z\",\"publisher\":{\"@id\":\"https://docs.avina.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.avina.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Avina\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Avina","nav":{"global":null,"tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":"/introduction"}]},{"tab":"Web SDK","pages":[{"title":"Web SDK","href":"/sdk-reference/introduction"}]},{"tab":"API Reference","groups":[{"group":"Getting started","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Quickstart","href":"/api-reference/quickstart"},{"title":"Sub-workspaces","href":"/api-reference/sub-workspaces"}]},{"group":"Account","pages":[{"title":"Get the workspace this API key belongs to","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /me","href":"/api-reference/account/get-the-workspace-this-api-key-belongs-to"},{"title":"Get signal-credit usage for the current billing period","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /usage","href":"/api-reference/account/get-signal-credit-usage-for-the-current-billing-period"}]},{"group":"Personas","pages":[{"title":"List personas","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /personas","href":"/api-reference/personas/list-personas"},{"title":"Create a persona","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /personas","href":"/api-reference/personas/create-a-persona"},{"title":"Get a persona","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /personas/{persona_id}","href":"/api-reference/personas/get-a-persona"},{"title":"Update a persona","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /personas/{persona_id}","href":"/api-reference/personas/update-a-persona"},{"title":"Delete a persona","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /personas/{persona_id}","href":"/api-reference/personas/delete-a-persona"}]},{"group":"Workspaces","pages":[{"title":"List sub-workspaces","description":"The sub-workspaces of this API key's workspace, newest first. This includes workspaces Avina staff placed under it, which usually have no `external_id`.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /workspaces","href":"/api-reference/workspaces/list-sub-workspaces"},{"title":"Create a sub-workspace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /workspaces","href":"/api-reference/workspaces/create-a-sub-workspace"},{"title":"Get a sub-workspace","description":null,"deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /workspaces/{workspace_id}","href":"/api-reference/workspaces/get-a-sub-workspace"}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/introduction"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/writing-signals"}]},{"tab":"Support","pages":[{"title":"Support","href":"/support/troubleshooting"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Create a sub-workspace - Avina","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Myd8dsju.js","utils-C2HkQgW0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-8rSppmTv.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B6MjiCFm.js","snippetPresets-DwrSAONL.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-1-a5UQKQ.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C541m7wZ.js","shallow-CWELCZ77.js","getApiPlaygroundDisplay-CTo5Zn03.js","CodeSnippet-D--dzvnl.js","CodeSnippets-DM3cXEDh.js","Page-CxAy5y67.js","getPastedJson-C-VECgcL.js","icon-BPq2-Mg3.js","MethodPill-D9J5cUHd.js","DuplicateIcon-BqHaxUnD.js","createIcon-CIbcZHp9.js","DynamicMarkdown-BKiHAm_d.js","SectionHeading-DstQXt3H.js","axios-vUo_bRtp.js","Markdown-CpxgzsKA.js","clsx-C5EfhVm0.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CJ9Oly2E.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Mk6P3qvh.js"]}