curl --request GET \
--url https://api.affinity.co/v2/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/webhooks/{webhookId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/webhooks/{webhookId}', 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.affinity.co/v2/webhooks/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.affinity.co/v2/webhooks/{webhookId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.affinity.co/v2/webhooks/{webhookId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/webhooks/{webhookId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 1,
"url": "https://example.com/affinity-events",
"subscriptions": [
"list.created"
],
"status": "active",
"creator": {
"id": 1
},
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z"
}{
"errors": [
{
"code": "bad-request",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "not-found",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authentication",
"message": "<string>"
}
]
}Get a single Webhook
| ⚠️ This endpoint is currently in BETA |
|---|
Returns a single Webhook created by the caller. Users allowed to manage all webhooks may retrieve any Webhook in the organization. Responds with 404 when the webhook does not exist or is not accessible.
curl --request GET \
--url https://api.affinity.co/v2/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/webhooks/{webhookId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/webhooks/{webhookId}', 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.affinity.co/v2/webhooks/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.affinity.co/v2/webhooks/{webhookId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.affinity.co/v2/webhooks/{webhookId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/webhooks/{webhookId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 1,
"url": "https://example.com/affinity-events",
"subscriptions": [
"list.created"
],
"status": "active",
"creator": {
"id": 1
},
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z"
}{
"errors": [
{
"code": "bad-request",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "not-found",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authentication",
"message": "<string>"
}
]
}Authorizations
A static Affinity API key, presented as a bearer token.
Path Parameters
Webhook ID
1 <= x <= 9007199254740991Response
OK
A webhook subscription that delivers event notifications to an external URL.
The webhook's unique identifier
1 <= x <= 90071992547409911
The URL event payloads are delivered to.
"https://example.com/affinity-events"
The event types this webhook receives. An empty array means the webhook receives all event types.
100An event type a webhook can subscribe to. Values match the type field of delivered webhook payloads and are shared with the v1 webhook API.
list.created, list.updated, list.deleted, list_entry.created, list_entry.deleted, note.created, note.updated, note.deleted, field.created, field.updated, field.deleted, field_value.created, field_value.updated, field_value.deleted, person.created, person.updated, person.deleted, organization.created, organization.updated, organization.deleted, organization.merged, opportunity.created, opportunity.updated, opportunity.deleted, file.created, file.deleted, smart_interaction_value.updated, reminder.created, reminder.updated, reminder.deleted Whether the webhook currently delivers events. A disabled webhook keeps its configuration but does not deliver events.
active, disabled "active"
The person who created the webhook. null when the creator is not recorded.
Show child attributes
Show child attributes
When the webhook was created.
"2026-01-01T00:00:00Z"
When the webhook was last updated. null if the webhook has never been updated.
"2026-01-01T00:00:00Z"
Was this page helpful?