Events and subscriptions
Register an endpoint for events, read the events and their delivery state, and replay a parked event.
On this page
List events
GET /crm/v1/events
Returns the events of your subscriptions in pages, the newest first, with the state of their delivery.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
state | query | string | Nooptional | Only events in this delivery state. One of delivered, retrying, parked, replayed |
limit | query | integer | Nooptional | Records per page. Default 100 Range 1 – 500 |
cursor | query | string | Nooptional | The nextCursor of the previous page. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | A page of records. | EventPage |
400 | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. fields names each one. | Error |
401 | The token is missing, expired or not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
429 | The request was refused and not processed: the code is rate_limited. Wait the seconds in the header Retry-After, then send it again with the same operationId. | Error |
503 | The service cannot answer now: the code is unavailable. Send the request again with the same operationId. | Error |
Request
curl
curl "$RDC_BASE_URL/crm/v1/events?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/crm/v1/events?limit=20`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/crm/v1/events?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/crm/v1/events?limit=20');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/crm/v1/events?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 200
{
"items": [
{
"id": "5e2b9c47-8d13-4a6f-b0e5-71c4a2d93f68",
"type": "com.rdcopilot.crm.deal.won.v1",
"time": "2026-11-23T09:41:07Z",
"aggregateId": "0d7e2b85-f1a3-4c69-b2d4-93a8e5c61d38",
"state": "parked",
"attempts": 6
}
],
"nextCursor": null
} Replay an event
POST /crm/v1/events/{eventId}/replay
Sends a parked event again, with the same id, to the subscriptions it belongs to.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
eventId | path | string (uuid) | Yesrequired | The event. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result. | OperationResult |
400 | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. fields names each one. | Error |
401 | The token is missing, expired or not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The request was refused. The code is event_not_found. | Error |
409 | The request was refused. The code is operation_reused. | Error |
429 | The request was refused and not processed: the code is rate_limited. Wait the seconds in the header Retry-After, then send it again with the same operationId. | Error |
503 | The service cannot answer now: the code is unavailable. Send the request again with the same operationId. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/crm/v1/events/5e2b9c47-8d13-4a6f-b0e5-71c4a2d93f68/replay" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "cc249500-7b52-4ab6-a250-393771b0a1b5"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/crm/v1/events/5e2b9c47-8d13-4a6f-b0e5-71c4a2d93f68/replay`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "cc249500-7b52-4ab6-a250-393771b0a1b5"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/crm/v1/events/5e2b9c47-8d13-4a6f-b0e5-71c4a2d93f68/replay',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'cc249500-7b52-4ab6-a250-393771b0a1b5',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "cc249500-7b52-4ab6-a250-393771b0a1b5"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/crm/v1/events/5e2b9c47-8d13-4a6f-b0e5-71c4a2d93f68/replay');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/crm/v1/events/5e2b9c47-8d13-4a6f-b0e5-71c4a2d93f68/replay");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "cc249500-7b52-4ab6-a250-393771b0a1b5"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "cc249500-7b52-4ab6-a250-393771b0a1b5",
"status": "accepted",
"aggregateRevision": 1
} Create a subscription
POST /crm/v1/subscriptions
Registers an HTTPS endpoint of yours for the event types you name. Every delivery is signed with the secret of the subscription, which the answer returns once.
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
endpoint | string | Yesrequired | The HTTPS address that receives the events. |
eventTypes | string[] | Yesrequired | The event types to send, for example com.rdcopilot.crm.deal.won.v1. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result. | SubscriptionOperationResult |
400 | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. fields names each one. | Error |
401 | The token is missing, expired or not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
409 | The request was refused. The code is operation_reused. | Error |
429 | The request was refused and not processed: the code is rate_limited. Wait the seconds in the header Retry-After, then send it again with the same operationId. | Error |
503 | The service cannot answer now: the code is unavailable. Send the request again with the same operationId. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/crm/v1/subscriptions" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "1fbc2b63-7014-47b0-bb19-a187c17942ff",
"endpoint": "https://hooks.brumar.example/crm",
"eventTypes": [
"com.rdcopilot.crm.deal.won.v1",
"com.rdcopilot.crm.deal.lost.v1"
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/crm/v1/subscriptions`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "1fbc2b63-7014-47b0-bb19-a187c17942ff",
"endpoint": "https://hooks.brumar.example/crm",
"eventTypes": [
"com.rdcopilot.crm.deal.won.v1",
"com.rdcopilot.crm.deal.lost.v1"
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/crm/v1/subscriptions',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '1fbc2b63-7014-47b0-bb19-a187c17942ff',
'endpoint': 'https://hooks.brumar.example/crm',
'eventTypes': [
'com.rdcopilot.crm.deal.won.v1',
'com.rdcopilot.crm.deal.lost.v1',
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "1fbc2b63-7014-47b0-bb19-a187c17942ff",
"endpoint": "https://hooks.brumar.example/crm",
"eventTypes": [
"com.rdcopilot.crm.deal.won.v1",
"com.rdcopilot.crm.deal.lost.v1"
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/crm/v1/subscriptions');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/crm/v1/subscriptions");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "1fbc2b63-7014-47b0-bb19-a187c17942ff",
"endpoint": "https://hooks.brumar.example/crm",
"eventTypes": [
"com.rdcopilot.crm.deal.won.v1",
"com.rdcopilot.crm.deal.lost.v1"
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "1fbc2b63-7014-47b0-bb19-a187c17942ff",
"status": "accepted",
"aggregateRevision": 1,
"subscriptionId": "80ac5030-d20e-41ee-bde0-732f5bd6d9dc",
"secret": "whsec_VGhlIHNpZ25pbmcgc2VjcmV0IG9mIHRoZSBDUk0gZG9jcy4="
} Rotate the secret of a subscription
POST /crm/v1/subscriptions/{subscriptionId}/secret
Returns a new signing secret, once. For 24 hours every delivery carries a signature made with each secret, then only the one made with the new secret.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
subscriptionId | path | string (uuid) | Yesrequired | The subscription. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result. | SubscriptionOperationResult |
400 | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. fields names each one. | Error |
401 | The token is missing, expired or not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The request was refused. The code is subscription_not_found. | Error |
409 | The request was refused. The code is operation_reused. | Error |
429 | The request was refused and not processed: the code is rate_limited. Wait the seconds in the header Retry-After, then send it again with the same operationId. | Error |
503 | The service cannot answer now: the code is unavailable. Send the request again with the same operationId. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/crm/v1/subscriptions/80ac5030-d20e-41ee-bde0-732f5bd6d9dc/secret" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "fafbf6d9-5603-4274-ad37-b8eb5ff445f7"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/crm/v1/subscriptions/80ac5030-d20e-41ee-bde0-732f5bd6d9dc/secret`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "fafbf6d9-5603-4274-ad37-b8eb5ff445f7"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/crm/v1/subscriptions/80ac5030-d20e-41ee-bde0-732f5bd6d9dc/secret',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'fafbf6d9-5603-4274-ad37-b8eb5ff445f7',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "fafbf6d9-5603-4274-ad37-b8eb5ff445f7"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/crm/v1/subscriptions/80ac5030-d20e-41ee-bde0-732f5bd6d9dc/secret');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/crm/v1/subscriptions/80ac5030-d20e-41ee-bde0-732f5bd6d9dc/secret");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "fafbf6d9-5603-4274-ad37-b8eb5ff445f7"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "fafbf6d9-5603-4274-ad37-b8eb5ff445f7",
"status": "accepted",
"aggregateRevision": 2,
"subscriptionId": "80ac5030-d20e-41ee-bde0-732f5bd6d9dc",
"secret": "whsec_VGhlIG5leHQgc2lnbmluZyBzZWNyZXQgb2YgdGhlIENSTS4="
}