Skip to content

Create Clinic

Creates the clinic in onboarding, which seeds the configuration that makes it usable. Returns a DRAFT — status ONBOARDING with no operational id — until it is published, which is an offline process outside these APIs. Address the draft by its onboarding_clinic_id.

Endpoint

POST /v2/clinics

Request Body

Parameter Type Required Description
name string Yes
timezone string Yes IANA timezone name.
email string No
phone string No
fax string No
address object No See Address.
logo_url string No
alias string No
service_location_code string No CMS place-of-service code.
hours array of object No Working hours, as one entry per distinct daily pattern. See Hours.

Address

Parameter Type Required Description
line1 string or null No
line2 string or null No
city string or null No
state string or null No
postal_code string or null No
country string or null No

Hours

Parameter Type Required Description
days_of_week array of string Yes Any of MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
start_time string Yes Clock time, 24-hour HH:MM.
end_time string Yes Clock time, 24-hour HH:MM.

Request

curl --location '{base_url}/v2/clinics' \
  --header 'Authorization: Bearer JWT_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Example Therapy \u2014 Riverside",
  "timezone": "America/Los_Angeles",
  "email": "frontdesk@example.com",
  "phone": "+1-555-0143",
  "fax": null,
  "address": {
    "line1": "482 Willow Creek Rd",
    "line2": null,
    "city": "Fairview",
    "state": "OR",
    "postal_code": "97024",
    "country": "US"
  },
  "logo_url": "https://assets.example.com/logo.png",
  "alias": "RVS",
  "service_location_code": "11",
  "hours": [
    {
      "days_of_week": [
        "MONDAY",
        "TUESDAY"
      ],
      "start_time": "08:00",
      "end_time": "17:00"
    }
  ]
}'

Response

Success Response

Code: 201 Created

{
  "id": "5831",
  "onboarding_clinic_id": "b41f7c92-5e08-4a13-8d6f-2c9147ab3e5d",
  "organisation_id": "7412",
  "name": "Example Therapy \u2014 Riverside",
  "email": "frontdesk@example.com",
  "phone": "+1-555-0143",
  "fax": null,
  "address": {
    "line1": "482 Willow Creek Rd",
    "line2": null,
    "city": "Fairview",
    "state": "OR",
    "postal_code": "97024",
    "country": "US"
  },
  "timezone": "America/Los_Angeles",
  "npi": "1740398215",
  "logo_url": "https://assets.example.com/logo.png",
  "about": null,
  "specialities": [
    "PT",
    "OT"
  ],
  "hours": [
    {
      "days_of_week": [
        "MONDAY",
        "TUESDAY"
      ],
      "start_time": "08:00",
      "end_time": "17:00"
    }
  ],
  "online_booking_enabled": true,
  "max_visits_per_slot": 3,
  "status": "ACTIVE",
  "created_at": "2026-08-27T14:30:00Z",
  "updated_at": "2026-08-27T14:30:00Z"
}

The Location header carries the URL of the created resource.

Response Fields

Field Type Description
id string or null The clinic id. null while status is ONBOARDING — no operational record exists yet, which is what stops an unpublished clinic being referenced in a booking.
onboarding_clinic_id string or null The clinic's onboarding-record UUID. Always present for clinics created through onboarding, and the only way to address one before it's published.
organisation_id string or null The organisation this record belongs to. Derived from the access token on writes and never trusted from the body.
name string
email string or null
phone string or null
fax string or null
address object or null See Address.
timezone string or null IANA timezone name.
npi string or null The clinic's NPI, resolved from the organization's default billing profile. Read-only; changes when the default billing profile or its NPI changes.
logo_url string or null
about string or null
specialities array of string
hours array of object Working hours, as one entry per distinct daily pattern. See Hours.
online_booking_enabled boolean Whether this record is bookable through online booking.
max_visits_per_slot integer or null
status string ONBOARDING until the record is published, then ACTIVE; INACTIVE once deleted. One of ONBOARDING, ACTIVE, INACTIVE.
created_at string (date-time) or null
updated_at string (date-time) or null

Address

Field Type Description
line1 string or null
line2 string or null
city string or null
state string or null
postal_code string or null
country string or null

Hours

Field Type Description
days_of_week array of string Any of MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
start_time string Clock time, 24-hour HH:MM.
end_time string Clock time, 24-hour HH:MM.

Error Response

Code: 400 Bad Request

{
  "code": "bad_request",
  "message": "Validation failed",
  "errors": [
    {
      "field": "patient_id",
      "message": "must be a string"
    }
  ]
}

Every error has the same shape — a machine-readable code, a message, and an errors[] array that's empty when there's nothing field-specific to report. The HTTP status is authoritative.

Status code Meaning
400 Bad Request bad_request The request body or parameters failed validation. errors[] names the offending fields.
401 Unauthorized unauthorized The access token is missing, malformed or expired.
403 Forbidden forbidden The request references a resource outside the token's organisation or clinic scope.
404 Not Found not_found No such resource, or it's outside your scope.
409 Conflict conflict The record conflicts with existing state — see the endpoint's notes.
423 Locked locked The organisation has a publish in progress. Retry once it finishes.
429 Too Many Requests rate_limited Rate limit exceeded. Back off and retry.
500 Internal Server Error internal_error Unexpected server error.
502 Bad Gateway upstream_error Upstream service failed or timed out.

Notes

  • Location points at the draft: /v2/clinics/{onboarding_clinic_id}?onboarding=true.