Skip to main content
POST
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

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.
See Errors for the full list.