{ "error": "Organization with externalId LKS-0042 already exists"}
Creates a clinic in your partner account. The person who created the partner key becomes the clinic’s owner and a member of it.The new clinic has no agents or phone numbers yet. Those are set up in the AlloMia dashboard.Requires a partner key whose creator is the partner account owner or a Tenant Admin. See Authentication.
Headers
string
required
Bearer followed by your partner key, for example Bearer sk-….
string
required
application/json
Body
string
required
Clinic name, 3 to 50 characters.
string
required
Clinic email address. Must be a valid email address.
string
required
Street address. 1 to 255 characters.
string
required
City. 1 to 255 characters.
string
required
State or province. 1 to 255 characters.
string
required
Postal or ZIP code. 1 to 255 characters.
string
required
Country. 1 to 255 characters. Stored as you send it, for example CA.
string
required
Clinic contact number. 1 to 255 characters. Stored as you send it; we suggest E.164 format, for example +15145550100.
string
required
The clinic’s time zone. Use an IANA time zone name, for example America/Toronto or America/Vancouver. Only letters, _ and / are accepted, so names with a hyphen or a digit are rejected. The API doesn’t check that the zone exists, so double-check the spelling.
string
Your own ID for the clinic, up to 255 characters. Stored only when AlloMia has set up an integration for your partner account; otherwise it is accepted and ignored. When stored, it must not already be used by another clinic, and AlloMia also creates the clinic’s empty metadata record, so you can then call Update organization metadata. See Metadata.
Today, a body that breaks these rules returns 500 with An unexpected error occurred. Please try again later., not a 400 that names the field. Check the body on your side before you send it.
Response
Returns 200 with the new clinic.
string
The new clinic’s organization ID (UUID). Store it: you need it for every other organization and call endpoint.
string
Your partner account’s ID.
string
Clinic name.
string
Clinic email address.
string
ID of the clinic’s owner: the person who created the partner key.
string
Street address.
string
City.
string
State or province.
string
Postal or ZIP code.
string
Country.
string
Clinic contact number.
string
Time zone name.
boolean
Always true for a new clinic.
string
ID of the person who created the clinic: the person who created the partner key.
string
When the clinic was created, ISO 8601 in UTC.
The response doesn’t include externalId. It may include other fields not listed here; don’t build on them.
Errors
Status
Body
When
400
{"error": "Invalid JSON format. Please check your request body for proper JSON syntax.", "details": "Malformed JSON - ensure proper syntax with correct brackets, commas, and quoted keys"}
The body isn’t valid JSON.
401
{"error": "Invalid authorization"}
The key is a clinic key. Use a partner key.
401
{"error": "Unauthorized"}
The key is missing, malformed, unknown or deleted.
403
{"error": "Insufficient permissions"}
The key’s creator isn’t the partner account owner or a Tenant Admin.
409
{"error": "Organization with externalId LKS-0042 already exists"}
{"error": "An unexpected error occurred. Please try again later."}
The body broke a validation rule, or an unexpected server error happened.
Clinic names don’t have to be unique, so a blind retry can create a duplicate. After a 500 or a timeout, call List organizations with search set to the clinic’s name before you send the request again.
{ "error": "Organization with externalId LKS-0042 already exists"}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AlloMia API Documentation","colors":{"primary":"#0A74DA","light":"#4299E1","dark":"#2B6CB0"},"logo":{"light":"https://mintcdn.com/allomia-dcfc501a/63lasYG0rgJFLjIc/logo/light.svg?fit=max\u0026auto=format\u0026n=63lasYG0rgJFLjIc\u0026q=85\u0026s=900c98f2940cc700233cd2eb0805d036","dark":"https://mintcdn.com/allomia-dcfc501a/63lasYG0rgJFLjIc/logo/dark.svg?fit=max\u0026auto=format\u0026n=63lasYG0rgJFLjIc\u0026q=85\u0026s=6e7681291bfbca9de051c56e2e6039dc"},"favicon":"https://mintcdn.com/allomia-dcfc501a/RwrqresnfxaDCl_q/favicon.svg?fit=max\u0026auto=format\u0026n=RwrqresnfxaDCl_q\u0026q=85\u0026s=06dea03ef4389e69a3728e60c558cad9","api":{"mdx":{"server":"https://allomia.com"}},"navbar":{"links":[{"href":"https://allomia.com/en/help-center","label":"Help Center"},{"href":"mailto:support@medfarsolutions.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://allomia.com/en/login"}},"footer":{"socials":{"x":"https://x.com/allomia_ai","youtube":"https://youtube.com/@allomia_ai","linkedin":"https://linkedin.com/company/allomia"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Help Center","icon":"life-ring","href":"https://allomia.com/en/help-center"},{"anchor":"AlloMia Website","icon":"globe","href":"https://allomia.com"},{"anchor":"Contact Support","icon":"envelope","href":"mailto:support@medfarsolutions.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"allomia-dcfc501a","hasAudioNarration":false,"actualSubdomain":"allomia-dcfc501a","customDomains":["docs.allomia.com"],"gitSource":{"type":"github","owner":"allomia","repo":"allomia-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae4245919da8bc2fe38177f","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Organizations (partner keys)","count":7},{"language":"default","tag":"Get started","count":5},{"language":"default","tag":"Outbound calls","count":4},{"language":"default","tag":"Calls","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"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":"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":"editor-metadata","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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":".mintlify-logo{transform:scale(1.5);transform-origin:left center}nav{padding-top:0.5rem;padding-bottom:0.5rem}"}],"page":{"pagePath":"api-reference/endpoint/create-organization","slug":"/api-reference/endpoint/create-organization","pageMetadata":{"title":"Create organization","api":"POST /api/organization","description":"Adds a new clinic to your partner account.","href":"/api-reference/endpoint/create-organization"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Adds a new clinic to your partner account.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Heading,ParamField,ResponseField,Table,Tip,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Creates a clinic in your partner account. The person who created the partner key becomes the clinic’s owner and a member of it.`}),`\n`,_jsx(_components.p,{children:`The new clinic has no agents or phone numbers yet. Those are set up in the AlloMia dashboard.`}),`\n`,_jsxs(_components.p,{children:[`Requires a `,_jsx(_components.strong,{children:`partner key`}),` whose creator is the partner account owner or a `,_jsx(_components.strong,{children:`Tenant Admin`}),`. See `,_jsx(_components.a,{href:`/api-reference/authentication`,children:`Authentication`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Bearer`}),` followed by your partner key, for example `,_jsx(_components.code,{children:`Bearer sk-…`}),`.`]})}),`\n`,_jsx(ParamField,{header:`Content-Type`,type:`string`,required:true,id:`param-content-type`,children:_jsx(_components.p,{children:_jsx(_components.code,{children:`application/json`})})}),`\n`,_jsx(Heading,{level:`3`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`Clinic name, 3 to 50 characters.`})}),`\n`,_jsx(ParamField,{body:`email`,type:`string`,required:true,id:`param-email`,children:_jsx(_components.p,{children:`Clinic email address. Must be a valid email address.`})}),`\n`,_jsx(ParamField,{body:`address`,type:`string`,required:true,id:`param-address`,children:_jsx(_components.p,{children:`Street address. 1 to 255 characters.`})}),`\n`,_jsx(ParamField,{body:`city`,type:`string`,required:true,id:`param-city`,children:_jsx(_components.p,{children:`City. 1 to 255 characters.`})}),`\n`,_jsx(ParamField,{body:`stateProvince`,type:`string`,required:true,id:`param-state-province`,children:_jsx(_components.p,{children:`State or province. 1 to 255 characters.`})}),`\n`,_jsx(ParamField,{body:`postalCode`,type:`string`,required:true,id:`param-postal-code`,children:_jsx(_components.p,{children:`Postal or ZIP code. 1 to 255 characters.`})}),`\n`,_jsx(ParamField,{body:`country`,type:`string`,required:true,id:`param-country`,children:_jsxs(_components.p,{children:[`Country. 1 to 255 characters. Stored as you send it, for example `,_jsx(_components.code,{children:`CA`}),`.`]})}),`\n`,_jsx(ParamField,{body:`phoneNumber`,type:`string`,required:true,id:`param-phone-number`,children:_jsxs(_components.p,{children:[`Clinic contact number. 1 to 255 characters. Stored as you send it; we suggest E.164 format, for example `,_jsx(_components.code,{children:`+15145550100`}),`.`]})}),`\n`,_jsx(ParamField,{body:`timezone`,type:`string`,required:true,id:`param-timezone`,children:_jsxs(_components.p,{children:[`The clinic’s time zone. Use an IANA time zone name, for example `,_jsx(_components.code,{children:`America/Toronto`}),` or `,_jsx(_components.code,{children:`America/Vancouver`}),`. Only letters, `,_jsx(_components.code,{children:`_`}),` and `,_jsx(_components.code,{children:`/`}),` are accepted, so names with a hyphen or a digit are rejected. The API doesn’t check that the zone exists, so double-check the spelling.`]})}),`\n`,_jsx(ParamField,{body:`externalId`,type:`string`,id:`param-external-id`,children:_jsxs(_components.p,{children:[`Your own ID for the clinic, up to 255 characters. Stored only when AlloMia has set up an integration for your partner account; otherwise it is accepted and ignored. When stored, it must not already be used by another clinic, and AlloMia also creates the clinic’s empty metadata record, so you can then call `,_jsx(_components.a,{href:`/api-reference/endpoint/update-organization-metadata`,children:`Update organization metadata`}),`. See `,_jsx(_components.a,{href:`/api-reference/organization#metadata`,children:`Metadata`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Today, a body that breaks these rules returns `,_jsx(_components.code,{children:`500`}),` with `,_jsx(_components.code,{children:`An unexpected error occurred. Please try again later.`}),`, not a `,_jsx(_components.code,{children:`400`}),` that names the field. Check the body on your side before you send it.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`200`}),` with the new clinic.`]}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`The new clinic’s organization ID (UUID). Store it: you need it for every other organization and call endpoint.`})}),`\n`,_jsx(ResponseField,{name:`tenantId`,type:`string`,id:`param-tenant-id`,children:_jsx(_components.p,{children:`Your partner account’s ID.`})}),`\n`,_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`Clinic name.`})}),`\n`,_jsx(ResponseField,{name:`email`,type:`string`,id:`param-email-1`,children:_jsx(_components.p,{children:`Clinic email address.`})}),`\n`,_jsx(ResponseField,{name:`ownerId`,type:`string`,id:`param-owner-id`,children:_jsx(_components.p,{children:`ID of the clinic’s owner: the person who created the partner key.`})}),`\n`,_jsx(ResponseField,{name:`address`,type:`string`,id:`param-address-1`,children:_jsx(_components.p,{children:`Street address.`})}),`\n`,_jsx(ResponseField,{name:`city`,type:`string`,id:`param-city-1`,children:_jsx(_components.p,{children:`City.`})}),`\n`,_jsx(ResponseField,{name:`stateProvince`,type:`string`,id:`param-state-province-1`,children:_jsx(_components.p,{children:`State or province.`})}),`\n`,_jsx(ResponseField,{name:`postalCode`,type:`string`,id:`param-postal-code-1`,children:_jsx(_components.p,{children:`Postal or ZIP code.`})}),`\n`,_jsx(ResponseField,{name:`country`,type:`string`,id:`param-country-1`,children:_jsx(_components.p,{children:`Country.`})}),`\n`,_jsx(ResponseField,{name:`phoneNumber`,type:`string`,id:`param-phone-number-1`,children:_jsx(_components.p,{children:`Clinic contact number.`})}),`\n`,_jsx(ResponseField,{name:`timezone`,type:`string`,id:`param-timezone-1`,children:_jsx(_components.p,{children:`Time zone name.`})}),`\n`,_jsx(ResponseField,{name:`isActive`,type:`boolean`,id:`param-is-active`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`true`}),` for a new clinic.`]})}),`\n`,_jsx(ResponseField,{name:`createdBy`,type:`string`,id:`param-created-by`,children:_jsx(_components.p,{children:`ID of the person who created the clinic: the person who created the partner key.`})}),`\n`,_jsx(ResponseField,{name:`createdAt`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`When the clinic was created, ISO 8601 in UTC.`})}),`\n`,_jsxs(_components.p,{children:[`The response doesn’t include `,_jsx(_components.code,{children:`externalId`}),`. It may include other fields not listed here; don’t build on them.`]}),`\n`,_jsx(Heading,{level:`3`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Body`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Invalid JSON format. Please check your request body for proper JSON syntax.\", \"details\": \"Malformed JSON - ensure proper syntax with correct brackets, commas, and quoted keys\"}`})}),_jsx(_components.td,{children:`The body isn’t valid JSON.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Invalid authorization\"}`})}),_jsx(_components.td,{children:`The key is a clinic key. Use a partner key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Unauthorized\"}`})}),_jsx(_components.td,{children:`The key is missing, malformed, unknown or deleted.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Insufficient permissions\"}`})}),_jsx(_components.td,{children:`The key’s creator isn’t the partner account owner or a Tenant Admin.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Organization with externalId LKS-0042 already exists\"}`})}),_jsxs(_components.td,{children:[`Another clinic already uses this `,_jsx(_components.code,{children:`externalId`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Too many requests\", \"retryAfter\": 60}`})}),_jsxs(_components.td,{children:[`See `,_jsx(_components.a,{href:`/api-reference/rate-limits`,children:`Rate limits`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"An unexpected error occurred. Please try again later.\"}`})}),_jsx(_components.td,{children:`The body broke a validation rule, or an unexpected server error happened.`})]})]})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Clinic names don’t have to be unique, so a blind retry can create a duplicate. After a `,_jsx(_components.code,{children:`500`}),` or a timeout, call `,_jsx(_components.a,{href:`/api-reference/endpoint/list-organizations`,children:`List organizations`}),` with `,_jsx(_components.code,{children:`search`}),` set to the clinic’s name before you send the request again.`]})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/api-reference/errors`,children:`Errors`}),` for the full list.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create organization","api":"POST /api/organization","description":"Adds a new clinic to your partner account.","href":"/api-reference/endpoint/create-organization"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField,RequestExample,ResponseExample,ResponseField,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Creates a clinic in your partner account. The person who created the partner key becomes the clinic’s owner and a member of it.`}),`\n`,_jsx(_components.p,{children:`The new clinic has no agents or phone numbers yet. Those are set up in the AlloMia dashboard.`}),`\n`,_jsxs(_components.p,{children:[`Requires a `,_jsx(_components.strong,{children:`partner key`}),` whose creator is the partner account owner or a `,_jsx(_components.strong,{children:`Tenant Admin`}),`. See `,_jsx(_components.a,{href:`/api-reference/authentication`,children:`Authentication`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Bearer`}),` followed by your partner key, for example `,_jsx(_components.code,{children:`Bearer sk-…`}),`.`]})}),`\n`,_jsx(ParamField,{header:`Content-Type`,type:`string`,required:true,id:`param-content-type`,children:_jsx(_components.p,{children:_jsx(_components.code,{children:`application/json`})})}),`\n`,_jsx(Heading,{level:`3`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`Clinic name, 3 to 50 characters.`})}),`\n`,_jsx(ParamField,{body:`email`,type:`string`,required:true,id:`param-email`,children:_jsx(_components.p,{children:`Clinic email address. Must be a valid email address.`})}),`\n`,_jsx(ParamField,{body:`address`,type:`string`,required:true,id:`param-address`,children:_jsx(_components.p,{children:`Street address. 1 to 255 characters.`})}),`\n`,_jsx(ParamField,{body:`city`,type:`string`,required:true,id:`param-city`,children:_jsx(_components.p,{children:`City. 1 to 255 characters.`})}),`\n`,_jsx(ParamField,{body:`stateProvince`,type:`string`,required:true,id:`param-state-province`,children:_jsx(_components.p,{children:`State or province. 1 to 255 characters.`})}),`\n`,_jsx(ParamField,{body:`postalCode`,type:`string`,required:true,id:`param-postal-code`,children:_jsx(_components.p,{children:`Postal or ZIP code. 1 to 255 characters.`})}),`\n`,_jsx(ParamField,{body:`country`,type:`string`,required:true,id:`param-country`,children:_jsxs(_components.p,{children:[`Country. 1 to 255 characters. Stored as you send it, for example `,_jsx(_components.code,{children:`CA`}),`.`]})}),`\n`,_jsx(ParamField,{body:`phoneNumber`,type:`string`,required:true,id:`param-phone-number`,children:_jsxs(_components.p,{children:[`Clinic contact number. 1 to 255 characters. Stored as you send it; we suggest E.164 format, for example `,_jsx(_components.code,{children:`+15145550100`}),`.`]})}),`\n`,_jsx(ParamField,{body:`timezone`,type:`string`,required:true,id:`param-timezone`,children:_jsxs(_components.p,{children:[`The clinic’s time zone. Use an IANA time zone name, for example `,_jsx(_components.code,{children:`America/Toronto`}),` or `,_jsx(_components.code,{children:`America/Vancouver`}),`. Only letters, `,_jsx(_components.code,{children:`_`}),` and `,_jsx(_components.code,{children:`/`}),` are accepted, so names with a hyphen or a digit are rejected. The API doesn’t check that the zone exists, so double-check the spelling.`]})}),`\n`,_jsx(ParamField,{body:`externalId`,type:`string`,id:`param-external-id`,children:_jsxs(_components.p,{children:[`Your own ID for the clinic, up to 255 characters. Stored only when AlloMia has set up an integration for your partner account; otherwise it is accepted and ignored. When stored, it must not already be used by another clinic, and AlloMia also creates the clinic’s empty metadata record, so you can then call `,_jsx(_components.a,{href:`/api-reference/endpoint/update-organization-metadata`,children:`Update organization metadata`}),`. See `,_jsx(_components.a,{href:`/api-reference/organization#metadata`,children:`Metadata`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Today, a body that breaks these rules returns `,_jsx(_components.code,{children:`500`}),` with `,_jsx(_components.code,{children:`An unexpected error occurred. Please try again later.`}),`, not a `,_jsx(_components.code,{children:`400`}),` that names the field. Check the body on your side before you send it.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`200`}),` with the new clinic.`]}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`The new clinic’s organization ID (UUID). Store it: you need it for every other organization and call endpoint.`})}),`\n`,_jsx(ResponseField,{name:`tenantId`,type:`string`,id:`param-tenant-id`,children:_jsx(_components.p,{children:`Your partner account’s ID.`})}),`\n`,_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`Clinic name.`})}),`\n`,_jsx(ResponseField,{name:`email`,type:`string`,id:`param-email-1`,children:_jsx(_components.p,{children:`Clinic email address.`})}),`\n`,_jsx(ResponseField,{name:`ownerId`,type:`string`,id:`param-owner-id`,children:_jsx(_components.p,{children:`ID of the clinic’s owner: the person who created the partner key.`})}),`\n`,_jsx(ResponseField,{name:`address`,type:`string`,id:`param-address-1`,children:_jsx(_components.p,{children:`Street address.`})}),`\n`,_jsx(ResponseField,{name:`city`,type:`string`,id:`param-city-1`,children:_jsx(_components.p,{children:`City.`})}),`\n`,_jsx(ResponseField,{name:`stateProvince`,type:`string`,id:`param-state-province-1`,children:_jsx(_components.p,{children:`State or province.`})}),`\n`,_jsx(ResponseField,{name:`postalCode`,type:`string`,id:`param-postal-code-1`,children:_jsx(_components.p,{children:`Postal or ZIP code.`})}),`\n`,_jsx(ResponseField,{name:`country`,type:`string`,id:`param-country-1`,children:_jsx(_components.p,{children:`Country.`})}),`\n`,_jsx(ResponseField,{name:`phoneNumber`,type:`string`,id:`param-phone-number-1`,children:_jsx(_components.p,{children:`Clinic contact number.`})}),`\n`,_jsx(ResponseField,{name:`timezone`,type:`string`,id:`param-timezone-1`,children:_jsx(_components.p,{children:`Time zone name.`})}),`\n`,_jsx(ResponseField,{name:`isActive`,type:`boolean`,id:`param-is-active`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`true`}),` for a new clinic.`]})}),`\n`,_jsx(ResponseField,{name:`createdBy`,type:`string`,id:`param-created-by`,children:_jsx(_components.p,{children:`ID of the person who created the clinic: the person who created the partner key.`})}),`\n`,_jsx(ResponseField,{name:`createdAt`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`When the clinic was created, ISO 8601 in UTC.`})}),`\n`,_jsxs(_components.p,{children:[`The response doesn’t include `,_jsx(_components.code,{children:`externalId`}),`. It may include other fields not listed here; don’t build on them.`]}),`\n`,_jsx(Heading,{level:`3`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Body`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Invalid JSON format. Please check your request body for proper JSON syntax.\", \"details\": \"Malformed JSON - ensure proper syntax with correct brackets, commas, and quoted keys\"}`})}),_jsx(_components.td,{children:`The body isn’t valid JSON.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Invalid authorization\"}`})}),_jsx(_components.td,{children:`The key is a clinic key. Use a partner key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Unauthorized\"}`})}),_jsx(_components.td,{children:`The key is missing, malformed, unknown or deleted.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Insufficient permissions\"}`})}),_jsx(_components.td,{children:`The key’s creator isn’t the partner account owner or a Tenant Admin.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Organization with externalId LKS-0042 already exists\"}`})}),_jsxs(_components.td,{children:[`Another clinic already uses this `,_jsx(_components.code,{children:`externalId`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"Too many requests\", \"retryAfter\": 60}`})}),_jsxs(_components.td,{children:[`See `,_jsx(_components.a,{href:`/api-reference/rate-limits`,children:`Rate limits`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\": \"An unexpected error occurred. Please try again later.\"}`})}),_jsx(_components.td,{children:`The body broke a validation rule, or an unexpected server error happened.`})]})]})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Clinic names don’t have to be unique, so a blind retry can create a duplicate. After a `,_jsx(_components.code,{children:`500`}),` or a timeout, call `,_jsx(_components.a,{href:`/api-reference/endpoint/list-organizations`,children:`List organizations`}),` with `,_jsx(_components.code,{children:`search`}),` set to the clinic’s name before you send the request again.`]})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/api-reference/errors`,children:`Errors`}),` for the full list.`]}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://allomia.com/api/organization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk-your-partner-key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Lakeshore Family Health\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"frontdesk@lakeshorefamily.example\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"address\": \"1200 Lakeshore Road\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"city\": \"Montreal\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"stateProvince\": \"QC\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"postalCode\": \"H9S 2E4\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"CA\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"phoneNumber\": \"+15145550100\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"timezone\": \"America/Toronto\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"externalId\": \"LKS-0042\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200`,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3f6c1d2e-8a4b-4f7e-9c21-5b0d7e4a9f13\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tenantId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"northwind-health\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Lakeshore Family Health\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"frontdesk@lakeshorefamily.example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ownerId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"8c2d4f6a-1b3e-4a5c-9d7f-0e2b4c6a8d19\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"address\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1200 Lakeshore Road\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"city\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Montreal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"stateProvince\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"QC\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"postalCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"H9S 2E4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phoneNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+15145550100\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timezone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"America/Toronto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"isActive\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdBy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"8c2d4f6a-1b3e-4a5c-9d7f-0e2b4c6a8d19\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-14T15:20:41.318Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`409`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Organization with externalId LKS-0042 already exists\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create organization","api":"POST /api/organization","description":"Adds a new clinic to your partner account.","href":"/api-reference/endpoint/create-organization"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Body","slug":"body","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]},{"title":"Errors","slug":"errors","depth":3,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"15\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://allomia.com/api/organization\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer sk-your-partner-key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"name\": \"Lakeshore Family Health\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"frontdesk@lakeshorefamily.example\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"address\": \"1200 Lakeshore Road\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"city\": \"Montreal\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"stateProvince\": \"QC\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"postalCode\": \"H9S 2E4\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"country\": \"CA\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"phoneNumber\": \"+15145550100\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"timezone\": \"America/Toronto\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"externalId\": \"LKS-0042\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"3f6c1d2e-8a4b-4f7e-9c21-5b0d7e4a9f13\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"tenantId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"northwind-health\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Lakeshore Family Health\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"email\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"frontdesk@lakeshorefamily.example\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"ownerId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"8c2d4f6a-1b3e-4a5c-9d7f-0e2b4c6a8d19\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"address\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"1200 Lakeshore Road\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"city\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Montreal\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"stateProvince\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"QC\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"postalCode\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"H9S 2E4\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"country\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"CA\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"phoneNumber\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"+15145550100\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"timezone\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"America/Toronto\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"isActive\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"createdBy\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"8c2d4f6a-1b3e-4a5c-9d7f-0e2b4c6a8d19\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"createdAt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-14T15:20:41.318Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"409","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Organization with externalId LKS-0042 already exists\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create organization","path":"/api/organization","servers":[{"url":"https://allomia.com"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{"Authorization":{"schema":[{"type":"string","description":"`Bearer` followed by your partner key, for example `Bearer sk-…` .","required":true}]},"Content-Type":{"schema":[{"type":"string","description":"`application/json`","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"name":[{"type":"string","description":"Clinic name, 3 to 50 characters.","required":true}],"email":[{"type":"string","description":"Clinic email address. Must be a valid email address.","required":true}],"address":[{"type":"string","description":"Street address. 1 to 255 characters.","required":true}],"city":[{"type":"string","description":"City. 1 to 255 characters.","required":true}],"stateProvince":[{"type":"string","description":"State or province. 1 to 255 characters.","required":true}],"postalCode":[{"type":"string","description":"Postal or ZIP code. 1 to 255 characters.","required":true}],"country":[{"type":"string","description":"Country. 1 to 255 characters. Stored as you send it, for example `CA` .","required":true}],"phoneNumber":[{"type":"string","description":"Clinic contact number. 1 to 255 characters. Stored as you send it; we suggest E.164 format, for example `+15145550100` .","required":true}],"timezone":[{"type":"string","description":"The clinic’s time zone. Use an IANA time zone name, for example `America/Toronto` or `America/Vancouver` . Only letters, `_` and `/` are accepted, so names with a hyphen or a digit are rejected. The API doesn’t check that the zone exists, so double-check the spelling.","required":true}],"externalId":[{"type":"string","description":"Your own ID for the clinic, up to 255 characters. Stored only when AlloMia has set up an integration for your partner account; otherwise it is accepted and ignored. When stored, it must not already be used by another clinic, and AlloMia also creates the clinic’s empty metadata record, so you can then call Update organization metadata . See Metadata ."}]}}],"examples":{"example":{"value":{"name":"\u003cstring>","email":"\u003cstring>","address":"\u003cstring>","city":"\u003cstring>","stateProvince":"\u003cstring>","postalCode":"\u003cstring>","country":"\u003cstring>","phoneNumber":"\u003cstring>","timezone":"\u003cstring>","externalId":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"The new clinic’s organization ID (UUID). Store it: you need it for every other organization and call endpoint."}],"tenantId":[{"type":"string","description":"Your partner account’s ID."}],"name":[{"type":"string","description":"Clinic name."}],"email":[{"type":"string","description":"Clinic email address."}],"ownerId":[{"type":"string","description":"ID of the clinic’s owner: the person who created the partner key."}],"address":[{"type":"string","description":"Street address."}],"city":[{"type":"string","description":"City."}],"stateProvince":[{"type":"string","description":"State or province."}],"postalCode":[{"type":"string","description":"Postal or ZIP code."}],"country":[{"type":"string","description":"Country."}],"phoneNumber":[{"type":"string","description":"Clinic contact number."}],"timezone":[{"type":"string","description":"Time zone name."}],"isActive":[{"type":"boolean","description":"Always `true` for a new clinic."}],"createdBy":[{"type":"string","description":"ID of the person who created the clinic: the person who created the partner key."}],"createdAt":[{"type":"string","description":"When the clinic was created, ISO 8601 in UTC."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","tenantId":"\u003cstring>","name":"\u003cstring>","email":"\u003cstring>","ownerId":"\u003cstring>","address":"\u003cstring>","city":"\u003cstring>","stateProvince":"\u003cstring>","postalCode":"\u003cstring>","country":"\u003cstring>","phoneNumber":"\u003cstring>","timezone":"\u003cstring>","isActive":true,"createdBy":"\u003cstring>","createdAt":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"allomia-dcfc501a","siteName":"AlloMia API Documentation","title":"Create organization - AlloMia API Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-08T09:36:52.050Z","originalFileLocation":"api-reference/endpoint/create-organization.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=\"Adds a new clinic to your partner account.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AlloMia API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/allomia-dcfc501a/CXdvixMdh3J5Wfvu/_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/allomia-dcfc501a/CXdvixMdh3J5Wfvu/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/allomia-dcfc501a/CXdvixMdh3J5Wfvu/_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/allomia-dcfc501a/CXdvixMdh3J5Wfvu/_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/allomia-dcfc501a/CXdvixMdh3J5Wfvu/_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/allomia-dcfc501a/CXdvixMdh3J5Wfvu/_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/allomia-dcfc501a/CXdvixMdh3J5Wfvu/_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/allomia-dcfc501a/CXdvixMdh3J5Wfvu/_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/allomia-dcfc501a/CXdvixMdh3J5Wfvu/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create organization - AlloMia API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Adds a new clinic to your partner account.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AlloMia API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.allomia.com/api-reference/endpoint/create-organization\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://allomia-dcfc501a.mintlify.site/_mintlify/api/og/v2?division=Organizations+%28partner+keys%29\u0026amp;title=Create+organization\u0026amp;description=Adds+a+new+clinic+to+your+partner+account.\u0026amp;theme=f4e20f0a411c4b309413129f\u0026amp;signature=061aca31ed8aa1dac72113188934f7873542b94f082c88c044bb137c75bb5281\">\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 organization - AlloMia API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Adds a new clinic to your partner account.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://allomia-dcfc501a.mintlify.site/_mintlify/api/og/v2?division=Organizations+%28partner+keys%29\u0026amp;title=Create+organization\u0026amp;description=Adds+a+new+clinic+to+your+partner+account.\u0026amp;theme=f4e20f0a411c4b309413129f\u0026amp;signature=061aca31ed8aa1dac72113188934f7873542b94f082c88c044bb137c75bb5281\">\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/allomia-dcfc501a/CXdvixMdh3J5Wfvu/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AlloMia API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0A74DA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.allomia.com/api-reference/endpoint/create-organization\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/create-organization.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.allomia.com/#organization\",\"name\":\"AlloMia API Documentation\",\"url\":\"https://docs.allomia.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/allomia-dcfc501a/63lasYG0rgJFLjIc/logo/light.svg?fit=max\u0026auto=format\u0026n=63lasYG0rgJFLjIc\u0026q=85\u0026s=900c98f2940cc700233cd2eb0805d036\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.allomia.com#website\",\"name\":\"AlloMia API Documentation\",\"url\":\"https://docs.allomia.com\",\"publisher\":{\"@id\":\"https://docs.allomia.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.allomia.com/api-reference/endpoint/create-organization#webpage\",\"url\":\"https://docs.allomia.com/api-reference/endpoint/create-organization\",\"name\":\"Create organization\",\"description\":\"Adds a new clinic to your partner account.\",\"dateModified\":\"2026-10-08T09:36:52.050Z\",\"isPartOf\":{\"@id\":\"https://docs.allomia.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.allomia.com/api-reference/endpoint/create-organization#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.allomia.com/api-reference/endpoint/create-organization#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Organizations (partner keys)\",\"item\":\"https://docs.allomia.com/api-reference/organization\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create organization\",\"item\":\"https://docs.allomia.com/api-reference/endpoint/create-organization\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.allomia.com/api-reference/endpoint/create-organization#apireference\",\"headline\":\"Create organization\",\"name\":\"Create organization\",\"description\":\"Adds a new clinic to your partner account.\",\"url\":\"https://docs.allomia.com/api-reference/endpoint/create-organization\",\"mainEntityOfPage\":{\"@id\":\"https://docs.allomia.com/api-reference/endpoint/create-organization#webpage\"},\"dateModified\":\"2026-10-08T09:36:52.050Z\",\"publisher\":{\"@id\":\"https://docs.allomia.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.allomia.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AlloMia API Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"AlloMia API Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoint/create-organization.md","siteName":"AlloMia API Documentation","nav":{"global":{"anchors":[{"anchor":"Help Center","icon":"life-ring","href":"https://allomia.com/en/help-center"},{"anchor":"AlloMia Website","icon":"globe","href":"https://allomia.com"},{"anchor":"Contact Support","icon":"envelope","href":"mailto:support@medfarsolutions.com"}]},"groups":[{"group":"Get started","pages":[{"title":"API overview","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Finding IDs","href":"/api-reference/finding-ids"},{"title":"Errors","href":"/api-reference/errors"},{"title":"Rate limits","href":"/api-reference/rate-limits"}]},{"group":"Organizations (partner keys)","pages":[{"title":"Organizations","href":"/api-reference/organization"},{"title":"List organizations","api":"GET /api/organization","description":"Returns a page of the active clinics in your partner account.","href":"/api-reference/endpoint/list-organizations"},{"title":"Create organization","api":"POST /api/organization","href":"/api-reference/endpoint/create-organization"},{"title":"Get organization","api":"GET /api/organization/{id}","description":"Returns one active clinic from your partner account.","href":"/api-reference/endpoint/get-organization"},{"title":"Update organization","api":"PUT /api/organization/{id}","href":"/api-reference/endpoint/update-organization"},{"title":"Delete organization","api":"DELETE /api/organization/{id}","href":"/api-reference/endpoint/delete-organization"},{"title":"Update organization metadata","api":"PUT /api/organization/{id}/metadata","href":"/api-reference/endpoint/update-organization-metadata"}]},{"group":"Calls","pages":[{"title":"Calls","href":"/api-reference/calls"},{"title":"List calls","api":"GET /api/calls","href":"/api-reference/endpoint/list-calls"},{"title":"Get call","api":"GET /api/calls/{id}","href":"/api-reference/endpoint/get-call"}]},{"group":"Outbound calls","pages":[{"title":"Outbound calls","href":"/api-reference/outbound-calls"},{"title":"Create outbound call","api":"POST /api/outbound","href":"/api-reference/endpoint/create-outbound-call"},{"title":"Get outbound call status","api":"GET /api/outbound/{id}/status","href":"/api-reference/endpoint/get-outbound-call-status"},{"title":"Call-completed callback","href":"/api-reference/webhooks"}]}]},"basePath":"","title":"Create organization - AlloMia API Documentation","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DdEMm2kG.js","utils-BMo572L7.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C-4m9KAx.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DPLK2Oq9.js","snippetPresets-BKjfJMC9.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DTsgtCEj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C8vmhyQM.js","shallow-r9w8LQGS.js","getApiPlaygroundDisplay-DjPI64HQ.js","CodeSnippet-C8Bvhl16.js","CodeSnippets-BtWUwcMy.js","Page-BIYvYBgk.js","getPastedJson-Dcm_3Pgl.js","icon-BXwrTpjc.js","MethodPill-CcjfVmmy.js","DuplicateIcon-BuKIbXAQ.js","createIcon-DaL9yXsO.js","DynamicMarkdown-Co5nikxh.js","SectionHeading-P4UNTsMZ.js","axios-vUo_bRtp.js"]}