curl --request POST \
--url https://api.maxcare.ai/v1/payers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"directoryPayerId": "<string>",
"name": "<string>",
"instanceId": "<string>"
}
'import requests
url = "https://api.maxcare.ai/v1/payers"
payload = {
"directoryPayerId": "<string>",
"name": "<string>",
"instanceId": "<string>"
}
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({directoryPayerId: '<string>', name: '<string>', instanceId: '<string>'})
};
fetch('https://api.maxcare.ai/v1/payers', 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/payers",
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([
'directoryPayerId' => '<string>',
'name' => '<string>',
'instanceId' => '<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/v1/payers"
payload := strings.NewReader("{\n \"directoryPayerId\": \"<string>\",\n \"name\": \"<string>\",\n \"instanceId\": \"<string>\"\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/payers")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"directoryPayerId\": \"<string>\",\n \"name\": \"<string>\",\n \"instanceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v1/payers")
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 \"directoryPayerId\": \"<string>\",\n \"name\": \"<string>\",\n \"instanceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"payerId": "<string>",
"name": "<string>",
"directoryPayerId": "<string>",
"contracted": true,
"created": true
}
}{
"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": "conflict",
"message": "Cannot edit a signed note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "controlled_substance_unsupported",
"message": "Controlled substances cannot be prescribed through the API",
"trace_id": "550e8400-e29b-41d4-a716-446655440000",
"data": {}
}{
"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"
}Add a directory payer to the practice
Adds a payer from GET /payers/directory to the practice’s payer list as NON-contracted, with the defaults a biller gets saving it unedited (medical, accepts assignment, electronic 5010 claims when the payer takes them, no fee schedules). The returned payerId works with POST /patients/{id}/insurance:exact immediately. 201 when this request added the payer; 200 with the existing payer when the practice already has it — never a duplicate. 422 directory_payer_not_found when the directory has no payer with that directoryPayerId and name; 422 payer_inactive_in_ehr when the practice has it but deactivated it (a biller must reactivate it). 400 capability_unsupported on EHRs that cannot add payers (see GET /payers/capabilities). 409 ehr_write_uncertain means the add may have reached the EHR. That key then keeps answering 409 for 24 hours, so retry with a NEW key: the payer list is checked before any add, so the retry returns the payer if the first request added it. Requires write:payers.
curl --request POST \
--url https://api.maxcare.ai/v1/payers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"directoryPayerId": "<string>",
"name": "<string>",
"instanceId": "<string>"
}
'import requests
url = "https://api.maxcare.ai/v1/payers"
payload = {
"directoryPayerId": "<string>",
"name": "<string>",
"instanceId": "<string>"
}
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({directoryPayerId: '<string>', name: '<string>', instanceId: '<string>'})
};
fetch('https://api.maxcare.ai/v1/payers', 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/payers",
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([
'directoryPayerId' => '<string>',
'name' => '<string>',
'instanceId' => '<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/v1/payers"
payload := strings.NewReader("{\n \"directoryPayerId\": \"<string>\",\n \"name\": \"<string>\",\n \"instanceId\": \"<string>\"\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/payers")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"directoryPayerId\": \"<string>\",\n \"name\": \"<string>\",\n \"instanceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v1/payers")
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 \"directoryPayerId\": \"<string>\",\n \"name\": \"<string>\",\n \"instanceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"payerId": "<string>",
"name": "<string>",
"directoryPayerId": "<string>",
"contracted": true,
"created": true
}
}{
"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": "conflict",
"message": "Cannot edit a signed note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "controlled_substance_unsupported",
"message": "Controlled substances cannot be prescribed through the API",
"trace_id": "550e8400-e29b-41d4-a716-446655440000",
"data": {}
}{
"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
Body
directoryPayerId from GET /payers/directory
50The directory entry's name, exactly as returned — the EHR keys payers on national id AND name
255EHR instance to add the payer to; same default as GET /payers/directory
Response
Success
