List referring providers
curl --request GET \
--url https://api.usecobalt.com/v1/referring-providers \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/referring-providers"
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/referring-providers', 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/referring-providers",
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/referring-providers"
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/referring-providers")
.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/referring-providers")
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,
"referring_providers": [
{
"id": "980a7e9525a34ca39bf39ba318448ace",
"ehr_id": "provider-123",
"name": "Jane Doe",
"first_name": "Jane",
"last_name": "Doe",
"middle_initial": "A",
"speciality": "Cardiology",
"phone": "555-123-4567",
"fax": "555-123-4568",
"email": "referrals@example-clinic.com",
"npi": "1234567890",
"address_street": "123 Main Street",
"address_city": "Los Angeles",
"address_state": "CA",
"address_zip": "90001",
"object_metadata": {}
}
]
}{
"success": false,
"message": "Bad request — missing or invalid parameters"
}{
"success": false,
"message": "Unauthorized — missing or invalid credentials"
}{
"success": false,
"message": "Internal server error"
}Referring Providers
Get Referring Providers
Retrieve referring providers from the EMR system for your organization.
GET
/
referring-providers
List referring providers
curl --request GET \
--url https://api.usecobalt.com/v1/referring-providers \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/referring-providers"
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/referring-providers', 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/referring-providers",
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/referring-providers"
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/referring-providers")
.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/referring-providers")
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,
"referring_providers": [
{
"id": "980a7e9525a34ca39bf39ba318448ace",
"ehr_id": "provider-123",
"name": "Jane Doe",
"first_name": "Jane",
"last_name": "Doe",
"middle_initial": "A",
"speciality": "Cardiology",
"phone": "555-123-4567",
"fax": "555-123-4568",
"email": "referrals@example-clinic.com",
"npi": "1234567890",
"address_street": "123 Main Street",
"address_city": "Los Angeles",
"address_state": "CA",
"address_zip": "90001",
"object_metadata": {}
}
]
}{
"success": false,
"message": "Bad request — missing or invalid parameters"
}{
"success": false,
"message": "Unauthorized — missing or invalid credentials"
}{
"success": false,
"message": "Internal server error"
}Query Parameters
All parameters are optional and can be combined to filter results:- first_name (string): Filter by first name (case-insensitive, partial match)
- last_name (string): Filter by last name (case-insensitive, partial match)
- phone (string): Filter by phone number (accepts any format, e.g., “7734722936” or “773-472-2936”)
- fax (string): Filter by fax number (accepts any format)
- npi (string): Filter by NPI (exact match)
- emr_referring_provider_id (string): Filter by the referring provider’s EMR ID (exact match). Use this to resolve a referring provider’s Cobalt
id(forpcp_id) from the EMR ID you already hold.
Example Requests
Get All Referring Providers
curl -X GET "https://api.usecobalt.com/v1/referring-providers" \
-H "client_id: your_client_id" \
-H "client_secret: your_client_secret" \
-H "access_token: your_access_token"
Filter by Last Name
curl -X GET "https://api.usecobalt.com/v1/referring-providers?last_name=smith" \
-H "client_id: your_client_id" \
-H "client_secret: your_client_secret" \
-H "access_token: your_access_token"
Filter by NPI
curl -X GET "https://api.usecobalt.com/v1/referring-providers?npi=1780690362" \
-H "client_id: your_client_id" \
-H "client_secret: your_client_secret" \
-H "access_token: your_access_token"
Filter by Phone
curl -X GET "https://api.usecobalt.com/v1/referring-providers?phone=773-472-2936" \
-H "client_id: your_client_id" \
-H "client_secret: your_client_secret" \
-H "access_token: your_access_token"
Resolve Cobalt id from EMR ID (for pcp_id)
curl -X GET "https://api.usecobalt.com/v1/referring-providers?emr_referring_provider_id=350143" \
-H "client_id: your_client_id" \
-H "client_secret: your_client_secret" \
-H "access_token: your_access_token"
Example Response
{
"success": true,
"referring_providers": [
{
"id": "e35e82b85df58f08a9b38e06a91e9f1a",
"ehr_id": "350143",
"first_name": "jane",
"last_name": "Doe",
"middle_initial": null,
"speciality": "Primary Care Doctor",
"phone": "222-333-4444",
"fax": "222-333-4444",
"email": null,
"npi": "98374982374",
"address_street": "3336 N Main AVE",
"address_city": "Main",
"address_state": "IL",
"address_zip": "22333"
},
]
}
Response Fields
Top-Level Fields
- success (boolean): Whether the request was successful
- referring_providers (array): Array of referring provider objects for the organization
Referring Provider Object
- id (string): Cobalt referring provider ID (UUID without dashes)
- ehr_id (string): The referring provider ID as it appears in the EMR system
- name (string): Full name (typically formatted as “LASTNAME,FIRSTNAME”)
- first_name (string): Provider’s first name
- last_name (string): Provider’s last name
- middle_initial (string, nullable): Provider’s middle initial
- speciality (string, nullable): Medical speciality (e.g., “Cardiology”, “Primary Care Doctor”)
- phone (string, nullable): Contact phone number in format XXX-XXX-XXXX
- fax (string, nullable): Fax number in format XXX-XXX-XXXX
- email (string, nullable): Contact email address
- npi (string, nullable): National Provider Identifier
- address_street (string, nullable): Street address
- address_city (string, nullable): City name
- address_state (string, nullable): State abbreviation
- address_zip (string, nullable): ZIP code
Notes
- All referring providers returned are active in the system
- Phone and fax numbers are normalized to XXX-XXX-XXXX format
- Search filters are applied as partial matches (except NPI which is exact)
- Results are ordered by last name, then first name alphabetically
Authorizations
Query Parameters
Filter by first name.
Example:
"Jane"
Filter by last name.
Example:
"Doe"
Filter by phone number.
Example:
"555-123-4567"
Filter by fax number.
Example:
"555-123-4568"
Filter by National Provider Identifier.
Example:
"1234567890"
Filter by the referring provider's EMR ID. Use this to resolve a referring provider's Cobalt id (for pcp_id) from the EMR ID you already hold.
Example:
"provider-123"
Response
Referring providers for the account
Example:
true
Show child attributes
Show child attributes
Example:
[ { "id": "980a7e9525a34ca39bf39ba318448ace", "ehr_id": "provider-123", "name": "Jane Doe", "first_name": "Jane", "last_name": "Doe", "middle_initial": "A", "speciality": "Cardiology", "phone": "555-123-4567", "fax": "555-123-4568", "email": "referrals@example-clinic.com", "npi": "1234567890", "address_street": "123 Main Street", "address_city": "Los Angeles", "address_state": "CA", "address_zip": "90001", "object_metadata": {} } ]