Webhook endpoints API reference
Register an HTTPS endpoint and its events, change or delete it, send a signed test event and read its delivery log. The event names and the signature rules are on the Webhooks page. 6 operations.
For AI agents: the docs index is at /llms.txt, and every page is also served as markdown at its URL plus .md.
#Operations
Register an HTTPS endpoint and its events, change or delete it, send a signed test event and read its delivery log. The event names and the signature rules are on the Webhooks page.
Authenticate as described in Authentication. Every operation below is generated from the OpenAPI document.
| Method and path | Scope | What it does |
|---|---|---|
POST /v1/webhooks | write | Register a webhook endpoint |
GET /v1/webhooks | read | List webhook endpoints |
PATCH /v1/webhooks/{id} | write | Change a webhook endpoint |
DELETE /v1/webhooks/{id} | write | Delete a webhook endpoint |
POST /v1/webhooks/{id}/test | write | Send a signed test event |
GET /v1/webhooks/{id}/deliveries | read | Read an endpoint's delivery log |
#POST /v1/webhooks
Registers an https URL for the events you choose (EmailSent, EmailReply, EmailBounce, LeadCreated, EmailUnsubscribe, CreditBalanceLow, AutopilotRunStatusChanged, DfyOrderCompleted, MailboxDisconnected, CampaignCompleted). The response includes the signing secret once; it cannot be shown again. Every delivery carries X-ColdAgentAI-Timestamp and X-ColdAgentAI-Signature (v1=hex HMAC-SHA256 of "timestamp.body"); reject anything more than 5 minutes old. Private, loopback and metadata addresses are refused, at registration and again at every delivery. At most 20 endpoints per account.
Scope: write. A read key gets 403 forbidden. Success: HTTP 201.
Request body
Send JSON with Content-Type: application/json. The body is required.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | An https URL on a public host. 1 to 2048 characters. |
events | array of "EmailSent" or "EmailReply" or "EmailBounce" or "LeadCreated" or "EmailUnsubscribe" or "CreditBalanceLow" or "AutopilotRunStatusChanged" or "DfyOrderCompleted" or "MailboxDisconnected" or "CampaignCompleted" | yes | The events to deliver. At least 1 items. |
description | string | no | 0 to 200 characters. |
enabled | boolean | no | Default true. |
{
"url": "abc123",
"events": [
"EmailSent"
]
}Response
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | No further constraints. |
url | string | yes | No further constraints. |
description | string or null | yes | No further constraints. |
events | array of "EmailSent" or "EmailReply" or "EmailBounce" or "LeadCreated" or "EmailUnsubscribe" or "CreditBalanceLow" or "AutopilotRunStatusChanged" or "DfyOrderCompleted" or "MailboxDisconnected" or "CampaignCompleted" | yes | No further constraints. |
enabled | boolean | yes | No further constraints. |
created_at | string | yes | No further constraints. |
updated_at | string | yes | No further constraints. |
secret | string | yes | The signing secret. Store it now; it is not shown again. |
{
"id": "id_8f3a2c1d",
"url": "abc123",
"description": "abc123",
"events": [
"EmailSent"
],
"enabled": true,
"created_at": "abc123",
"updated_at": "abc123",
"secret": "abc123"
}Errors
invalid_input, unauthorized, forbidden, payload_too_large, rate_limited, internal_error, provider_unavailable. Every error uses the single format.
Rate limits
Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.
Examples
curl -X POST "https://api.coldagentai.com/v1/webhooks" \
-H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "abc123",
"events": [
"EmailSent"
]
}'const res = await fetch(`https://api.coldagentai.com/v1/webhooks`, {
method: 'POST',
body: JSON.stringify({
"url": "abc123",
"events": [
"EmailSent"
]
}),
headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();#GET /v1/webhooks
This account's endpoints, oldest first. The signing secret is never returned.
Scope: read. A read key and a write key both work. Success: HTTP 200.
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Items per page, 1 to 100 (default 20). 1 to 100 |
cursor | string | no | next_cursor from the previous page. 0 to 500 characters |
Response
| Field | Type | Required | Description |
|---|---|---|---|
items | array of object | yes | No further constraints. |
items[].id | string | yes | No further constraints. |
items[].url | string | yes | No further constraints. |
items[].description | string or null | yes | No further constraints. |
items[].events | array of "EmailSent" or "EmailReply" or "EmailBounce" or "LeadCreated" or "EmailUnsubscribe" or "CreditBalanceLow" or "AutopilotRunStatusChanged" or "DfyOrderCompleted" or "MailboxDisconnected" or "CampaignCompleted" | yes | No further constraints. |
items[].enabled | boolean | yes | No further constraints. |
items[].created_at | string | yes | No further constraints. |
items[].updated_at | string | yes | No further constraints. |
next_cursor | string or null | yes | No further constraints. |
{
"items": [
{
"id": "id_8f3a2c1d",
"url": "abc123",
"description": "abc123",
"events": [
"EmailSent"
],
"enabled": true,
"created_at": "abc123",
"updated_at": "abc123"
}
],
"next_cursor": "abc123"
}Errors
invalid_input, unauthorized, rate_limited, internal_error, provider_unavailable. Every error uses the single format.
Rate limits
Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.
Examples
curl "https://api.coldagentai.com/v1/webhooks" \
-H "Authorization: Bearer $COLDAGENTAI_API_KEY"const res = await fetch(`https://api.coldagentai.com/v1/webhooks`, {
headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();#PATCH /v1/webhooks/{id}
Changes the URL, the events, the description or whether it is enabled. Endpoints created by an import arrive disabled; enable them here.
Scope: write. A read key gets 403 forbidden. Success: HTTP 200.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | 1 to 100 characters |
Request body
Send JSON with Content-Type: application/json. The body is required.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | no | 1 to 2048 characters. |
events | array of "EmailSent" or "EmailReply" or "EmailBounce" or "LeadCreated" or "EmailUnsubscribe" or "CreditBalanceLow" or "AutopilotRunStatusChanged" or "DfyOrderCompleted" or "MailboxDisconnected" or "CampaignCompleted" | no | At least 1 items. |
description | string or null | no | 0 to 200 characters. |
enabled | boolean | no | No further constraints. |
{
"url": "abc123",
"events": [
"EmailSent"
],
"description": "abc123"
}Response
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | No further constraints. |
url | string | yes | No further constraints. |
description | string or null | yes | No further constraints. |
events | array of "EmailSent" or "EmailReply" or "EmailBounce" or "LeadCreated" or "EmailUnsubscribe" or "CreditBalanceLow" or "AutopilotRunStatusChanged" or "DfyOrderCompleted" or "MailboxDisconnected" or "CampaignCompleted" | yes | No further constraints. |
enabled | boolean | yes | No further constraints. |
created_at | string | yes | No further constraints. |
updated_at | string | yes | No further constraints. |
{
"id": "id_8f3a2c1d",
"url": "abc123",
"description": "abc123",
"events": [
"EmailSent"
],
"enabled": true,
"created_at": "abc123",
"updated_at": "abc123"
}Errors
invalid_input, unauthorized, forbidden, unknown_product, payload_too_large, rate_limited, internal_error, provider_unavailable. Every error uses the single format.
Rate limits
Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.
Examples
curl -X PATCH "https://api.coldagentai.com/v1/webhooks/$WEBHOOK_ID" \
-H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "abc123",
"events": [
"EmailSent"
],
"description": "abc123"
}'const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/webhooks/${id}`, {
method: 'PATCH',
body: JSON.stringify({
"url": "abc123",
"events": [
"EmailSent"
],
"description": "abc123"
}),
headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();#DELETE /v1/webhooks/{id}
Deletes the endpoint and its delivery log. Deliveries still pending are dropped.
Scope: write. A read key gets 403 forbidden. Success: HTTP 200.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | 1 to 100 characters |
Response
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | No further constraints. |
deleted | true | yes | No further constraints. |
{
"id": "id_8f3a2c1d",
"deleted": true
}Errors
invalid_input, unauthorized, forbidden, unknown_product, rate_limited, internal_error, provider_unavailable. Every error uses the single format.
Rate limits
Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.
Examples
curl -X DELETE "https://api.coldagentai.com/v1/webhooks/$WEBHOOK_ID" \
-H "Authorization: Bearer $COLDAGENTAI_API_KEY"const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/webhooks/${id}`, {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();#POST /v1/webhooks/{id}/test
Delivers a real, signed webhook.test event to the endpoint now, through the same delivery code as live events, and reports what happened. The attempt is logged; if it fails it follows the normal retry schedule.
Scope: write. A read key gets 403 forbidden. Success: HTTP 200.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | 1 to 100 characters |
Response
| Field | Type | Required | Description |
|---|---|---|---|
delivery | object | yes | No further constraints. |
delivery.id | string | yes | No further constraints. |
delivery.endpoint_id | string | yes | No further constraints. |
delivery.event_id | string | yes | No further constraints. |
delivery.event_type | string | yes | No further constraints. |
delivery.status | "pending" or "succeeded" or "dead" or "cancelled" | yes | dead: every attempt failed. Retries back off from 30 seconds up to 6 hours, 8 attempts in all. |
delivery.attempts | integer | yes | No further constraints. |
delivery.next_attempt_at | string | yes | No further constraints. |
delivery.last_attempt_at | string or null | yes | No further constraints. |
delivery.last_http_status | integer or null | yes | No further constraints. |
delivery.last_error | string or null | yes | No further constraints. |
delivery.created_at | string | yes | No further constraints. |
delivery.completed_at | string or null | yes | No further constraints. |
result | object | yes | No further constraints. |
result.outcome | "succeeded" or "retry_scheduled" or "dead" or "cancelled" or "skipped" | yes | No further constraints. |
result.http_status | integer or null | yes | No further constraints. |
result.error | string or null | yes | No further constraints. |
{
"delivery": {
"id": "id_8f3a2c1d",
"endpoint_id": "id_8f3a2c1d",
"event_id": "id_8f3a2c1d",
"event_type": "abc123",
"status": "pending",
"attempts": 1,
"next_attempt_at": "abc123",
"last_attempt_at": "abc123",
"last_http_status": 1,
"last_error": "abc123",
"created_at": "abc123",
"completed_at": "abc123"
},
"result": {
"outcome": "succeeded",
"http_status": 1,
"error": "abc123"
}
}Errors
invalid_input, unauthorized, forbidden, unknown_product, rate_limited, internal_error, provider_unavailable. Every error uses the single format.
Rate limits
Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.
Examples
curl -X POST "https://api.coldagentai.com/v1/webhooks/$WEBHOOK_ID/test" \
-H "Authorization: Bearer $COLDAGENTAI_API_KEY"const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/webhooks/${id}/test`, {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();#GET /v1/webhooks/{id}/deliveries
Deliveries to this endpoint, oldest first, with attempts, the last HTTP status and the last error. Filter by status.
Scope: read. A read key and a write key both work. Success: HTTP 200.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | 1 to 100 characters |
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Items per page, 1 to 100 (default 20). 1 to 100 |
cursor | string | no | next_cursor from the previous page. 0 to 500 characters |
status | "pending" or "succeeded" or "dead" or "cancelled" | no | No further constraints. |
Response
| Field | Type | Required | Description |
|---|---|---|---|
items | array of object | yes | No further constraints. |
items[].id | string | yes | No further constraints. |
items[].endpoint_id | string | yes | No further constraints. |
items[].event_id | string | yes | No further constraints. |
items[].event_type | string | yes | No further constraints. |
items[].status | "pending" or "succeeded" or "dead" or "cancelled" | yes | dead: every attempt failed. Retries back off from 30 seconds up to 6 hours, 8 attempts in all. |
items[].attempts | integer | yes | No further constraints. |
items[].next_attempt_at | string | yes | No further constraints. |
items[].last_attempt_at | string or null | yes | No further constraints. |
items[].last_http_status | integer or null | yes | No further constraints. |
items[].last_error | string or null | yes | No further constraints. |
items[].created_at | string | yes | No further constraints. |
items[].completed_at | string or null | yes | No further constraints. |
next_cursor | string or null | yes | No further constraints. |
{
"items": [
{
"id": "id_8f3a2c1d",
"endpoint_id": "id_8f3a2c1d",
"event_id": "id_8f3a2c1d",
"event_type": "abc123",
"status": "pending",
"attempts": 1,
"next_attempt_at": "abc123",
"last_attempt_at": "abc123",
"last_http_status": 1,
"last_error": "abc123",
"created_at": "abc123",
"completed_at": "abc123"
}
],
"next_cursor": "abc123"
}Errors
invalid_input, unauthorized, unknown_product, rate_limited, internal_error, provider_unavailable. Every error uses the single format.
Rate limits
Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.
Examples
curl "https://api.coldagentai.com/v1/webhooks/$WEBHOOK_ID/deliveries" \
-H "Authorization: Bearer $COLDAGENTAI_API_KEY"const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/webhooks/${id}/deliveries`, {
headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();