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 pathScopeWhat it does
POST /v1/webhookswriteRegister a webhook endpoint
GET /v1/webhooksreadList webhook endpoints
PATCH /v1/webhooks/{id}writeChange a webhook endpoint
DELETE /v1/webhooks/{id}writeDelete a webhook endpoint
POST /v1/webhooks/{id}/testwriteSend a signed test event
GET /v1/webhooks/{id}/deliveriesreadRead 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.

FieldTypeRequiredDescription
urlstringyesAn https URL on a public host. 1 to 2048 characters.
eventsarray of "EmailSent" or "EmailReply" or "EmailBounce" or "LeadCreated" or "EmailUnsubscribe" or "CreditBalanceLow" or "AutopilotRunStatusChanged" or "DfyOrderCompleted" or "MailboxDisconnected" or "CampaignCompleted"yesThe events to deliver. At least 1 items.
descriptionstringno0 to 200 characters.
enabledbooleannoDefault true.
Request example
{
  "url": "abc123",
  "events": [
    "EmailSent"
  ]
}

Response

FieldTypeRequiredDescription
idstringyesNo further constraints.
urlstringyesNo further constraints.
descriptionstring or nullyesNo further constraints.
eventsarray of "EmailSent" or "EmailReply" or "EmailBounce" or "LeadCreated" or "EmailUnsubscribe" or "CreditBalanceLow" or "AutopilotRunStatusChanged" or "DfyOrderCompleted" or "MailboxDisconnected" or "CampaignCompleted"yesNo further constraints.
enabledbooleanyesNo further constraints.
created_atstringyesNo further constraints.
updated_atstringyesNo further constraints.
secretstringyesThe signing secret. Store it now; it is not shown again.
Response example, HTTP 201
{
  "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
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"
  ]
}'
JavaScript (fetch)
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

FieldTypeRequiredDescription
limitintegernoItems per page, 1 to 100 (default 20). 1 to 100
cursorstringnonext_cursor from the previous page. 0 to 500 characters

Response

FieldTypeRequiredDescription
itemsarray of objectyesNo further constraints.
items[].idstringyesNo further constraints.
items[].urlstringyesNo further constraints.
items[].descriptionstring or nullyesNo further constraints.
items[].eventsarray of "EmailSent" or "EmailReply" or "EmailBounce" or "LeadCreated" or "EmailUnsubscribe" or "CreditBalanceLow" or "AutopilotRunStatusChanged" or "DfyOrderCompleted" or "MailboxDisconnected" or "CampaignCompleted"yesNo further constraints.
items[].enabledbooleanyesNo further constraints.
items[].created_atstringyesNo further constraints.
items[].updated_atstringyesNo further constraints.
next_cursorstring or nullyesNo further constraints.
Response example, HTTP 200
{
  "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
curl "https://api.coldagentai.com/v1/webhooks" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY"
JavaScript (fetch)
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

FieldTypeRequiredDescription
idstringyes1 to 100 characters

Request body

Send JSON with Content-Type: application/json. The body is required.

FieldTypeRequiredDescription
urlstringno1 to 2048 characters.
eventsarray of "EmailSent" or "EmailReply" or "EmailBounce" or "LeadCreated" or "EmailUnsubscribe" or "CreditBalanceLow" or "AutopilotRunStatusChanged" or "DfyOrderCompleted" or "MailboxDisconnected" or "CampaignCompleted"noAt least 1 items.
descriptionstring or nullno0 to 200 characters.
enabledbooleannoNo further constraints.
Request example
{
  "url": "abc123",
  "events": [
    "EmailSent"
  ],
  "description": "abc123"
}

Response

FieldTypeRequiredDescription
idstringyesNo further constraints.
urlstringyesNo further constraints.
descriptionstring or nullyesNo further constraints.
eventsarray of "EmailSent" or "EmailReply" or "EmailBounce" or "LeadCreated" or "EmailUnsubscribe" or "CreditBalanceLow" or "AutopilotRunStatusChanged" or "DfyOrderCompleted" or "MailboxDisconnected" or "CampaignCompleted"yesNo further constraints.
enabledbooleanyesNo further constraints.
created_atstringyesNo further constraints.
updated_atstringyesNo further constraints.
Response example, HTTP 200
{
  "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
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"
}'
JavaScript (fetch)
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

FieldTypeRequiredDescription
idstringyes1 to 100 characters

Response

FieldTypeRequiredDescription
idstringyesNo further constraints.
deletedtrueyesNo further constraints.
Response example, HTTP 200
{
  "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
curl -X DELETE "https://api.coldagentai.com/v1/webhooks/$WEBHOOK_ID" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY"
JavaScript (fetch)
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

FieldTypeRequiredDescription
idstringyes1 to 100 characters

Response

FieldTypeRequiredDescription
deliveryobjectyesNo further constraints.
delivery.idstringyesNo further constraints.
delivery.endpoint_idstringyesNo further constraints.
delivery.event_idstringyesNo further constraints.
delivery.event_typestringyesNo further constraints.
delivery.status"pending" or "succeeded" or "dead" or "cancelled"yesdead: every attempt failed. Retries back off from 30 seconds up to 6 hours, 8 attempts in all.
delivery.attemptsintegeryesNo further constraints.
delivery.next_attempt_atstringyesNo further constraints.
delivery.last_attempt_atstring or nullyesNo further constraints.
delivery.last_http_statusinteger or nullyesNo further constraints.
delivery.last_errorstring or nullyesNo further constraints.
delivery.created_atstringyesNo further constraints.
delivery.completed_atstring or nullyesNo further constraints.
resultobjectyesNo further constraints.
result.outcome"succeeded" or "retry_scheduled" or "dead" or "cancelled" or "skipped"yesNo further constraints.
result.http_statusinteger or nullyesNo further constraints.
result.errorstring or nullyesNo further constraints.
Response example, HTTP 200
{
  "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
curl -X POST "https://api.coldagentai.com/v1/webhooks/$WEBHOOK_ID/test" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY"
JavaScript (fetch)
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

FieldTypeRequiredDescription
idstringyes1 to 100 characters

Query parameters

FieldTypeRequiredDescription
limitintegernoItems per page, 1 to 100 (default 20). 1 to 100
cursorstringnonext_cursor from the previous page. 0 to 500 characters
status"pending" or "succeeded" or "dead" or "cancelled"noNo further constraints.

Response

FieldTypeRequiredDescription
itemsarray of objectyesNo further constraints.
items[].idstringyesNo further constraints.
items[].endpoint_idstringyesNo further constraints.
items[].event_idstringyesNo further constraints.
items[].event_typestringyesNo further constraints.
items[].status"pending" or "succeeded" or "dead" or "cancelled"yesdead: every attempt failed. Retries back off from 30 seconds up to 6 hours, 8 attempts in all.
items[].attemptsintegeryesNo further constraints.
items[].next_attempt_atstringyesNo further constraints.
items[].last_attempt_atstring or nullyesNo further constraints.
items[].last_http_statusinteger or nullyesNo further constraints.
items[].last_errorstring or nullyesNo further constraints.
items[].created_atstringyesNo further constraints.
items[].completed_atstring or nullyesNo further constraints.
next_cursorstring or nullyesNo further constraints.
Response example, HTTP 200
{
  "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
curl "https://api.coldagentai.com/v1/webhooks/$WEBHOOK_ID/deliveries" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY"
JavaScript (fetch)
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();
Webhook endpoints