Get account settings
curl --request GET \
--url https://api.usecobalt.com/v1/settings \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/settings"
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/settings', 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/settings",
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/settings"
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/settings")
.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/settings")
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,
"data": {
"access_token_reference_id": "account-42",
"visit_types": [
{
"id": "NP",
"name": "New Patient"
}
],
"visit_statuses": [
{
"id": "scheduled",
"name": "Scheduled"
}
],
"required_patient_fields": [
"first_name",
"last_name",
"dob"
],
"timezone": "America/Los_Angeles",
"staff_list": [
{
"ehr_id": "STAFF-123",
"name": "Alex Smith"
}
],
"staff_groups": [
{
"ehr_id": "group-123",
"name": "Clinical Team"
}
],
"phone_call_types": [
{
"ehr_id": "13",
"name": "Prescription Refill"
}
],
"patient_note_tags": [
{
"ehr_id": "5",
"name": "General Notes"
}
],
"insurance_companies": [
{
"id": "insurance-provider-123",
"name": "Blue Cross Anthem"
}
],
"policy_types": [
"PPO"
],
"departments": [
{
"id": "department-1",
"name": "Primary Care"
}
]
}
}{
"success": false,
"message": "Bad request — missing or invalid parameters"
}{
"success": false,
"message": "Unauthorized — missing or invalid credentials"
}{
"success": false,
"message": "Resource not found"
}{
"success": false,
"message": "Internal server error"
}Settings
Get Settings
Returns the current settings for the associated access token.
GET
/
settings
Get account settings
curl --request GET \
--url https://api.usecobalt.com/v1/settings \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/settings"
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/settings', 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/settings",
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/settings"
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/settings")
.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/settings")
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,
"data": {
"access_token_reference_id": "account-42",
"visit_types": [
{
"id": "NP",
"name": "New Patient"
}
],
"visit_statuses": [
{
"id": "scheduled",
"name": "Scheduled"
}
],
"required_patient_fields": [
"first_name",
"last_name",
"dob"
],
"timezone": "America/Los_Angeles",
"staff_list": [
{
"ehr_id": "STAFF-123",
"name": "Alex Smith"
}
],
"staff_groups": [
{
"ehr_id": "group-123",
"name": "Clinical Team"
}
],
"phone_call_types": [
{
"ehr_id": "13",
"name": "Prescription Refill"
}
],
"patient_note_tags": [
{
"ehr_id": "5",
"name": "General Notes"
}
],
"insurance_companies": [
{
"id": "insurance-provider-123",
"name": "Blue Cross Anthem"
}
],
"policy_types": [
"PPO"
],
"departments": [
{
"id": "department-1",
"name": "Primary Care"
}
]
}
}{
"success": false,
"message": "Bad request — missing or invalid parameters"
}{
"success": false,
"message": "Unauthorized — missing or invalid credentials"
}{
"success": false,
"message": "Resource not found"
}{
"success": false,
"message": "Internal server error"
}Example Request
curl -X GET https://api.usecobalt.com/v1/settings \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH'
Example Response
{
"success": true,
"data": {
"access_token_reference_id": "at_ref_123456789",
"visit_types": [
{
"code": "new_patient",
"description": "New Patient Visit (in-person)"
},
{
"code": "televisit1",
"description": "televisit1 (televisit / osa)"
}
],
"visit_statuses": [
{
"code": "CANC",
"description": "Cancelled in advance"
},
{
"code": "R/S",
"description": "Rescheduled"
}
],
"required_patient_fields": [
"first_name",
"last_name",
"dob",
"sex"
],
"timezone": "America/New_York",
"staff_list": [
{
"ehr_id": "12220",
"name": "Smith,Jane"
},
{
"ehr_id": "12241",
"name": "Doe,John"
}
],
"staff_groups": [
{
"ehr_id": "3",
"name": "Front Desk"
}
],
"phone_call_types": [
{
"ehr_id": "13",
"name": "Prescription Refill"
}
],
"patient_note_tags": [
{
"ehr_id": "5",
"name": "General Notes"
}
],
"departments": [
{
"ehr_id": "1",
"name": "MEDICAL",
"type": "MED",
"location_ehr_id": "12"
},
{
"ehr_id": "2",
"name": "BEHAVIORAL HEALTH",
"type": "MED",
"location_ehr_id": "12"
},
{
"ehr_id": "5",
"name": "RADIOLOGY",
"type": "MED",
"location_ehr_id": "17"
}
]
}
}
Settings include the access token reference ID, available visit types (with codes and descriptions), and the user’s timezone. If settings are not found for the user, a 404 error will be returned.
Authorizations
Response
Account settings
Example:
true
Show child attributes
Show child attributes
Example:
{
"access_token_reference_id": "account-42",
"visit_types": [{ "id": "NP", "name": "New Patient" }],
"visit_statuses": [{ "id": "scheduled", "name": "Scheduled" }],
"required_patient_fields": ["first_name", "last_name", "dob"],
"timezone": "America/Los_Angeles",
"staff_list": [
{
"ehr_id": "STAFF-123",
"name": "Alex Smith"
}
],
"staff_groups": [
{
"ehr_id": "group-123",
"name": "Clinical Team"
}
],
"phone_call_types": [
{
"ehr_id": "13",
"name": "Prescription Refill"
}
],
"patient_note_tags": [{ "ehr_id": "5", "name": "General Notes" }],
"insurance_companies": [
{
"id": "insurance-provider-123",
"name": "Blue Cross Anthem"
}
],
"policy_types": ["PPO"],
"departments": [
{
"id": "department-1",
"name": "Primary Care"
}
]
}