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

# reschedule

### GET api/v1/ai\_voice/organizations/597/appointments/8943588/reschedule

This endpoint is used to reschedule a patient’s appointment across both TeamCare and the Practice PMS.

The workflow begins when a patient contacts the dental office to request an appointment reschedule. First, the patient’s information is retrieved using the `patients/search` API. It is required to identify and match the patient within the TeamCare database, as the corresponding patient ID will be used in subsequent steps. Patient found from patient search api call should be of type Patient and not Patient Request. If patient found in Patient Request or not found at all it means patient is new and it don't have any appointment already scheduled.

Next, the `appointments/search` API is used to locate the patient’s upcoming appointments. From the response, the relevant appointment ID is obtained. This appointment ID is then passed as a URL parameter to the rescheduling endpoint.

The appointment is rescheduled by providing a new `appointment_at` value in UTC format. TeamCare will automatically handle timezone conversion based on the associated practice settings, ensuring the correct local time is applied.

#### Parameters

* Ai Agent will just have to hit on reschedule end point as above to reschedule the appointment.
* Organization id in url will be the id for practice in teamcare database.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://app.teamcaredental.com/api/v1/ai_voice/organizations/:organization_id/appointments/:appointment_id/reschedule" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "appointment": {
        "appointment_at": "2028-07-11T11:00:00Z"
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://app.teamcaredental.com/api/v1/ai_voice/organizations/:organization_id/appointments/:appointment_id/reschedule", {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_ACCESS_TOKEN",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "appointment": {
        "appointment_at": "2028-07-11T11:00:00Z"
      }
    })
  })

  const data = await response.json()
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://app.teamcaredental.com/api/v1/ai_voice/organizations/:organization_id/appointments/:appointment_id/reschedule",
      headers={"Authorization": "Bearer YOUR_ACCESS_TOKEN"},
      json={
        "appointment": {
          "appointment_at": "2028-07-11T11:00:00Z"
        }
      }
  )

  data = response.json()
  ```

  ```ruby Ruby theme={null}
  require "net/http"
  require "json"

  uri = URI("https://app.teamcaredental.com/api/v1/ai_voice/organizations/:organization_id/appointments/:appointment_id/reschedule")
  request = Net::HTTP::Post.new(uri)
  request["Authorization"] = "Bearer YOUR_ACCESS_TOKEN"
  request["Content-Type"] = "application/json"
  request.body = JSON.dump({
    "appointment" => {
      "appointment_at" => "2028-07-11T11:00:00Z"
    }
  })

  response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
    http.request(request)
  end

  data = JSON.parse(response.body)
  ```
</CodeGroup>

Response

Content-Type: application/json Data attribute returned just to give you insights, it has nothing to do with patient.

```json theme={null}
{
    "message": "Appointment request is received"
}
```
