Get a webhook event
curl --request GET \
--url https://api.usecobalt.com/v1/webhook-events/{id} \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/webhook-events/{id}"
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/webhook-events/{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/webhook-events/{id}",
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/webhook-events/{id}"
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/webhook-events/{id}")
.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/webhook-events/{id}")
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,
"webhook_event": {
"event_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"event_type": "access_token.login_required",
"webhook_url": "https://example.com/hooks/cobalt",
"delivery_status": "success",
"data": {},
"created_at": "<string>",
"job_id": "<string>",
"api_log_id": 123,
"access_token_reference_id": "account-42",
"access_token_id": "b7c4f1d2-8a3e-4b56-9c01-2d3e4f5a6b7c"
}
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}Webhooks
Get Webhook Event
Retrieve a single webhook event by its event ID.
GET
/
webhook-events
/
{id}
Get a webhook event
curl --request GET \
--url https://api.usecobalt.com/v1/webhook-events/{id} \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/webhook-events/{id}"
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/webhook-events/{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/webhook-events/{id}",
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/webhook-events/{id}"
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/webhook-events/{id}")
.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/webhook-events/{id}")
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,
"webhook_event": {
"event_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"event_type": "access_token.login_required",
"webhook_url": "https://example.com/hooks/cobalt",
"delivery_status": "success",
"data": {},
"created_at": "<string>",
"job_id": "<string>",
"api_log_id": 123,
"access_token_reference_id": "account-42",
"access_token_id": "b7c4f1d2-8a3e-4b56-9c01-2d3e4f5a6b7c"
}
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}Use this endpoint to retrieve a specific webhook event by its ID.
This error occurs when:
Path Parameters
- id (required): The unique identifier of the webhook event (the
event_idfrom the list endpoint)
Example Request
curl -X GET "https://api.usecobalt.com/v1/webhook-events/evt_abc123def456" \
-H "client_id: your_client_id" \
-H "client_secret: your_client_secret" \
-H "access_token: your_access_token"
Example Response
{
"success": true,
"webhook_event": {
"event_id": "evt_abc123def456",
"event_type": "appointment.created",
"webhook_url": "https://your-webhook-url.com/webhooks",
"delivery_status": "success",
"data": {
"appointment_id": "appt123456789",
"date_time": "2025-01-20T14:30:00",
"timezone": "America/Los_Angeles",
"provider_id": "prov_456",
"secondary_provider_id": null,
"provider_name": "Dr. Jane Smith",
"mrn": "MRN123456"
},
"created_at": "2025-01-15T11:00:00.000Z",
"job_id": "67890",
"access_token_reference_id": "your_reference_id"
}
}
Response Fields
- event_id (string): Unique event identifier
- event_type (string): Event type (e.g., “patient.insurance.added”, “appointment.created”)
- webhook_url (string): The URL the event was sent to
- delivery_status (string): Delivery status - “success” or “failed”
- data (object): Event-specific payload data
- created_at (string): ISO 8601 timestamp of event creation
- job_id (string, nullable): Job ID if this event is related to an asynchronous operation
- access_token_reference_id (string, nullable): The reference ID associated with your access token
Error Responses
Webhook Event Not Found
{
"success": false,
"message": "Webhook event not found."
}
- The event ID doesn’t exist
- The event belongs to a different user account
The
data field contains event-specific information that varies depending on the event type. Refer to the webhook event docs for payload structures: Operation Events, Sync Events, Account Events.