Jump to

  • Quickstarts
  • API reference
  • Webhook events
  • Error codes
  • SDKs

API reference

Webhook endpoints

How these fit together: the Webhooks & events guide.

Get status callback secret

get/v1/status-callback-secret

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)Required

  • modestringRequired

    The traffic it signs: a live key’s callbacks or a test key’s. Each mode has its own secret.

    One oflivetest

  • objectstringRequired

    One ofstatus_callback_secret

  • previousSecretExpiresAtstring (date-time) | nullRequired

    While a rotation overlaps: until when callbacks registered after it also carry a signature by the previous secret.

  • secretLast4stringRequired

  • updatedAtstring (date-time)Required

Errors

Request
curl 'https://api.trovacast.com/v1/status-callback-secret' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "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/v1/status-callback-secret

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-Keystring

    Makes 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)Required

  • modestringRequired

    The traffic it signs: a live key’s callbacks or a test key’s. Each mode has its own secret.

    One oflivetest

  • objectstringRequired

    One ofstatus_callback_secret

  • previousSecretExpiresAtstring (date-time) | nullRequired

    While a rotation overlaps: until when callbacks registered after it also carry a signature by the previous secret.

  • secretstringRequired

    The signing secret — shown in this response only. Verify Trovacast-Signature on every status callback with it, exactly as for your webhook endpoints.

  • secretLast4stringRequired

  • updatedAtstring (date-time)Required

Errors

Request
curl -X POST 'https://api.trovacast.com/v1/status-callback-secret' \
  -H "Authorization: Bearer $TROVACAST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200 (json)
{
  "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/v1/webhook-endpoints

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[]Required

    Its fields are listed under Get integration webhook endpoint

  • nextCursorstring | nullRequired

    Pass back as cursor for the next page; null on the last.

Errors

Request
curl 'https://api.trovacast.com/v1/webhook-endpoints' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "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/v1/webhook-endpoints

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-Keystring

    Makes 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

    at most 240 characters

  • eventsstring[]Required

    The event types to deliver. At least one.

    One ofmessage.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

  • modestring

    The traffic it receives. Defaults to the mode of the key creating it (a test key creates test endpoints, a live key live ones), and a key may only name its own mode. In the console, live unless chosen.

    One oflivetest

  • urlstringRequired

    An 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 fields
  • createdAtstring (date-time)Required

  • descriptionstring | nullRequired

  • eventsstring[]Required

    One ofmessage.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

  • failingSincestring (date-time) | nullRequired

    Start of the current run of failed deliveries; null once one succeeds.

  • idstring (uuid)Required

  • lastFailureAtstring (date-time) | nullRequired

  • lastSuccessAtstring (date-time) | nullRequired

  • modestringRequired

    The traffic it receives: live endpoints get live events only, test endpoints 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 oflivetest

  • objectstringRequired

    One ofwebhook_endpoint

  • previousSecretExpiresAtstring (date-time) | nullRequired

    While a rotation overlaps: when the previous secret stops signing.

  • secretstringRequired

    The signing secret. Shown only in this response — store it now.

  • secretLast4stringRequired

    The last four characters of the signing secret.

  • statusstringRequired

    failing_disabled: the platform turned it off after three days of failed deliveries.

    One ofenableddisabledfailing_disabled

  • updatedAtstring (date-time)Required

  • urlstringRequired

Errors

  • 400WEBHOOK_URL_INVALID — the URL cannot receive deliveries; reason says 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 lacks webhooks: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 after Retry-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 after Retry-After seconds.
  • 500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
Request
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"
}'
Response 201 (json)
{
  "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/v1/webhook-endpoints/{endpointId}

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

Request
curl 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "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/v1/webhook-endpoints/{endpointId}

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-Keystring

    Makes 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 | null

    Null clears it.

    at most 240 characters

  • eventsstring[]

    One ofmessage.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

  • statusstring

    Turn 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 ofenableddisabled

  • urlstring

    at most 2048 characters

Response 200WebhookEndpoint

Its fields are listed under Get integration webhook endpoint.

Errors

  • 400WEBHOOK_URL_INVALID — the URL cannot receive deliveries; reason says 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 lacks webhooks: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 after Retry-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 after Retry-After seconds.
  • 500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
Request
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 '{}'
Response 200 (json)
{
  "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/v1/webhook-endpoints/{endpointId}

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-Keystring

    Makes 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

  • deletedbooleanRequired

    One oftrue

  • idstring (uuid)Required

  • objectstringRequired

    One ofwebhook_endpoint

Errors

Request
curl -X DELETE 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID' \
  -H "Authorization: Bearer $TROVACAST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200 (json)
{
  "deleted": true,
  "id": "ID",
  "object": "webhook_endpoint"
}

List webhook deliveries

get/v1/webhook-endpoints/{endpointId}/deliveries

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

  • limitinteger

    How many items to return.

  • cursorstring

    The nextCursor of the previous page. Omit for the first page.

  • statusstring

    Only deliveries in this state — failed lists what to resend after an outage.

    One ofpendingsucceededfailed

Response 200WebhookDeliveryPage

  • dataWebhookDelivery[]Required

    12 fields of data
    • attemptCountintegerRequired

      Attempts made so far.

    • createdAtstring (date-time)Required

    • deliveredAtstring (date-time) | nullRequired

    • endpointIdstring (uuid)Required

    • eventWebhookDeliveryEventRequired

      3 fields of event
      • createdAtstring (date-time)Required

      • idstring (uuid)Required

      • typestringRequired

        One ofmessage.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)Required

    • lastErrorstring | nullRequired

    • lastResponseStatusinteger | nullRequired

    • nextAttemptAtstring (date-time) | nullRequired

      When the next attempt is due (pending only).

    • objectstringRequired

      One ofwebhook_delivery

    • statusstringRequired

      One ofpendingsucceededfailed

    • updatedAtstring (date-time)Required

  • nextCursorstring | nullRequired

    Pass back as cursor for the next page; null on the last.

Errors

Request
curl 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID/deliveries' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "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/v1/webhook-endpoints/{endpointId}/deliveries/resend

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-Keystring

    Makes 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)Required

    Resend the deliveries created at or after this instant (events are kept 30 days).

  • statusstring

    failed (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 offailedpending

    default "failed"

  • untilstring (date-time)

    And before this instant. Default: now.

Response 200WebhookDeliveryResendResult

  • hasMorebooleanRequired

    More deliveries matched than one request resends: call again with the same body (the ones already queued no longer match).

  • objectstringRequired

    One ofwebhook_delivery_resend

  • resentintegerRequired

    How many deliveries were queued again (at most 1000).

Errors

Request
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"
}'
Response 200 (json)
{
  "hasMore": true,
  "object": "webhook_delivery_resend",
  "resent": 1
}

Resend webhook delivery

post/v1/webhook-endpoints/{endpointId}/deliveries/{deliveryId}/resend

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

  • endpointIdstringRequired

  • deliveryIdstringRequired

Headers

  • Idempotency-Keystring

    Makes 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 fields
  • attemptCountintegerRequired

    Attempts made so far.

  • createdAtstring (date-time)Required

  • deliveredAtstring (date-time) | nullRequired

  • endpointIdstring (uuid)Required

  • eventWebhookDeliveryEventRequired

    3 fields of event
    • createdAtstring (date-time)Required

    • idstring (uuid)Required

    • typestringRequired

      One ofmessage.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)Required

  • lastErrorstring | nullRequired

  • lastResponseStatusinteger | nullRequired

  • nextAttemptAtstring (date-time) | nullRequired

    When the next attempt is due (pending only).

  • objectstringRequired

    One ofwebhook_delivery

  • statusstringRequired

    One ofpendingsucceededfailed

  • updatedAtstring (date-time)Required

Errors

Request
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)"
Response 200 (json)
{
  "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/v1/webhook-endpoints/{endpointId}/rotate-secret

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-Keystring

    Makes 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 fields
  • createdAtstring (date-time)Required

  • descriptionstring | nullRequired

  • eventsstring[]Required

    One ofmessage.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

  • failingSincestring (date-time) | nullRequired

    Start of the current run of failed deliveries; null once one succeeds.

  • idstring (uuid)Required

  • lastFailureAtstring (date-time) | nullRequired

  • lastSuccessAtstring (date-time) | nullRequired

  • modestringRequired

    The traffic it receives: live endpoints get live events only, test endpoints 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 oflivetest

  • objectstringRequired

    One ofwebhook_endpoint

  • previousSecretExpiresAtstring (date-time) | nullRequired

    While a rotation overlaps: when the previous secret stops signing.

  • secretstringRequired

    The signing secret. Shown only in this response — store it now.

  • secretLast4stringRequired

    The last four characters of the signing secret.

  • statusstringRequired

    failing_disabled: the platform turned it off after three days of failed deliveries.

    One ofenableddisabledfailing_disabled

  • updatedAtstring (date-time)Required

  • urlstringRequired

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 after Retry-After); or CONFLICT.
  • 422IDEMPOTENCY_KEY_REUSED — this Idempotency-Key was used for a different request.
  • 429RATE_LIMITED — retry after Retry-After seconds.
  • 500INTERNAL_ERROR — our fault. With an Idempotency-Key, every retry with that key replays this answer (Idempotent-Replayed: true).
Request
curl -X POST 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID/rotate-secret' \
  -H "Authorization: Bearer $TROVACAST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200 (json)
{
  "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/v1/webhook-endpoints/{endpointId}/test

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-Keystring

    Makes 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

  • durationMsintegerRequired

  • errorstring | nullRequired

    Why it failed (never the response body).

  • eventIdstring (uuid)Required

    The synthetic event id sent (type webhook.test).

  • objectstringRequired

    One ofwebhook_test

  • statusCodeinteger | nullRequired

  • successbooleanRequired

    Whether the endpoint answered 2xx.

Errors

Request
curl -X POST 'https://api.trovacast.com/v1/webhook-endpoints/ENDPOINT_ID/test' \
  -H "Authorization: Bearer $TROVACAST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200 (json)
{
  "durationMs": 1,
  "error": "ERROR",
  "eventId": "EVENT_ID",
  "object": "webhook_test",
  "statusCode": 1,
  "success": true
}