Jump to

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

API reference

Integration webhooks

How these fit together: the Integration keys guide.

List integration events

get/v1/integration/events

Lists the stored events of every organization your integration provisioned (the last 30 days), newest first.

An event is stored when any endpoint subscribed to its type at the time — yours or one of the organization’s own — and kept 30 days. Each item is the envelope its deliveries carry (same id), naming the organization (organizationId) and your reference for it (externalReference). Filter by organizationId, type and a createdAfter/createdBefore window. A key lists its own mode’s events, and only the types whose reading scopes the platform delegated to your integration (filtering on another is a 403 naming the scope). An event commits with the change it describes, so overlap the window you poll by a minute and deduplicate on id.

Access: an integration key with the organizations:events scope.

Query parameters

  • limitinteger

    How many items to return.

  • cursorstring

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

  • typestring

    Only events of this type.

    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

  • createdAfterstring (date-time)

    Only events created at or after this instant.

  • createdBeforestring (date-time)

    Only events created before this instant.

  • organizationIdstring (uuid)

    Only the events of this organization (one your integration provisioned).

Response 200PublicEventPage

  • dataPublicEvent[]Required

    Its fields are listed under Get event

  • nextCursorstring | nullRequired

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

Errors

Request
curl 'https://api.trovacast.com/v1/integration/events' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "data": [
    {
      "apiVersion": "v1",
      "createdAt": "2026-11-05T10:00:00.000Z",
      "data": {},
      "externalReference": "biz_8c1f",
      "id": "ID",
      "livemode": true,
      "object": "event",
      "organizationId": "ORGANIZATION_ID",
      "type": "message.sent"
    }
  ],
  "nextCursor": "NEXT_CURSOR"
}

Get integration event

get/v1/integration/events/{eventId}

Retrieves a stored event of one of your integration’s organizations by its id.

The stored envelope — the bytes its deliveries POST, with the same id — so data is the resource as it stood when the event happened (null if it can no longer be opened). Of the key’s mode, and a type your integration was not delegated the scope to read is withheld as if it did not exist. Events are kept 30 days; erasing a contact or an organization deletes its events.

Access: an integration key with the organizations:events scope.

Path parameters

  • eventIdstringRequired

Response 200PublicEvent

Its fields are listed under Get event.

Errors

Request
curl 'https://api.trovacast.com/v1/integration/events/EVENT_ID' \
  -H "Authorization: Bearer $TROVACAST_API_KEY"
Response 200 (json)
{
  "apiVersion": "v1",
  "createdAt": "2026-11-05T10:00:00.000Z",
  "data": {},
  "externalReference": "biz_8c1f",
  "id": "ID",
  "livemode": true,
  "object": "event",
  "organizationId": "ORGANIZATION_ID",
  "type": "message.sent"
}

List integration webhook endpoints

get/v1/integration/webhook-endpoints

Lists your integration’s own webhook endpoints.

Every endpoint of your integration of the key’s mode, newest first, in one page (at most 10 per mode). Each receives the events of every organization your integration provisioned. Shows its events, status, delivery health and the last four characters of its signing secret — never the secret.

Access: an integration key with the organizations:events 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/integration/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 integration webhook endpoint

post/v1/integration/webhook-endpoints

Registers an endpoint for every organization’s events; the response carries its secret once.

Subscribes an HTTPS URL on a public host to the event types listed, for every organization your integration provisioned — now and later. Each delivery is the event envelope an organization’s own endpoint gets, naming the organization (organizationId) and your reference for it (externalReference). The endpoint takes the key’s mode: a live key’s receives live traffic, a test key’s test traffic (your test organizations’, and your live organizations’ test-mode traffic). Every subscribed type needs the scopes that read it delegated to your integration by the platform (a 403 names the one missing as requiredScope). The signing secret (secret) is in this response only. Refused with 400 WEBHOOK_URL_INVALID (reason), 409 WEBHOOK_ENDPOINT_LIMIT at 10 endpoints of the mode, and 429 RATE_LIMITED past 20 URL creates and changes per hour; audited.

Access: an integration key with the organizations:events 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 organizations:events, or the platform has not delegated to your integration a 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 — your integration has the most endpoints of this mode it may; delete one first. 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 — your integration 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/integration/webhook-endpoints' \
  -H "Authorization: Bearer $TROVACAST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H 'Content-Type: application/json' \
  -d '{
  "events": [
    "message.sent"
  ],
  "url": "https://apps.example.com/trovacast/webhook"
}'
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 integration webhook endpoint

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

Retrieves one of your integration’s webhook endpoints.

Its URL, events, status and mode, its delivery health, the last four characters of its signing secret and, while a rotation overlaps, when the previous secret stops signing. A key reads the endpoints of its own mode only.

Access: an integration key with the organizations:events scope.

Path parameters

  • endpointIdstringRequired

Response 200WebhookEndpoint

Show the 14 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.

  • 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

Request
curl 'https://api.trovacast.com/v1/integration/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 integration webhook endpoint

patch/v1/integration/webhook-endpoints/{endpointId}

Changes one of your integration’s endpoints: URL, events, description or status.

Only the fields sent change, under a compare-and-set (409 CONFLICT when another change landed meanwhile). status: enabled re-enables an endpoint you paused or the platform disabled, restarting its three-day failure clock; its pending deliveries resume. A new URL or new events are held to the create rules — every event’s reading scopes delegated to your integration — and audited.

Access: an integration key with the organizations:events 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 organizations:events, or the platform has not delegated to your integration a 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 endpoint of your integration’s.
  • 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 — your integration 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/integration/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 integration webhook endpoint

delete/v1/integration/webhook-endpoints/{endpointId}

Deletes one of your integration’s endpoints and its pending deliveries.

Nothing pending is sent; the events stay (GET /v1/integration/events). Audited.

Access: an integration key with the organizations:events 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/integration/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 integration webhook deliveries

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

Lists recent deliveries to one of your integration’s endpoints, newest first.

Each names its event (id, type; read the event with GET /v1/integration/events/{eventId} for its organization) 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.

Access: an integration key with the organizations:events 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/integration/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 integration webhook deliveries

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

Sends one of your integration’s endpoints its failed (or retry-waiting) deliveries again now, in bulk.

Re-queues up to 1000 deliveries created in [since, until), oldest first, whatever organization each is about, 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 integration key with the organizations:events 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/integration/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-05T10:00:00.000Z"
}'
Response 200 (json)
{
  "hasMore": true,
  "object": "webhook_delivery_resend",
  "resent": 1
}

Resend integration webhook delivery

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

Sends one delivery to your integration’s endpoint 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), while the event is inside its 30 days. 409 WEBHOOK_ENDPOINT_DISABLED when the endpoint is not enabled, 409 WEBHOOK_DELIVERY_IN_FLIGHT while that delivery is being attempted. Audited.

Access: an integration key with the organizations:events 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/integration/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 integration webhook endpoint secret

post/v1/integration/webhook-endpoints/{endpointId}/rotate-secret

Issues a new signing secret for one of your integration’s endpoints; 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 made with the previous secret. Audited by the secrets’ last four characters.

Access: an integration key with the organizations:events 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

Request
curl -X POST 'https://api.trovacast.com/v1/integration/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 integration webhook endpoint

post/v1/integration/webhook-endpoints/{endpointId}/test

Sends a signed webhook.test event to one of your integration’s endpoints and reports its answer.

At most 5 per endpoint per minute. The test is about no organization: its organizationId is the nil UUID and it names your integration (integrationId). A failure is reported by its class, never socket-level detail.

Access: an integration key with the organizations:events 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/integration/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
}