> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Schedule Appointment

This is a `POST` request to the following API endpoint:

[https://questions.morf.health/api/scheduleAppointment](https://questions.morf.health/api/scheduleAppointment)

### Request Body

The request body must contain the following parameters:

* `morfOrgId`: (string) The organization ID.
* `appointmentTypeId`: (string) The appointment type ID.
* `datetime`: (string) The scheduled date and time of the appointment (in ISO 8601 format).
* `timezone`: (string) The timezone in `IANA` format (e.g., "America/New\_York").
* `providerId`: (string) The provider's ID.
* `schedulingApplication`: (string) The application used for scheduling, `HEALTHIE` or `ACUITY`.
* `firstName`: (string) The patient's first name.
* `lastName`: (string) The patient's last name.
* `phoneNumber`: (string) The patient's phone number.
* `emailAddress`: (string) The patient's email address.
* `patientId`: (string) The patient's ID.
* `sendWelcomeEmail`: (optional, boolean) Whether to send a welcome email. Default is `false`.
* `uniqueByEmail`: (optional, boolean) Whether the appointment is unique by email. Default is `true`.
* `contactType`: (optional, string) The type of contact. Options: `Healthie Video Chat`, `Secure Videochat`, `In Person`, or `Phone Call`.  Default is `Video Call`.

### Sample Request

Here’s an example of what the request body could look like:

```
{
  "appointmentTypeId": "172084",
  "datetime": "2025-03-24T13:00:00.000Z",
  "emailAddress": "test@morf.health",
  "firstName": "Test",
  "lastName": "Morf",
  "morfOrgId": "16a53f42-687c-4eb1-bd8b-27126485a7b7",
  "patientId": "a1ac3167-24d9-4d64-958f-474fafade5b7",
  "phoneNumber": "1234567890",
  "providerId": "224404",
  "schedulingApplication": "HEALTHIE",
  "timezone": "America/New_York"
}
```

### Response

When the booking is successful, the response will be:

```
{
    "datetime": "2025-03-24T13:00:00.000Z",
    "id": "122570627",
    "providerId":  "224404",
    "providerName": "Doctor Spock",
    "thirdPartyUserId": "2326636"
}
```

When the booking is not successful, the response could be one of the following:

```
{
    "status": "ALREADY_EXISTS",
    "message": "time slot taken",
    "requestId": "04900002-1d8d-474b-9702-db6a527b33d4"
}
```

```
{
    "status": "NOT_FOUND",
    "message": "No existing Morf profile found",
    "requestId": "720bb028-eaf3-4871-8483-9073703276c3"
}
```

```
{
    "status": "ALREADY_EXISTS",
    "message": "<invalid email or account with email already exists> Unique by email is true but we found an existing Healthie user for email test@morf.health, Healthie Patient ID: 2326636",
    "requestId": "6bbaedd6-e91f-4f39-a425-3cc05a321b7f"
}
```
