Update Provider by EMR ID
curl --request PATCH \
--url https://api.usecobalt.com/v1/providers/ehr/{ehr_id} \
--header 'Content-Type: application/json' \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>' \
--data '
{
"hours": [
{
"shifts": [
{
"start": "T08:00:00",
"end": "T17:00:00",
"facility_id": "<string>",
"set_start_date": "2025-11-13T00:00:00",
"set_end_date": "2026-11-13T00:00:00",
"set_recur": {
"rec_start_date": "2025-11-13T00:00:00",
"rec_end_date": "2026-11-13T00:00:00",
"recur_interval_amount": 1,
"recur_interval_description": "Every 1 week."
}
}
]
}
]
}
'import requests
url = "https://api.usecobalt.com/v1/providers/ehr/{ehr_id}"
payload = { "hours": [{ "shifts": [
{
"start": "T08:00:00",
"end": "T17:00:00",
"facility_id": "<string>",
"set_start_date": "2025-11-13T00:00:00",
"set_end_date": "2026-11-13T00:00:00",
"set_recur": {
"rec_start_date": "2025-11-13T00:00:00",
"rec_end_date": "2026-11-13T00:00:00",
"recur_interval_amount": 1,
"recur_interval_description": "Every 1 week."
}
}
] }] }
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
hours: [
{
shifts: [
{
start: 'T08:00:00',
end: 'T17:00:00',
facility_id: '<string>',
set_start_date: '2025-11-13T00:00:00',
set_end_date: '2026-11-13T00:00:00',
set_recur: {
rec_start_date: '2025-11-13T00:00:00',
rec_end_date: '2026-11-13T00:00:00',
recur_interval_amount: 1,
recur_interval_description: 'Every 1 week.'
}
}
]
}
]
})
};
fetch('https://api.usecobalt.com/v1/providers/ehr/{ehr_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.usecobalt.com/v1/providers/ehr/{ehr_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([
'hours' => [
[
'shifts' => [
[
'start' => 'T08:00:00',
'end' => 'T17:00:00',
'facility_id' => '<string>',
'set_start_date' => '2025-11-13T00:00:00',
'set_end_date' => '2026-11-13T00:00:00',
'set_recur' => [
'rec_start_date' => '2025-11-13T00:00:00',
'rec_end_date' => '2026-11-13T00:00:00',
'recur_interval_amount' => 1,
'recur_interval_description' => 'Every 1 week.'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access_token: <api-key>",
"client_id: <api-key>",
"client_secret: <api-key>"
],
]);
$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.usecobalt.com/v1/providers/ehr/{ehr_id}"
payload := strings.NewReader("{\n \"hours\": [\n {\n \"shifts\": [\n {\n \"start\": \"T08:00:00\",\n \"end\": \"T17:00:00\",\n \"facility_id\": \"<string>\",\n \"set_start_date\": \"2025-11-13T00:00:00\",\n \"set_end_date\": \"2026-11-13T00:00:00\",\n \"set_recur\": {\n \"rec_start_date\": \"2025-11-13T00:00:00\",\n \"rec_end_date\": \"2026-11-13T00:00:00\",\n \"recur_interval_amount\": 1,\n \"recur_interval_description\": \"Every 1 week.\"\n }\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
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.usecobalt.com/v1/providers/ehr/{ehr_id}")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"hours\": [\n {\n \"shifts\": [\n {\n \"start\": \"T08:00:00\",\n \"end\": \"T17:00:00\",\n \"facility_id\": \"<string>\",\n \"set_start_date\": \"2025-11-13T00:00:00\",\n \"set_end_date\": \"2026-11-13T00:00:00\",\n \"set_recur\": {\n \"rec_start_date\": \"2025-11-13T00:00:00\",\n \"rec_end_date\": \"2026-11-13T00:00:00\",\n \"recur_interval_amount\": 1,\n \"recur_interval_description\": \"Every 1 week.\"\n }\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/providers/ehr/{ehr_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hours\": [\n {\n \"shifts\": [\n {\n \"start\": \"T08:00:00\",\n \"end\": \"T17:00:00\",\n \"facility_id\": \"<string>\",\n \"set_start_date\": \"2025-11-13T00:00:00\",\n \"set_end_date\": \"2026-11-13T00:00:00\",\n \"set_recur\": {\n \"rec_start_date\": \"2025-11-13T00:00:00\",\n \"rec_end_date\": \"2026-11-13T00:00:00\",\n \"recur_interval_amount\": 1,\n \"recur_interval_description\": \"Every 1 week.\"\n }\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"provider_id": "<string>"
}{
"success": true,
"message": "Provider with EMR ID 'example_ehr_id' not found for this organization."
}Providers
Update Provider by EMR ID
Updates a provider’s status, working hours, and/or availability visibility using the EMR ID. This is an alternative to using Cobalt’s internal provider ID.
PATCH
/
providers
/
ehr
/
{ehr_id}
Update Provider by EMR ID
curl --request PATCH \
--url https://api.usecobalt.com/v1/providers/ehr/{ehr_id} \
--header 'Content-Type: application/json' \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>' \
--data '
{
"hours": [
{
"shifts": [
{
"start": "T08:00:00",
"end": "T17:00:00",
"facility_id": "<string>",
"set_start_date": "2025-11-13T00:00:00",
"set_end_date": "2026-11-13T00:00:00",
"set_recur": {
"rec_start_date": "2025-11-13T00:00:00",
"rec_end_date": "2026-11-13T00:00:00",
"recur_interval_amount": 1,
"recur_interval_description": "Every 1 week."
}
}
]
}
]
}
'import requests
url = "https://api.usecobalt.com/v1/providers/ehr/{ehr_id}"
payload = { "hours": [{ "shifts": [
{
"start": "T08:00:00",
"end": "T17:00:00",
"facility_id": "<string>",
"set_start_date": "2025-11-13T00:00:00",
"set_end_date": "2026-11-13T00:00:00",
"set_recur": {
"rec_start_date": "2025-11-13T00:00:00",
"rec_end_date": "2026-11-13T00:00:00",
"recur_interval_amount": 1,
"recur_interval_description": "Every 1 week."
}
}
] }] }
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
hours: [
{
shifts: [
{
start: 'T08:00:00',
end: 'T17:00:00',
facility_id: '<string>',
set_start_date: '2025-11-13T00:00:00',
set_end_date: '2026-11-13T00:00:00',
set_recur: {
rec_start_date: '2025-11-13T00:00:00',
rec_end_date: '2026-11-13T00:00:00',
recur_interval_amount: 1,
recur_interval_description: 'Every 1 week.'
}
}
]
}
]
})
};
fetch('https://api.usecobalt.com/v1/providers/ehr/{ehr_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.usecobalt.com/v1/providers/ehr/{ehr_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([
'hours' => [
[
'shifts' => [
[
'start' => 'T08:00:00',
'end' => 'T17:00:00',
'facility_id' => '<string>',
'set_start_date' => '2025-11-13T00:00:00',
'set_end_date' => '2026-11-13T00:00:00',
'set_recur' => [
'rec_start_date' => '2025-11-13T00:00:00',
'rec_end_date' => '2026-11-13T00:00:00',
'recur_interval_amount' => 1,
'recur_interval_description' => 'Every 1 week.'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access_token: <api-key>",
"client_id: <api-key>",
"client_secret: <api-key>"
],
]);
$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.usecobalt.com/v1/providers/ehr/{ehr_id}"
payload := strings.NewReader("{\n \"hours\": [\n {\n \"shifts\": [\n {\n \"start\": \"T08:00:00\",\n \"end\": \"T17:00:00\",\n \"facility_id\": \"<string>\",\n \"set_start_date\": \"2025-11-13T00:00:00\",\n \"set_end_date\": \"2026-11-13T00:00:00\",\n \"set_recur\": {\n \"rec_start_date\": \"2025-11-13T00:00:00\",\n \"rec_end_date\": \"2026-11-13T00:00:00\",\n \"recur_interval_amount\": 1,\n \"recur_interval_description\": \"Every 1 week.\"\n }\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
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.usecobalt.com/v1/providers/ehr/{ehr_id}")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"hours\": [\n {\n \"shifts\": [\n {\n \"start\": \"T08:00:00\",\n \"end\": \"T17:00:00\",\n \"facility_id\": \"<string>\",\n \"set_start_date\": \"2025-11-13T00:00:00\",\n \"set_end_date\": \"2026-11-13T00:00:00\",\n \"set_recur\": {\n \"rec_start_date\": \"2025-11-13T00:00:00\",\n \"rec_end_date\": \"2026-11-13T00:00:00\",\n \"recur_interval_amount\": 1,\n \"recur_interval_description\": \"Every 1 week.\"\n }\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/providers/ehr/{ehr_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hours\": [\n {\n \"shifts\": [\n {\n \"start\": \"T08:00:00\",\n \"end\": \"T17:00:00\",\n \"facility_id\": \"<string>\",\n \"set_start_date\": \"2025-11-13T00:00:00\",\n \"set_end_date\": \"2026-11-13T00:00:00\",\n \"set_recur\": {\n \"rec_start_date\": \"2025-11-13T00:00:00\",\n \"rec_end_date\": \"2026-11-13T00:00:00\",\n \"recur_interval_amount\": 1,\n \"recur_interval_description\": \"Every 1 week.\"\n }\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"provider_id": "<string>"
}{
"success": true,
"message": "Provider with EMR ID 'example_ehr_id' not found for this organization."
}Example Request
curl -X PATCH https://api.usecobalt.com/v1/providers/ehr/12345 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"status": "active",
"hours": [
{
"day": "Monday",
"shifts": [
{
"start": "T09:00:00",
"end": "T18:00:00",
"facility_id": "095f8067-d3fc-4e13-b771-32f87cd0c3f2",
"set_start_date": "2025-11-13T00:00:00",
"set_end_date": "2026-11-13T00:00:00"
}
]
},
{
"day": "Tuesday",
"shifts": [
{
"start": "T08:00:00",
"end": "T17:00:00",
"facility_id": "095f8067-d3fc-4e13-b771-32f87cd0c3f2",
"set_start_date": "2025-11-13T00:00:00",
"set_end_date": "2026-11-13T00:00:00"
}
]
}
]
}'
{
"success": true,
"message": "Provider status and hours updated successfully.",
"provider_id": "abc123def4567890abcdef1234567890"
}
Request Body Parameters
You can update one or more of the following fields:-
status (string, optional): Provider’s sync status
"active": Schedule will be synced from EMR"inactive": Schedule will not be synced from EMR- Status is case-insensitive (“active”, “Active”, “ACTIVE” are all accepted)
-
hide_in_availability (string, optional): Controls whether provider is hidden from availability results
"false": Provider appears in/v1/availabilityendpoint (default behavior)"true": Provider is hidden from/v1/availabilityendpoint- Common use case: Set a provider to
"status": "active"and"hide_in_availability": "true"to continue syncing their schedule (for reporting purposes) while hiding them from new appointment availability
-
hours (array, optional): Provider’s working schedule
- The
facility_idmust exist in your organization’s locations - The
facility_namewill be automatically enriched from the database - Time format must be
THH:MM:SS(e.g.,T08:00:00) - Dates must be in ISO 8601 format (e.g.,
2025-11-13T00:00:00) - Days must be capitalized day names (Monday, Tuesday, etc.)
- The
Example: Hide Provider from Availability
curl -X PATCH https://api.usecobalt.com/v1/providers/ehr/12345 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"status": "active",
"hide_in_availability": "true"
}'
{
"success": true,
"message": "Provider status and hide_in_availability updated successfully.",
"provider_id": "abc123def4567890abcdef1234567890"
}
Authorizations
Path Parameters
The provider's EMR ID (ehr_id from GET /providers)
Body
application/json
⌘I