Skip to content
Listener.comDevelopers

Webhooks & events

Webhook endpoints, deliveries and the Events API.

List webhook endpoints

GET/v1/webhook-endpoints

SDKlistener.webhookEndpoints.list()client.webhook_endpoints.list()

Returns

200

OK

  • objectstringrequired
  • urlstringrequired
  • dataarray of objectsrequired
    Show child attributesHide child attributes
  • has_morebooleanrequired
  • next_cursorstringrequirednullable
    Pass as cursor to get the next page; null on the last page.
  • metaobjectrequired
    The result's non-list fields (window, coverage, freshness, totals, note …).

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found429rate_limited500internal_error

Create a webhook endpoint

POST/v1/webhook-endpoints

Returns the signing secret (whsec_…) once. Up to 16 endpoints per workspace.

  • Send "dry_run": true to get {"object": "dry_run", "would_write": …} without writing anything.

SDKlistener.webhookEndpoints.create()client.webhook_endpoints.create()

Headers

  • Idempotency-Keystringmax 255 chars
    Any unique string (≤ 255 chars). Replays within 24 h return the stored response with Idempotent-Replayed: true.

Request body

application/json
  • urlstringrequired
    HTTPS URL that receives POSTed events.
  • enabled_eventsarray of stringsrequired
    Event types to deliver, or ["*"] for all. See GET /v1/event-types.
  • descriptionstringnullable
    Free-text note shown in the dashboard.
  • dry_runboolean
    Validate and return what would be written without calling the service.

    Default false

Returns

200

OK

One of:

WebhookEndpoint
DryRun

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found409confirmation_required413body_too_large429rate_limited500internal_error

Retrieve a webhook endpoint

GET/v1/webhook-endpoints/{endpoint_id}

SDKlistener.webhookEndpoints.retrieve()client.webhook_endpoints.retrieve()

Path parameters

  • endpoint_idstringrequired
    Webhook endpoint id (we_…).

Returns

200

OK

  • objectanyrequired
  • idstringrequired
    we_…
  • urlstring (uri)required
  • enabled_eventsarray of stringsrequired
  • statusstringrequired
    One ofenableddisabled
  • descriptionstringnullable
  • disabled_reasonstringnullable
  • secretstring
    whsec_… — returned only on create and roll-secret.
  • secret_last4string
  • expires_previous_atstring (date-time)nullable
  • api_versionstring
  • created_atstring (date-time)
  • updated_atstring (date-time)

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found429rate_limited500internal_error

Update a webhook endpoint

PATCH/v1/webhook-endpoints/{endpoint_id}
  • Send "dry_run": true to get {"object": "dry_run", "would_write": …} without writing anything.

SDKlistener.webhookEndpoints.update()client.webhook_endpoints.update()

Path parameters

  • endpoint_idstringrequired
    Webhook endpoint id (we_…).

Headers

  • Idempotency-Keystringmax 255 chars
    Any unique string (≤ 255 chars). Replays within 24 h return the stored response with Idempotent-Replayed: true.

Request body

application/json
  • urlstringnullable
    New HTTPS URL.
  • enabled_eventsarray of stringsnullable
    Event types to deliver, or ["*"].
  • descriptionstringnullable
    Free-text note.
  • disabledbooleannullable
    true pauses deliveries; false re-enables the endpoint.
  • dry_runboolean
    Validate and return what would be written without calling the service.

    Default false

Returns

200

OK

One of:

WebhookEndpoint
DryRun

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found409confirmation_required413body_too_large429rate_limited500internal_error

Delete a webhook endpoint

DELETE/v1/webhook-endpoints/{endpoint_id}
  • Send ?dry_run=true to get {"object": "dry_run", "would_write": …} without writing anything.

SDKlistener.webhookEndpoints.delete()client.webhook_endpoints.delete()

Path parameters

  • endpoint_idstringrequired
    Webhook endpoint id (we_…).

Query parameters

  • dry_runboolean
    Validate and return what would be written without calling the service.

    Default false

Headers

  • Idempotency-Keystringmax 255 chars
    Any unique string (≤ 255 chars). Replays within 24 h return the stored response with Idempotent-Replayed: true.

Returns

200

OK

One of:

WebhookEndpoint
DryRun

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found409confirmation_required413body_too_large429rate_limited500internal_error

Roll a webhook signing secret

POST/v1/webhook-endpoints/{endpoint_id}/roll-secret

Returns the new secret once; the previous one keeps signing until expires_previous_at.

  • Send "dry_run": true to get {"object": "dry_run", "would_write": …} without writing anything.

SDKlistener.webhookEndpoints.rollSecret()client.webhook_endpoints.roll_secret()

Path parameters

  • endpoint_idstringrequired
    Webhook endpoint id (we_…).

Headers

  • Idempotency-Keystringmax 255 chars
    Any unique string (≤ 255 chars). Replays within 24 h return the stored response with Idempotent-Replayed: true.

Request body

application/json
  • expire_previous_in_hoursinteger
    Hours the previous secret keeps signing (0–168).

    Default 24

  • dry_runboolean
    Validate and return what would be written without calling the service.

    Default false

Returns

200

OK

One of:

WebhookEndpoint
DryRun

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found409confirmation_required413body_too_large429rate_limited500internal_error

Reveal a webhook signing secret

GET/v1/webhook-endpoints/{endpoint_id}/secret

The endpoint's current signing secret (whsec_…), as the dashboard's "Reveal" shows it, plus previous_secret_expires_at while a rolled secret still signs. Needs webhooks:write because the secret lets its holder forge deliveries. Never cached (Cache-Control: no-store, no ETag).

SDKlistener.webhookEndpoints.retrieveSecret()client.webhook_endpoints.retrieve_secret()

Path parameters

  • endpoint_idstringrequired
    Webhook endpoint id (we_…).

Returns

200

OK

  • objectanyrequired
  • idstringrequired
    we_…
  • secretstringrequired
    whsec_… — verify Listener-Signature with it.
  • secret_last4stringnullable
  • previous_secret_expires_atstring (date-time)nullable
    Set while a rolled secret still signs deliveries.

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found429rate_limited500internal_error

Send a test event

POST/v1/webhook-endpoints/{endpoint_id}/test
  • Send "dry_run": true to get {"object": "dry_run", "would_write": …} without writing anything.

SDKlistener.webhookEndpoints.test()client.webhook_endpoints.test()

Path parameters

  • endpoint_idstringrequired
    Webhook endpoint id (we_…).

Headers

  • Idempotency-Keystringmax 255 chars
    Any unique string (≤ 255 chars). Replays within 24 h return the stored response with Idempotent-Replayed: true.

Request body

application/json
  • event_typestring
    Event type to send.

    Default "webhook_endpoint.test"

  • dry_runboolean
    Validate and return what would be written without calling the service.

    Default false

Returns

200

OK

One of:

WebhookDelivery
DryRun

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found409confirmation_required413body_too_large429rate_limited500internal_error

List recent deliveries

GET/v1/webhook-endpoints/{endpoint_id}/deliveries

SDKlistener.webhookEndpoints.deliveries.list()client.webhook_endpoints.deliveries.list()

Path parameters

  • endpoint_idstringrequired
    Webhook endpoint id (we_…).

Query parameters

  • limitinteger1 to 100
    Page size, 1–100 (default 25).

    Default 25

  • cursorstring
    Opaque cursor from the previous page's next_cursor.

Returns

200

OK

  • objectstringrequired
  • urlstringrequired
  • dataarray of objectsrequired
    Show child attributesHide child attributes
  • has_morebooleanrequired
  • next_cursorstringrequirednullable
    Pass as cursor to get the next page; null on the last page.
  • metaobjectrequired
    The result's non-list fields (window, coverage, freshness, totals, note …).

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found429rate_limited500internal_error

Retry a delivery

POST/v1/webhook-deliveries/{delivery_id}/retry
  • Send "dry_run": true to get {"object": "dry_run", "would_write": …} without writing anything.

SDKlistener.webhookDeliveries.retry()client.webhook_deliveries.retry()

Path parameters

  • delivery_idstringrequired
    Delivery id (wd_…).

Headers

  • Idempotency-Keystringmax 255 chars
    Any unique string (≤ 255 chars). Replays within 24 h return the stored response with Idempotent-Replayed: true.

Request body

application/json
  • dry_runboolean
    Validate and return what would be written without calling the service.

    Default false

Returns

200

OK

One of:

WebhookDelivery
DryRun

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found409confirmation_required413body_too_large429rate_limited500internal_error

List events

GET/v1/events

Newest first. Events are kept for 30 days.

SDKlistener.events.list()client.events.list()

Query parameters

  • typestringnullable
    Only events of this type (e.g. campaign.updated).
  • created_gtestringnullable
    Only events created at or after this ISO 8601 time.
  • created_ltestringnullable
    Only events created at or before this ISO 8601 time.
  • limitinteger1 to 100
    Page size, 1–100 (default 25).

    Default 25

  • cursorstring
    Opaque cursor from the previous page's next_cursor.

Returns

200

OK

  • objectstringrequired
  • urlstringrequired
  • dataarray of objectsrequired
    Show child attributesHide child attributes
  • has_morebooleanrequired
  • next_cursorstringrequirednullable
    Pass as cursor to get the next page; null on the last page.
  • metaobjectrequired
    The result's non-list fields (window, coverage, freshness, totals, note …).

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found429rate_limited500internal_error

Retrieve an event

GET/v1/events/{event_id}

SDKlistener.events.retrieve()client.events.retrieve()

Path parameters

  • event_idstringrequired
    Event id (evt_…).

Returns

200

OK

  • objectanyrequired
  • idstringrequired
    evt_…
  • typestringrequired
  • createdstring (date-time)required
  • dataobjectrequired
    Show child attributesHide child attributes
  • api_versionstring
  • workspace_idstring
  • sourcestring
    One ofapiappsystem
  • requestobjectnullable
    Show child attributesHide child attributes

Errors

400parameter_invalid401credential_invalid403scope_missing404resource_not_found429rate_limited500internal_error

List event types

GET/v1/event-types
No auth

Every event type with a description and an example payload. No authentication.

SDKlistener.eventTypes.list()client.event_types.list()

Returns

200

OK

  • objectstringrequired
  • urlstringrequired
  • dataarray of objectsrequired
    Show child attributesHide child attributes
  • has_morebooleanrequired
  • next_cursorstringrequirednullable
    Pass as cursor to get the next page; null on the last page.
  • metaobjectrequired
    The result's non-list fields (window, coverage, freshness, totals, note …).

Errors

400parameter_invalid404resource_not_found429rate_limited500internal_error