API reference
Webhook endpoints
How these fit together: the Webhooks & events guide.
Get status callback secret
get
The status-callback signing secret of the key’s mode, without the secret.
Describes the secret that signs per-request status callbacks (statusCallback on POST /v1/messages and POST /v1/calls) for the key’s mode: its last four characters, when it was created and last changed, and previousSecretExpiresAt while a rotation overlaps. The secret itself is returned only by POST /v1/status-callback-secret. 404 NOT_FOUND until one has been created — and until then a request naming a statusCallback is refused.
Access: an organization key with the webhooks:manage scope.
Response 200StatusCallbackSecret
createdAtstring (date-time)RequiredmodestringRequiredThe traffic it signs: a live key’s callbacks or a test key’s. Each mode has its own secret.
One of
livetestobjectstringRequiredOne of
status_callback_secretpreviousSecretExpiresAtstring (date-time) | nullRequiredWhile a rotation overlaps: until when callbacks registered after it also carry a signature by the previous secret.
secretLast4stringRequiredupdatedAtstring (date-time)Required
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no status-callback secret was created yet.429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault; retry with backoff (with the same Idempotency-Key on a write).
curl 'https://api.trovacast.com/v1/status-callback-secret' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"createdAt": "2026-11-05T10:00:00.000Z",
"mode": "live",
"object": "status_callback_secret",
"previousSecretExpiresAt": "2026-11-05T10:00:00.000Z",
"secretLast4": "x9Qa",
"updatedAt": "2026-11-05T10:00:00.000Z"
}Rotate status callback secret
post
Creates (or rotates) the status-callback signing secret; the response carries it once.
Creates the secret for the key’s mode, or replaces it: the previous one keeps signing — a second v1= in Trovacast-Signature — the callbacks registered over the next 24 hours, so a receiver can switch without losing one. Callbacks registered before keep the secret they were registered with.
Access: an organization key with the webhooks:manage scope.
Headers
Idempotency-KeystringMakes the request safe to retry: a repeat with the same key and the same body returns the stored success (with
Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT,503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.
Response 200StatusCallbackSecretWithSecret
createdAtstring (date-time)RequiredmodestringRequiredThe traffic it signs: a live key’s callbacks or a test key’s. Each mode has its own secret.
One of
livetestobjectstringRequiredOne of
status_callback_secretpreviousSecretExpiresAtstring (date-time) | nullRequiredWhile a rotation overlaps: until when callbacks registered after it also carry a signature by the previous secret.
secretstringRequiredThe signing secret — shown in this response only. Verify
Trovacast-Signatureon every status callback with it, exactly as for your webhook endpoints.secretLast4stringRequiredupdatedAtstring (date-time)Required
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.409CONFLICT — another request created or rotated it at the same moment; retry. IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422IDEMPOTENCY_KEY_REUSED — this Idempotency-Key was used for a different request.429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
curl -X POST 'https://api.trovacast.com/v1/status-callback-secret' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"createdAt": "2026-11-05T10:00:00.000Z",
"mode": "live",
"object": "status_callback_secret",
"previousSecretExpiresAt": "2026-11-05T10:00:00.000Z",
"secret": "whsec_9fK2…",
"secretLast4": "x9Qa",
"updatedAt": "2026-11-05T10:00:00.000Z"
}List webhook endpoints
get
Lists the organization’s webhook endpoints.
Every endpoint of the key’s mode (a live key lists live endpoints, a test key test ones), newest first, in one page: an organization has at most 10. Each shows its events, its status (failing_disabled once the platform turned it off after three days of failed deliveries), its delivery health (failingSince, lastSuccessAt, lastFailureAt) and the last four characters of its signing secret — never the secret.
Access: an organization key with the webhooks:manage scope.
Response 200WebhookEndpointPage
dataWebhookEndpoint[]RequiredIts fields are listed under Get integration webhook endpoint
nextCursorstring | nullRequiredPass back as
cursorfor the next page; null on the last.
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault; retry with backoff (with the same Idempotency-Key on a write).
curl 'https://api.trovacast.com/v1/webhook-endpoints' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"data": [
{
"createdAt": "2026-11-05T10:00:00.000Z",
"description": "DESCRIPTION",
"events": [
"message.sent"
],
"failingSince": "2026-11-05T10:00:00.000Z",
"id": "ID",
"lastFailureAt": "2026-11-05T10:00:00.000Z",
"lastSuccessAt": "2026-11-05T10:00:00.000Z",
"mode": "live",
"object": "webhook_endpoint",
"previousSecretExpiresAt": "2026-11-05T10:00:00.000Z",
"secretLast4": "a1B2",
"status": "enabled",
"updatedAt": "2026-11-05T10:00:00.000Z",
"url": "URL"
}
],
"nextCursor": "NEXT_CURSOR"
}Create webhook endpoint
post
Registers a webhook endpoint; the response carries its secret once.
Subscribes an HTTPS URL on a public host to the event types listed. The endpoint takes the key’s mode — a live key’s receives live events, a test key’s only test-mode events — and the response carries its signing secret (secret) this once: store it. The key must also hold the scope that reads each subscribed event (a 403 names the one missing as requiredScope; see the event catalog). Refused with 400 WEBHOOK_URL_INVALID (reason) for a URL deliveries cannot reach, 409 WEBHOOK_ENDPOINT_LIMIT at 10 endpoints, and 429 RATE_LIMITED past 20 URL creates and changes per organization per hour; audited.
Access: an organization key with the webhooks:manage scope.
Headers
Idempotency-KeystringMakes the request safe to retry: a repeat with the same key and the same body returns the stored success (with
Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT,503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.
Request body
descriptionstringat most 240 characters
eventsstring[]RequiredThe event types to deliver. At least one.
One of
message.sentmessage.deliveredmessage.readmessage.failedmessage.receivedmessage.complainedcontact.consent.updatedtemplate.updatedwhatsapp.account.updatedcall.queuedcall.ringingcall.answeredcall.completedcall.failedcall.no_answercall.busycall.recording.readyconversation.openedconversation.resolvedmessage.media.readymessage.media.failedcall.inboundcall.heldcall.resumedcall.transferredcall.gather.completedcall.flow.failedcall.machine_detectedconference.participant.joinedconference.participant.leftconference.endedcall.transcript.readycall.summary.readyemail.openedemail.clickedbalance.lownumber.port_request.updatedcall.transcript.segmentverify.approvedverify.expireddlt.entity.updateddlt.header.updatedsms.sender.updateddlt.contest.updatedsms.sender_contest.updatedcall.ratedcall.missedcall.voicemail.readycall.ai.transfercall.ai.opt_outcall.dtmfsms.registration.updatednumber.updatednumber.port_out.updatedmodestringThe traffic it receives. Defaults to the mode of the key creating it (a test key creates
testendpoints, a live keyliveones), and a key may only name its own mode. In the console,liveunless chosen.One of
livetesturlstringRequiredAn https:// URL on a public host, with no user name or password. Every address it resolves to is checked again on each delivery.
at most 2048 characters
Response 201WebhookEndpointWithSecret
Show the 15 fieldsHide the fields
createdAtstring (date-time)Requireddescriptionstring | nullRequiredeventsstring[]RequiredOne of
message.sentmessage.deliveredmessage.readmessage.failedmessage.receivedmessage.complainedcontact.consent.updatedtemplate.updatedwhatsapp.account.updatedcall.queuedcall.ringingcall.answeredcall.completedcall.failedcall.no_answercall.busycall.recording.readyconversation.openedconversation.resolvedmessage.media.readymessage.media.failedcall.inboundcall.heldcall.resumedcall.transferredcall.gather.completedcall.flow.failedcall.machine_detectedconference.participant.joinedconference.participant.leftconference.endedcall.transcript.readycall.summary.readyemail.openedemail.clickedbalance.lownumber.port_request.updatedcall.transcript.segmentverify.approvedverify.expireddlt.entity.updateddlt.header.updatedsms.sender.updateddlt.contest.updatedsms.sender_contest.updatedcall.ratedcall.missedcall.voicemail.readycall.ai.transfercall.ai.opt_outcall.dtmfsms.registration.updatednumber.updatednumber.port_out.updatedfailingSincestring (date-time) | nullRequiredStart of the current run of failed deliveries; null once one succeeds.
idstring (uuid)RequiredlastFailureAtstring (date-time) | nullRequiredlastSuccessAtstring (date-time) | nullRequiredmodestringRequiredThe traffic it receives:
liveendpoints get live events only,testendpoints only the events of test-mode traffic (livemode: false). An endpoint takes the mode of the key that created it; a key sees and manages the endpoints of its own mode.One of
livetestobjectstringRequiredOne of
webhook_endpointpreviousSecretExpiresAtstring (date-time) | nullRequiredWhile a rotation overlaps: when the previous secret stops signing.
secretstringRequiredThe signing secret. Shown only in this response — store it now.
secretLast4stringRequiredThe last four characters of the signing secret.
statusstringRequiredfailing_disabled: the platform turned it off after three days of failed deliveries.One of
enableddisabledfailing_disabledupdatedAtstring (date-time)RequiredurlstringRequired
Errors
400WEBHOOK_URL_INVALID — the URL cannot receive deliveries;reasonsays why (URL_INVALID,URL_NOT_ALLOWED,DNS_FAILED,ADDRESS_NOT_ALLOWED,PORT_NOT_ALLOWED). Or VALIDATION_FAILED — an unknown event type, no event, or a malformed field.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING — the key lackswebhooks:manage, or the scope that reads one of the events the endpoint would carry (requiredScope; see the event catalog). A new URL redirects every subscribed event, so it needs them all.409WEBHOOK_ENDPOINT_LIMIT — the organization has the most endpoints it may; delete one first. Or CONFLICT — the organization is not active. IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422IDEMPOTENCY_KEY_REUSED — this Idempotency-Key was used for a different request.429RATE_LIMITED — the organization has set its most webhook URLs for this hour (creates and URL changes); retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
curl -X POST 'https://api.trovacast.com/v1/webhook-endpoints' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"url": "https://apps.example.com/trovacast/webhook",
"events": [
"message.delivered",
"message.failed",
"message.received"
],
"description": "Order notifications"
}'{
"createdAt": "2026-11-05T10:00:00.000Z",
"description": "DESCRIPTION",
"events": [
"message.sent"
],
"failingSince": "2026-11-05T10:00:00.000Z",
"id": "ID",
"lastFailureAt": "2026-11-05T10:00:00.000Z",
"lastSuccessAt": "2026-11-05T10:00:00.000Z",
"mode": "live",
"object": "webhook_endpoint",
"previousSecretExpiresAt": "2026-11-05T10:00:00.000Z",
"secret": "whsec_AbCdEfGhIjKlMnOpQrStUvWxYz012345",
"secretLast4": "a1B2",
"status": "enabled",
"updatedAt": "2026-11-05T10:00:00.000Z",
"url": "URL"
}Get webhook endpoint
get
Retrieves a webhook endpoint.
Its URL, events, status and mode, its delivery health (failingSince, lastSuccessAt, lastFailureAt), the last four characters of its signing secret and, while a rotation overlaps, when the previous secret stops signing (previousSecretExpiresAt). The secret itself is shown only by create and rotate. A key reads the endpoints of its own mode only.
Access: an organization key with the webhooks:manage scope.
Path parameters
endpointIdstringRequired
Response 200WebhookEndpoint
Its fields are listed under Get integration webhook endpoint.
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such resource for this key (another organization’s id is answered the same way).429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault; retry with backoff (with the same Idempotency-Key on a write).
curl 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"createdAt": "2026-11-05T10:00:00.000Z",
"description": "DESCRIPTION",
"events": [
"message.sent"
],
"failingSince": "2026-11-05T10:00:00.000Z",
"id": "ID",
"lastFailureAt": "2026-11-05T10:00:00.000Z",
"lastSuccessAt": "2026-11-05T10:00:00.000Z",
"mode": "live",
"object": "webhook_endpoint",
"previousSecretExpiresAt": "2026-11-05T10:00:00.000Z",
"secretLast4": "a1B2",
"status": "enabled",
"updatedAt": "2026-11-05T10:00:00.000Z",
"url": "URL"
}Update webhook endpoint
patch
Changes a webhook endpoint’s URL, events, description or status.
Only the fields sent change, under a compare-and-set: 409 CONFLICT when another change landed meanwhile (reload and retry). status: enabled re-enables an endpoint you paused or the platform disabled, restarting its three-day failure clock, and its pending deliveries resume. A new URL is held to the create rules (400 WEBHOOK_URL_INVALID, 429 RATE_LIMITED past 20 URL creates and changes per organization per hour) and, since it redirects every subscribed event, needs the key to hold each one’s read scope, as new events do. Audited.
Access: an organization key with the webhooks:manage scope.
Path parameters
endpointIdstringRequired
Headers
Idempotency-KeystringMakes the request safe to retry: a repeat with the same key and the same body returns the stored success (with
Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT,503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.
Request body
descriptionstring | nullNull clears it.
at most 240 characters
eventsstring[]One of
message.sentmessage.deliveredmessage.readmessage.failedmessage.receivedmessage.complainedcontact.consent.updatedtemplate.updatedwhatsapp.account.updatedcall.queuedcall.ringingcall.answeredcall.completedcall.failedcall.no_answercall.busycall.recording.readyconversation.openedconversation.resolvedmessage.media.readymessage.media.failedcall.inboundcall.heldcall.resumedcall.transferredcall.gather.completedcall.flow.failedcall.machine_detectedconference.participant.joinedconference.participant.leftconference.endedcall.transcript.readycall.summary.readyemail.openedemail.clickedbalance.lownumber.port_request.updatedcall.transcript.segmentverify.approvedverify.expireddlt.entity.updateddlt.header.updatedsms.sender.updateddlt.contest.updatedsms.sender_contest.updatedcall.ratedcall.missedcall.voicemail.readycall.ai.transfercall.ai.opt_outcall.dtmfsms.registration.updatednumber.updatednumber.port_out.updatedstatusstringTurn deliveries off or back on. Re-enabling an endpoint the platform disabled (
failing_disabled) restarts its failure clock; deliveries still inside their retry window resume.One of
enableddisabledurlstringat most 2048 characters
Response 200WebhookEndpoint
Its fields are listed under Get integration webhook endpoint.
Errors
400WEBHOOK_URL_INVALID — the URL cannot receive deliveries;reasonsays why (URL_INVALID,URL_NOT_ALLOWED,DNS_FAILED,ADDRESS_NOT_ALLOWED,PORT_NOT_ALLOWED). Or VALIDATION_FAILED — an unknown event type, no event, or a malformed field.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING — the key lackswebhooks:manage, or the scope that reads one of the events the endpoint would carry (requiredScope; see the event catalog). A new URL redirects every subscribed event, so it needs them all.404NOT_FOUND — no such resource for this key (another organization’s id is answered the same way).409CONFLICT — the endpoint changed while this request ran; reload and retry. IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422IDEMPOTENCY_KEY_REUSED — this Idempotency-Key was used for a different request.429RATE_LIMITED — the organization has set its most webhook URLs for this hour (creates and URL changes); retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
curl -X PATCH 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{}'{
"createdAt": "2026-11-05T10:00:00.000Z",
"description": "DESCRIPTION",
"events": [
"message.sent"
],
"failingSince": "2026-11-05T10:00:00.000Z",
"id": "ID",
"lastFailureAt": "2026-11-05T10:00:00.000Z",
"lastSuccessAt": "2026-11-05T10:00:00.000Z",
"mode": "live",
"object": "webhook_endpoint",
"previousSecretExpiresAt": "2026-11-05T10:00:00.000Z",
"secretLast4": "a1B2",
"status": "enabled",
"updatedAt": "2026-11-05T10:00:00.000Z",
"url": "URL"
}Delete webhook endpoint
delete
Deletes a webhook endpoint and its pending deliveries.
Deletes the endpoint with every delivery made or queued for it; nothing pending is sent. The events themselves stay, for the organization’s other endpoints and GET /v1/events. Answers deleted: true with the endpoint’s id, and is audited.
Access: an organization key with the webhooks:manage scope.
Path parameters
endpointIdstringRequired
Headers
Idempotency-KeystringMakes the request safe to retry: a repeat with the same key and the same body returns the stored success (with
Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT,503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.
Response 200DeletedWebhookEndpoint
deletedbooleanRequiredOne of
trueidstring (uuid)RequiredobjectstringRequiredOne of
webhook_endpoint
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such resource for this key (another organization’s id is answered the same way).409IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422IDEMPOTENCY_KEY_REUSED — this Idempotency-Key was used for a different request.429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
curl -X DELETE 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"deleted": true,
"id": "ID",
"object": "webhook_endpoint"
}List webhook deliveries
get
Lists an endpoint’s recent deliveries, newest first; filter by status.
Each delivery names its event (id, type) and reads pending, succeeded or failed, with the attempts made, when the next is due, and the last response status or failure reason — never the response body. Deliveries go with their events after 30 days. status=failed lists what to resend after an outage (POST /v1/webhook-endpoints/{endpointId}/deliveries/resend re-queues them in bulk).
Access: an organization key with the webhooks:manage scope.
Path parameters
endpointIdstringRequired
Query parameters
limitintegerHow many items to return.
cursorstringThe
nextCursorof the previous page. Omit for the first page.statusstringOnly deliveries in this state —
failedlists what to resend after an outage.One of
pendingsucceededfailed
Response 200WebhookDeliveryPage
dataWebhookDelivery[]Required12 fields of
dataattemptCountintegerRequiredAttempts made so far.
createdAtstring (date-time)RequireddeliveredAtstring (date-time) | nullRequiredendpointIdstring (uuid)RequiredeventWebhookDeliveryEventRequired3 fields of
eventcreatedAtstring (date-time)Requiredidstring (uuid)RequiredtypestringRequiredOne of
message.sentmessage.deliveredmessage.readmessage.failedmessage.receivedmessage.complainedcontact.consent.updatedtemplate.updatedwhatsapp.account.updatedcall.queuedcall.ringingcall.answeredcall.completedcall.failedcall.no_answercall.busycall.recording.readyconversation.openedconversation.resolvedmessage.media.readymessage.media.failedcall.inboundcall.heldcall.resumedcall.transferredcall.gather.completedcall.flow.failedcall.machine_detectedconference.participant.joinedconference.participant.leftconference.endedcall.transcript.readycall.summary.readyemail.openedemail.clickedbalance.lownumber.port_request.updatedcall.transcript.segmentverify.approvedverify.expireddlt.entity.updateddlt.header.updatedsms.sender.updateddlt.contest.updatedsms.sender_contest.updatedcall.ratedcall.missedcall.voicemail.readycall.ai.transfercall.ai.opt_outcall.dtmfsms.registration.updatednumber.updatednumber.port_out.updated
idstring (uuid)RequiredlastErrorstring | nullRequiredlastResponseStatusinteger | nullRequirednextAttemptAtstring (date-time) | nullRequiredWhen the next attempt is due (pending only).
objectstringRequiredOne of
webhook_deliverystatusstringRequiredOne of
pendingsucceededfailedupdatedAtstring (date-time)Required
nextCursorstring | nullRequiredPass back as
cursorfor the next page; null on the last.
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such resource for this key (another organization’s id is answered the same way).429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault; retry with backoff (with the same Idempotency-Key on a write).
curl 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID/deliveries' \
-H "Authorization: Bearer $TROVACAST_API_KEY"{
"data": [
{
"attemptCount": 1,
"createdAt": "2026-11-05T10:00:00.000Z",
"deliveredAt": "2026-11-05T10:00:00.000Z",
"endpointId": "ENDPOINT_ID",
"event": {
"createdAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"type": "message.sent"
},
"id": "ID",
"lastError": "LAST_ERROR",
"lastResponseStatus": 1,
"nextAttemptAt": "2026-11-05T10:00:00.000Z",
"object": "webhook_delivery",
"status": "pending",
"updatedAt": "2026-11-05T10:00:00.000Z"
}
],
"nextCursor": "NEXT_CURSOR"
}Resend webhook deliveries
post
Sends an endpoint’s failed (or retry-waiting) deliveries again now, in bulk.
Re-queues up to 1000 deliveries created in [since, until), oldest first, with a fresh retry schedule: failed ones (default) or pending ones waiting out a retry. hasMore: call again with the same body. 409 WEBHOOK_ENDPOINT_DISABLED when the endpoint is not enabled.
Access: an organization key with the webhooks:manage scope.
Path parameters
endpointIdstringRequired
Headers
Idempotency-KeystringMakes the request safe to retry: a repeat with the same key and the same body returns the stored success (with
Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT,503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.
Request body
sincestring (date-time)RequiredResend the deliveries created at or after this instant (events are kept 30 days).
statusstringfailed(default): deliveries that ran out of attempts.pending: deliveries waiting out a retry (sent now instead, with a fresh schedule) — after you fixed your server.One of
failedpendingdefault "failed"
untilstring (date-time)And before this instant. Default: now.
Response 200WebhookDeliveryResendResult
hasMorebooleanRequiredMore deliveries matched than one request resends: call again with the same body (the ones already queued no longer match).
objectstringRequiredOne of
webhook_delivery_resendresentintegerRequiredHow many deliveries were queued again (at most 1000).
Errors
400VALIDATION_FAILED —untilis not aftersince, or a field is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such resource for this key (another organization’s id is answered the same way).409WEBHOOK_ENDPOINT_DISABLED — the endpoint is not enabled; enable it first. IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422IDEMPOTENCY_KEY_REUSED — this Idempotency-Key was used for a different request.429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
curl -X POST 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID/deliveries/resend' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{
"since": "2026-11-04T00:00:00.000Z"
}'{
"hasMore": true,
"object": "webhook_delivery_resend",
"resent": 1
}Resend webhook delivery
post
Sends a delivery again now, with a fresh retry schedule.
Re-queues one delivery — a failed one, or a succeeded one your receiver lost — with the same stored event (same id, so a receiver that deduplicates still can), while the event is inside its 30 days. Refused with 409 WEBHOOK_ENDPOINT_DISABLED when the endpoint is not enabled, and 409 WEBHOOK_DELIVERY_IN_FLIGHT while that delivery is being attempted (retry shortly). Audited.
Access: an organization key with the webhooks:manage scope.
Path parameters
endpointIdstringRequireddeliveryIdstringRequired
Headers
Idempotency-KeystringMakes the request safe to retry: a repeat with the same key and the same body returns the stored success (with
Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT,503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.
Response 200WebhookDelivery
Show the 12 fieldsHide the fields
attemptCountintegerRequiredAttempts made so far.
createdAtstring (date-time)RequireddeliveredAtstring (date-time) | nullRequiredendpointIdstring (uuid)RequiredeventWebhookDeliveryEventRequired3 fields of
eventcreatedAtstring (date-time)Requiredidstring (uuid)RequiredtypestringRequiredOne of
message.sentmessage.deliveredmessage.readmessage.failedmessage.receivedmessage.complainedcontact.consent.updatedtemplate.updatedwhatsapp.account.updatedcall.queuedcall.ringingcall.answeredcall.completedcall.failedcall.no_answercall.busycall.recording.readyconversation.openedconversation.resolvedmessage.media.readymessage.media.failedcall.inboundcall.heldcall.resumedcall.transferredcall.gather.completedcall.flow.failedcall.machine_detectedconference.participant.joinedconference.participant.leftconference.endedcall.transcript.readycall.summary.readyemail.openedemail.clickedbalance.lownumber.port_request.updatedcall.transcript.segmentverify.approvedverify.expireddlt.entity.updateddlt.header.updatedsms.sender.updateddlt.contest.updatedsms.sender_contest.updatedcall.ratedcall.missedcall.voicemail.readycall.ai.transfercall.ai.opt_outcall.dtmfsms.registration.updatednumber.updatednumber.port_out.updated
idstring (uuid)RequiredlastErrorstring | nullRequiredlastResponseStatusinteger | nullRequirednextAttemptAtstring (date-time) | nullRequiredWhen the next attempt is due (pending only).
objectstringRequiredOne of
webhook_deliverystatusstringRequiredOne of
pendingsucceededfailedupdatedAtstring (date-time)Required
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such endpoint for this key, or no such delivery on it.409WEBHOOK_ENDPOINT_DISABLED — the endpoint is not enabled; enable it first. Or WEBHOOK_DELIVERY_IN_FLIGHT — that delivery is being attempted right now; retry shortly. IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422IDEMPOTENCY_KEY_REUSED — this Idempotency-Key was used for a different request.429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
curl -X POST 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID/deliveries/DELIVERY_ID/resend' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"attemptCount": 1,
"createdAt": "2026-11-05T10:00:00.000Z",
"deliveredAt": "2026-11-05T10:00:00.000Z",
"endpointId": "ENDPOINT_ID",
"event": {
"createdAt": "2026-11-05T10:00:00.000Z",
"id": "ID",
"type": "message.sent"
},
"id": "ID",
"lastError": "LAST_ERROR",
"lastResponseStatus": 1,
"nextAttemptAt": "2026-11-05T10:00:00.000Z",
"object": "webhook_delivery",
"status": "pending",
"updatedAt": "2026-11-05T10:00:00.000Z"
}Rotate webhook endpoint secret
post
Issues a new signing secret; the previous one keeps signing for 24 hours.
The new secret is returned once, in secret. Until previousSecretExpiresAt every delivery carries a second v1= signature in Trovacast-Signature, made with the previous secret, so a receiver can switch without dropping a delivery; rotating again inside those 24 hours retires the older secret at once (only the immediately previous one overlaps). 409 CONFLICT when the endpoint changed meanwhile (retry). Audited, by the secrets’ last four characters only.
Access: an organization key with the webhooks:manage scope.
Path parameters
endpointIdstringRequired
Headers
Idempotency-KeystringMakes the request safe to retry: a repeat with the same key and the same body returns the stored success (with
Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT,503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.
Response 200WebhookEndpointWithSecret
Show the 15 fieldsHide the fields
createdAtstring (date-time)Requireddescriptionstring | nullRequiredeventsstring[]RequiredOne of
message.sentmessage.deliveredmessage.readmessage.failedmessage.receivedmessage.complainedcontact.consent.updatedtemplate.updatedwhatsapp.account.updatedcall.queuedcall.ringingcall.answeredcall.completedcall.failedcall.no_answercall.busycall.recording.readyconversation.openedconversation.resolvedmessage.media.readymessage.media.failedcall.inboundcall.heldcall.resumedcall.transferredcall.gather.completedcall.flow.failedcall.machine_detectedconference.participant.joinedconference.participant.leftconference.endedcall.transcript.readycall.summary.readyemail.openedemail.clickedbalance.lownumber.port_request.updatedcall.transcript.segmentverify.approvedverify.expireddlt.entity.updateddlt.header.updatedsms.sender.updateddlt.contest.updatedsms.sender_contest.updatedcall.ratedcall.missedcall.voicemail.readycall.ai.transfercall.ai.opt_outcall.dtmfsms.registration.updatednumber.updatednumber.port_out.updatedfailingSincestring (date-time) | nullRequiredStart of the current run of failed deliveries; null once one succeeds.
idstring (uuid)RequiredlastFailureAtstring (date-time) | nullRequiredlastSuccessAtstring (date-time) | nullRequiredmodestringRequiredThe traffic it receives:
liveendpoints get live events only,testendpoints only the events of test-mode traffic (livemode: false). An endpoint takes the mode of the key that created it; a key sees and manages the endpoints of its own mode.One of
livetestobjectstringRequiredOne of
webhook_endpointpreviousSecretExpiresAtstring (date-time) | nullRequiredWhile a rotation overlaps: when the previous secret stops signing.
secretstringRequiredThe signing secret. Shown only in this response — store it now.
secretLast4stringRequiredThe last four characters of the signing secret.
statusstringRequiredfailing_disabled: the platform turned it off after three days of failed deliveries.One of
enableddisabledfailing_disabledupdatedAtstring (date-time)RequiredurlstringRequired
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such resource for this key (another organization’s id is answered the same way).409CONFLICT — the endpoint changed while this request ran; reload and retry. IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422IDEMPOTENCY_KEY_REUSED — this Idempotency-Key was used for a different request.429RATE_LIMITED — retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
curl -X POST 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID/rotate-secret' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"createdAt": "2026-11-05T10:00:00.000Z",
"description": "DESCRIPTION",
"events": [
"message.sent"
],
"failingSince": "2026-11-05T10:00:00.000Z",
"id": "ID",
"lastFailureAt": "2026-11-05T10:00:00.000Z",
"lastSuccessAt": "2026-11-05T10:00:00.000Z",
"mode": "live",
"object": "webhook_endpoint",
"previousSecretExpiresAt": "2026-11-05T10:00:00.000Z",
"secret": "whsec_AbCdEfGhIjKlMnOpQrStUvWxYz012345",
"secretLast4": "a1B2",
"status": "enabled",
"updatedAt": "2026-11-05T10:00:00.000Z",
"url": "URL"
}Test webhook endpoint
post
Sends a signed webhook.test event now and reports the endpoint’s answer.
At most 5 per endpoint per minute. A failure is reported by its class (TIMEOUT, CONNECTION_FAILED, DNS_FAILED, ADDRESS_NOT_ALLOWED, or HTTP <status>), never socket-level detail.
Access: an organization key with the webhooks:manage scope.
Path parameters
endpointIdstringRequired
Headers
Idempotency-KeystringMakes the request safe to retry: a repeat with the same key and the same body returns the stored success (with
Idempotent-Replayed: true) instead of running again; a 4xx stores nothing. A 5xx is stored and replayed to every retry with the same key (Idempotent-Replayed: true): the first attempt may have taken effect, so check before retrying with a new key — except the errors that provably changed nothing (503 MESSAGING_TRANSPORT,503 WHATSAPP_CONNECT_UNAVAILABLE; see https://trovacast.com/developers/idempotency), which store nothing, so a retry with the same key runs again. 1–255 visible ASCII characters; kept for 24 hours.
Response 200WebhookTestResult
durationMsintegerRequirederrorstring | nullRequiredWhy it failed (never the response body).
eventIdstring (uuid)RequiredThe synthetic event id sent (type
webhook.test).objectstringRequiredOne of
webhook_teststatusCodeinteger | nullRequiredsuccessbooleanRequiredWhether the endpoint answered 2xx.
Errors
400VALIDATION_FAILED — the request is malformed.401API_KEY_INVALID — missing, unknown, revoked or expired key.403API_KEY_SCOPE_MISSING or API_KEY_KIND_MISMATCH — the key may not call this endpoint.404NOT_FOUND — no such resource for this key (another organization’s id is answered the same way).409IDEMPOTENCY_KEY_IN_FLIGHT — the first request with this Idempotency-Key is still running (retry afterRetry-After); or CONFLICT.422IDEMPOTENCY_KEY_REUSED — this Idempotency-Key was used for a different request.429RATE_LIMITED — this endpoint’s test budget is spent; retry afterRetry-Afterseconds.500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
curl -X POST 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID/test' \
-H "Authorization: Bearer $TROVACAST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"durationMs": 1,
"error": "ERROR",
"eventId": "EVENT_ID",
"object": "webhook_test",
"statusCode": 1,
"success": true
}