List patients
curl --request GET \
--url https://api.usecobalt.com/v1/patients \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/patients"
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {client_id: '<api-key>', client_secret: '<api-key>', access_token: '<api-key>'}
};
fetch('https://api.usecobalt.com/v1/patients', 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/patients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.usecobalt.com/v1/patients"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usecobalt.com/v1/patients")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"patients": [
{
"id": "<string>",
"ehr_id": "<string>",
"mrn": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"dob": "2023-12-25",
"sex": "<string>",
"phone": "<string>",
"cell_phone": "<string>",
"phone_numbers": {
"primary": "<string>",
"cell": "<string>",
"home": "<string>",
"work": "<string>"
},
"insurance_name": "<string>",
"insurance_subscriber_number": "<string>",
"address_street": "<string>",
"address_city": "<string>",
"address_state": "<string>",
"address_zip": "<string>",
"pcp_first_name": "<string>",
"pcp_last_name": "<string>",
"status": "<string>",
"rendering_provider_id": "<string>",
"inactivated_at": "2023-11-07T05:31:56Z",
"last_seen": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"object_metadata": {
"source": "cobalt_operation",
"created_at": "2023-11-07T05:31:56Z"
},
"medications": "<unknown>",
"problems": "<unknown>",
"vitals": "<unknown>"
}
],
"pagination": {
"current_page": 123,
"total_pages": 123,
"total_count": 123,
"page_size": 123
}
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}Patients
Get Patients
Returns a list of patients with optional filtering and pagination.
GET
/
patients
List patients
curl --request GET \
--url https://api.usecobalt.com/v1/patients \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/patients"
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {client_id: '<api-key>', client_secret: '<api-key>', access_token: '<api-key>'}
};
fetch('https://api.usecobalt.com/v1/patients', 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/patients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.usecobalt.com/v1/patients"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usecobalt.com/v1/patients")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"patients": [
{
"id": "<string>",
"ehr_id": "<string>",
"mrn": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"dob": "2023-12-25",
"sex": "<string>",
"phone": "<string>",
"cell_phone": "<string>",
"phone_numbers": {
"primary": "<string>",
"cell": "<string>",
"home": "<string>",
"work": "<string>"
},
"insurance_name": "<string>",
"insurance_subscriber_number": "<string>",
"address_street": "<string>",
"address_city": "<string>",
"address_state": "<string>",
"address_zip": "<string>",
"pcp_first_name": "<string>",
"pcp_last_name": "<string>",
"status": "<string>",
"rendering_provider_id": "<string>",
"inactivated_at": "2023-11-07T05:31:56Z",
"last_seen": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"object_metadata": {
"source": "cobalt_operation",
"created_at": "2023-11-07T05:31:56Z"
},
"medications": "<unknown>",
"problems": "<unknown>",
"vitals": "<unknown>"
}
],
"pagination": {
"current_page": 123,
"total_pages": 123,
"total_count": 123,
"page_size": 123
}
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}Example Request
curl -X GET https://api.usecobalt.com/v1/patients \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-G \
--data-urlencode "first_name=John" \
--data-urlencode "last_name=Doe" \
--data-urlencode "page=2" \
--data-urlencode "page_size=30" \
--data-urlencode "sort=-created_at"
Example Response
{
"success": true,
"patients": [
{
"id": "65ed04f9d25fca3876f367d9ad94e3c3",
"ehr_id": "123456",
"mrn": "414421",
"first_name": "John",
"last_name": "Doe",
"dob": "1980-05-15",
"sex": "male",
"phone": "555-123-4567",
"cell_phone": "555-123-4568",
"home_phone": null,
"work_phone": null,
"phone_numbers": {
"primary": "555-123-4567",
"cell": "555-123-4568",
"home": null,
"work": null
},
"insurance_name": "Aetna",
"insurance_subscriber_number": "ABC123456",
"address_street": "123 Main St",
"address_city": "Springfield",
"address_state": "IL",
"address_zip": "62701",
"pcp_first_name": "Jane",
"pcp_last_name": "Smith",
"status": "active",
"created_at": "2024-09-01T14:30:00Z",
"object_metadata": {
"source": "cobalt_operation",
"created_at": "2024-09-01T14:30:00Z"
}
}
],
"pagination": {
"current_page": 2,
"total_pages": 5,
"total_count": 150,
"page_size": 30
}
}
All filter parameters are optional. If no filters are provided, the endpoint returns all patients, paginated according to the default values or specified page and page_size. To resolve a patient you already track by an external identifier, filter by
mrn or ehr_id (both are exact-match): the response includes Cobalt’s id alongside ehr_id and mrn.ehr_id is the patient’s EHR-native identifier. It is null while a patient is still pending creation or failed in the EHR, and is populated once the EHR record exists. object_metadata.source reports provenance: cobalt_operation, ehr_sync, or unknown.Authorizations
Query Parameters
Filter by date of birth (YYYY-MM-DD).
Example:
"1980-01-15"
Filter by first name.
Example:
"Jane"
Filter by last name.
Example:
"Doe"
Filter by phone.
Example:
"555-123-4567"
Filter by cell phone.
Example:
"555-987-6543"
Filter by Medical Record Number.
Example:
"12345"
Filter by EMR patient ID.
Filter by two-letter U.S. state abbreviation.
Example:
"CA"
Filter by status: active, inactive, or all (default active).
Legacy toggle to include inactive patients. Prefer status. When true, inactive patients are returned alongside active ones.
Available options:
true, false Sort order by creation time: created_at (oldest first) or -created_at (newest first, default).
Page number (>= 1, default 1).
Required range:
x >= 1Results per page (1–1000, default 100).
Required range:
1 <= x <= 1000