curl --request PATCH \
--url https://api.maxcare.ai/v2/appointments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"startsAt": "2026-08-05T10:30:00-04:00",
"durationMinutes": 30,
"providerId": "<string>",
"facilityId": "<string>"
}
'import requests
url = "https://api.maxcare.ai/v2/appointments/{id}"
payload = {
"startsAt": "2026-08-05T10:30:00-04:00",
"durationMinutes": 30,
"providerId": "<string>",
"facilityId": "<string>"
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Organization-Id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
startsAt: '2026-08-05T10:30:00-04:00',
durationMinutes: 30,
providerId: '<string>',
facilityId: '<string>'
})
};
fetch('https://api.maxcare.ai/v2/appointments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.maxcare.ai/v2/appointments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'startsAt' => '2026-08-05T10:30:00-04:00',
'durationMinutes' => 30,
'providerId' => '<string>',
'facilityId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Organization-Id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxcare.ai/v2/appointments/{id}"
payload := strings.NewReader("{\n \"startsAt\": \"2026-08-05T10:30:00-04:00\",\n \"durationMinutes\": 30,\n \"providerId\": \"<string>\",\n \"facilityId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.maxcare.ai/v2/appointments/{id}")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startsAt\": \"2026-08-05T10:30:00-04:00\",\n \"durationMinutes\": 30,\n \"providerId\": \"<string>\",\n \"facilityId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v2/appointments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startsAt\": \"2026-08-05T10:30:00-04:00\",\n \"durationMinutes\": 30,\n \"providerId\": \"<string>\",\n \"facilityId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"id": "apt_e5f6a7b8c9d04e1f2a3b4c5d6e7f8a9b",
"externalId": "9938272",
"previousExternalId": "9938271",
"implementedAsCancelAndCreate": false,
"startsAt": "2026-08-05T10:30:00-04:00",
"status": "scheduled",
"syncStatus": "synced"
}
}{
"code": "bad_request",
"message": "'id' must be a valid UUID",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unauthorized",
"message": "Invalid or missing API key",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "forbidden",
"message": "Insufficient scope",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "not_found",
"message": "Resource not found",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "conflict",
"message": "Cannot edit a signed note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unexpected_integration_error",
"message": "EHR sync failed",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "server_unresponsive",
"message": "EHR integration is not available for this note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Reschedule an appointment
Moves the appointment. Where the EHR implements a move as cancel-plus-create, the response returns BOTH ids and sets implementedAsCancelAndCreate: true — the previous EHR record is a tombstone rather than an updated appointment. Target capacity is reserved before contacting the EHR; an unavailable target returns 409. If the current duration is unknown, supply durationMinutes or refresh the appointment before moving it. Send an Idempotency-Key header to make a retry safe: it is honoured for 24 hours per app+organization, a repeat of the SAME request replays the original result, and a key reused for a DIFFERENT request is refused with 409. The guarantee fails closed — if the idempotency store is unreachable the request is refused with 503 idempotency_unavailable rather than proceeding unguarded. A lost vendor response returns 409 ehr_write_uncertain with requiresReconciliation: true. Both the original and target capacity remain reserved until the outcome is verified.
curl --request PATCH \
--url https://api.maxcare.ai/v2/appointments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"startsAt": "2026-08-05T10:30:00-04:00",
"durationMinutes": 30,
"providerId": "<string>",
"facilityId": "<string>"
}
'import requests
url = "https://api.maxcare.ai/v2/appointments/{id}"
payload = {
"startsAt": "2026-08-05T10:30:00-04:00",
"durationMinutes": 30,
"providerId": "<string>",
"facilityId": "<string>"
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Organization-Id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
startsAt: '2026-08-05T10:30:00-04:00',
durationMinutes: 30,
providerId: '<string>',
facilityId: '<string>'
})
};
fetch('https://api.maxcare.ai/v2/appointments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.maxcare.ai/v2/appointments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'startsAt' => '2026-08-05T10:30:00-04:00',
'durationMinutes' => 30,
'providerId' => '<string>',
'facilityId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Organization-Id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxcare.ai/v2/appointments/{id}"
payload := strings.NewReader("{\n \"startsAt\": \"2026-08-05T10:30:00-04:00\",\n \"durationMinutes\": 30,\n \"providerId\": \"<string>\",\n \"facilityId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.maxcare.ai/v2/appointments/{id}")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startsAt\": \"2026-08-05T10:30:00-04:00\",\n \"durationMinutes\": 30,\n \"providerId\": \"<string>\",\n \"facilityId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v2/appointments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startsAt\": \"2026-08-05T10:30:00-04:00\",\n \"durationMinutes\": 30,\n \"providerId\": \"<string>\",\n \"facilityId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"id": "apt_e5f6a7b8c9d04e1f2a3b4c5d6e7f8a9b",
"externalId": "9938272",
"previousExternalId": "9938271",
"implementedAsCancelAndCreate": false,
"startsAt": "2026-08-05T10:30:00-04:00",
"status": "scheduled",
"syncStatus": "synced"
}
}{
"code": "bad_request",
"message": "'id' must be a valid UUID",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unauthorized",
"message": "Invalid or missing API key",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "forbidden",
"message": "Insufficient scope",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "not_found",
"message": "Resource not found",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "conflict",
"message": "Cannot edit a signed note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unexpected_integration_error",
"message": "EHR sync failed",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "server_unresponsive",
"message": "EHR integration is not available for this note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Authorizations
Marketplace API key
Headers
Client-generated key protecting retries for 24 hours
Target clinic organization ID
Path Parameters
Appointment ID
