curl --request POST \
--url https://api.maxcare.ai/v1/sync-requests/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"requests": [
{
"resourceType": "claim",
"resourceId": "a1b2c3d4-5678-4abc-9def-0123456789ab"
}
]
}
'import requests
url = "https://api.maxcare.ai/v1/sync-requests/batch"
payload = { "requests": [
{
"resourceType": "claim",
"resourceId": "a1b2c3d4-5678-4abc-9def-0123456789ab"
}
] }
headers = {
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Organization-Id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
requests: [{resourceType: 'claim', resourceId: 'a1b2c3d4-5678-4abc-9def-0123456789ab'}]
})
};
fetch('https://api.maxcare.ai/v1/sync-requests/batch', 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/v1/sync-requests/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'requests' => [
[
'resourceType' => 'claim',
'resourceId' => 'a1b2c3d4-5678-4abc-9def-0123456789ab'
]
]
]),
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/v1/sync-requests/batch"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"resourceType\": \"claim\",\n \"resourceId\": \"a1b2c3d4-5678-4abc-9def-0123456789ab\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.maxcare.ai/v1/sync-requests/batch")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"requests\": [\n {\n \"resourceType\": \"claim\",\n \"resourceId\": \"a1b2c3d4-5678-4abc-9def-0123456789ab\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v1/sync-requests/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requests\": [\n {\n \"resourceType\": \"claim\",\n \"resourceId\": \"a1b2c3d4-5678-4abc-9def-0123456789ab\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"requests": [
{
"resourceType": "bill",
"resourceId": "bil_a1b2c3d456784abc9def0123456789ab",
"request": {
"id": "c1d2e3f4-5678-4abc-9def-0123456789ab",
"resourceType": "claim",
"resourceId": "a1b2c3d4-5678-4abc-9def-0123456789ab",
"status": "queued",
"errorKind": null,
"resourceUpdatedAt": "2026-08-09T12:00:00.000Z",
"requestedAt": "2026-08-09T12:00:00.000Z",
"completedAt": null
},
"error": null
}
]
}
}{
"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": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Request a re-sync of several resources in one call
Queues up to 25 on-demand re-syncs in one round trip. Kinds may be mixed. Each item is processed independently and under the SAME guardrails as POST /sync-requests — its own scope check, its own 5-minute per-resource cooldown (30 per connector for appointments), and its own slot of the 500-per-organization-per-24h ceiling: a batch of 25 spends 25 slots, not one. Best-effort, not atomic: the 202 says the batch was processed, not that every item queued. Each result carries either request (queued, including resourceUpdatedAt) or error (the status and message the single-resource endpoint would have returned — 500 among them, scoped to the one item rather than failing the request, plus a batch-only 503 when the batch hit its time budget before that item was started: a 503 item ran nothing, holds no cooldown and spent no cap slot, so retry it in a smaller batch), never both — an item refused by its cooldown does not affect the others. Results come back in the order sent, with resourceId echoed verbatim. Poll each queued item’s GET /sync-requests/{id} as usual; the sync_request.completed webhook fires once PER ITEM, not per batch. The response is held until every item has been dispatched, so it can take several seconds. More than the maximum is a 400 naming the limit, never a silent truncation.
curl --request POST \
--url https://api.maxcare.ai/v1/sync-requests/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"requests": [
{
"resourceType": "claim",
"resourceId": "a1b2c3d4-5678-4abc-9def-0123456789ab"
}
]
}
'import requests
url = "https://api.maxcare.ai/v1/sync-requests/batch"
payload = { "requests": [
{
"resourceType": "claim",
"resourceId": "a1b2c3d4-5678-4abc-9def-0123456789ab"
}
] }
headers = {
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Organization-Id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
requests: [{resourceType: 'claim', resourceId: 'a1b2c3d4-5678-4abc-9def-0123456789ab'}]
})
};
fetch('https://api.maxcare.ai/v1/sync-requests/batch', 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/v1/sync-requests/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'requests' => [
[
'resourceType' => 'claim',
'resourceId' => 'a1b2c3d4-5678-4abc-9def-0123456789ab'
]
]
]),
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/v1/sync-requests/batch"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"resourceType\": \"claim\",\n \"resourceId\": \"a1b2c3d4-5678-4abc-9def-0123456789ab\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.maxcare.ai/v1/sync-requests/batch")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"requests\": [\n {\n \"resourceType\": \"claim\",\n \"resourceId\": \"a1b2c3d4-5678-4abc-9def-0123456789ab\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v1/sync-requests/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requests\": [\n {\n \"resourceType\": \"claim\",\n \"resourceId\": \"a1b2c3d4-5678-4abc-9def-0123456789ab\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"requests": [
{
"resourceType": "bill",
"resourceId": "bil_a1b2c3d456784abc9def0123456789ab",
"request": {
"id": "c1d2e3f4-5678-4abc-9def-0123456789ab",
"resourceType": "claim",
"resourceId": "a1b2c3d4-5678-4abc-9def-0123456789ab",
"status": "queued",
"errorKind": null,
"resourceUpdatedAt": "2026-08-09T12:00:00.000Z",
"requestedAt": "2026-08-09T12:00:00.000Z",
"completedAt": null
},
"error": null
}
]
}
}{
"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": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Authorizations
Marketplace API key
Headers
Target clinic organization ID
Body
The resources to re-sync, up to 25. Kinds may be mixed freely. Items are processed independently and in order: each one spends its own cooldown and its own daily-cap slot, exactly as if it had been sent to POST /sync-requests on its own. Sending the same resource twice in one batch is allowed and the second occurrence is refused by its own cooldown (409), like any other repeat.
1 - 25 elementsShow child attributes
Show child attributes
