Create a claim
curl --request POST \
--url https://api.usecobalt.com/v1/claims \
--header 'Content-Type: application/json' \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>' \
--data '
{
"appointment_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"callback_urls": [
"https://example.com/webhooks/cobalt"
]
}
'import requests
url = "https://api.usecobalt.com/v1/claims"
payload = {
"appointment_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"callback_urls": ["https://example.com/webhooks/cobalt"]
}
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
appointment_id: 'a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4',
callback_urls: ['https://example.com/webhooks/cobalt']
})
};
fetch('https://api.usecobalt.com/v1/claims', 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/claims",
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([
'appointment_id' => 'a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4',
'callback_urls' => [
'https://example.com/webhooks/cobalt'
]
]),
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/claims"
payload := strings.NewReader("{\n \"appointment_id\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.usecobalt.com/v1/claims")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"appointment_id\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/claims")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"appointment_id\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"claim_id": "<string>",
"appointment_id": "<string>",
"job_id": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}Claims
Create Claim
Creates a claim for a given appointment in the connected EMR system.
POST
/
claims
Create a claim
curl --request POST \
--url https://api.usecobalt.com/v1/claims \
--header 'Content-Type: application/json' \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>' \
--data '
{
"appointment_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"callback_urls": [
"https://example.com/webhooks/cobalt"
]
}
'import requests
url = "https://api.usecobalt.com/v1/claims"
payload = {
"appointment_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"callback_urls": ["https://example.com/webhooks/cobalt"]
}
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
appointment_id: 'a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4',
callback_urls: ['https://example.com/webhooks/cobalt']
})
};
fetch('https://api.usecobalt.com/v1/claims', 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/claims",
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([
'appointment_id' => 'a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4',
'callback_urls' => [
'https://example.com/webhooks/cobalt'
]
]),
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/claims"
payload := strings.NewReader("{\n \"appointment_id\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.usecobalt.com/v1/claims")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"appointment_id\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/claims")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"appointment_id\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4\",\n \"callback_urls\": [\n \"https://example.com/webhooks/cobalt\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"claim_id": "<string>",
"appointment_id": "<string>",
"job_id": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}This is an async operation. The endpoint returns
202 Accepted immediately after queuing the claim, and a webhook event is sent to your registered endpoint once the claim has been created (or has failed) in the EMR.Request Parameters
Required Fields
- appointment_id (string, required): The Cobalt appointment ID to create a claim for. The appointment must belong to the authenticated user and have an associated EMR appointment ID.
Example Request
curl -X POST https://api.usecobalt.com/v1/claims \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"appointment_id": "a1b2c3d4e5f64g7h8i9jk0l1m2n3o4p5"
}'
Example Response
{
"success": true,
"message": "Claim creation queued. A webhook event will be sent upon completion.",
"claim_id": "f4g5h6i7j8k9l0m1n2o3p4q5r6s7t8u9",
"appointment_id": "a1b2c3d4e5f64g7h8i9jk0l1m2n3o4p5",
"job_id": 12345
}
- claim_id: Unique identifier for the queued claim record. Use this to correlate the eventual webhook event.
- appointment_id: Echo of the appointment the claim was queued against.
- job_id: Job execution identifier for tracking the async operation.
Error Responses
Missing Required Field
{
"success": false,
"message": "'appointment_id' is required."
}
Invalid Appointment ID Format
{
"success": false,
"message": "Invalid 'appointment_id' format. Please provide a valid UUID."
}
Appointment Missing EMR ID
Returned if the appointment exists but has not yet been synced with anemr_appointment_id.
{
"success": false,
"message": "Appointment is missing emr_appointment_id; cannot create claim."
}
Appointment Not Found
{
"success": false,
"message": "Appointment not found."
}
Duplicate Claim
Returned if a claim for this appointment is already in-flight (pending_create) or has already been completed. Failed claims do not block retries.
{
"success": false,
"message": "A claim for this appointment is already pending or completed."
}
Webhook Notifications
When the claim creation is complete, we will send a webhook to your registered endpoint. Here are examples of what those webhook payloads will look like:Success
{
"id": "evt_1J9X2q2eZvKYlo2CluR9g9gV",
"access_token_reference_id": "user_1J9X2q2eZvKYlo2Cxyz",
"object": "event",
"created": "2026-05-22T10:30:00Z",
"type": "claim.created",
"job_id": "12345",
"data": {
"claim_id": "f4g5h6i7j8k9l0m1n2o3p4q5r6s7t8u9",
"appointment_id": "a1b2c3d4e5f64g7h8i9jk0l1m2n3o4p5",
"patient_mrn": "MRN-12345",
"emr_claim_id": "100234",
"emr_appointment_id": "500100",
"emr_patient_id": "40210"
}
}
Failure
{
"id": "evt_1J9X2q2eZvKYlo2CluR9g9gW",
"access_token_reference_id": "user_1J9X2q2eZvKYlo2Cxyz",
"object": "event",
"created": "2026-05-22T10:35:00Z",
"type": "claim.failed",
"job_id": "12345",
"data": {
"claim_id": "f4g5h6i7j8k9l0m1n2o3p4q5r6s7t8u9",
"appointment_id": "a1b2c3d4e5f64g7h8i9jk0l1m2n3o4p5",
"patient_mrn": "MRN-12345",
"failure_reason": "Failed to create claim"
}
}
Authorizations
Body
application/json
Cobalt appointment ID (UUID, with or without dashes) to create the claim for. The appointment must belong to the caller and have an emr_appointment_id.
Example:
"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
URLs to receive the completion webhook for this claim, in addition to the account webhook.
Example:
["https://example.com/webhooks/cobalt"]