Open SidemenuAPI Reference
API Reference
Close Sidemenu

Webhooks

List webhook deliveriesgetWebhookDeliveries

get https://api.telnyx.com/v2/webhook_deliveries

Lists webhook_deliveries for the authenticated user

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/webhook_deliveries?filter[status][eq]=delivered&filter[webhook][contains]=call.initiated"
Parameters
In query
filter[status][eq]
string
optional

Return only webhook_deliveries matching the given `status`

Example: "delivered"
Options: [ "delivered", "failed" ]
filter[webhook][contains]
string
optional

Return only webhook deliveries whose `webhook` component contains the given text

Example: "call.initiated"
filter[attempts][contains]
string
optional

Return only webhook_deliveries whose `attempts` component contains the given text

Example: "https://fallback.example.com/webhooks"
filter[started_at][gte]
string
optional

Return only webhook_deliveries whose delivery started later than or at given ISO 8601 datetime

Example: "2019-03-29T11:10:00Z"
filter[started_at][lte]
string
optional

Return only webhook_deliveries whose delivery started earlier than or at given ISO 8601 datetime

Example: "2019-03-29T11:10:00Z"
filter[finished_at][gte]
string
optional

Return only webhook_deliveries whose delivery finished later than or at given ISO 8601 datetime

Example: "2019-03-29T11:10:00Z"
filter[finished_at][lte]
string
optional

Return only webhook_deliveries whose delivery finished earlier than or at given ISO 8601 datetime

Example: "2019-03-29T11:10:00Z"
page[number]
integer (1)
optional

The page number to load

Default: 1
page[size]
integer (1 - 250)
optional

The size of the page

Default: 20
Responses
200

A paginated array of webhook_delivery attempts

401

Unauthorized

422

Unprocessable entity

Success Response
{
  "data": [
    {
      "attempts": [
        {
          "finished_at": "2020-08-10T14:00:05.595Z",
          "http": {
            "request": {
              "headers": [
                "Accept: */*"
              ],
              "url": "https://fallback.example.com/webhooks"
            },
            "response": {
              "body": "All good.",
              "headers": [
                "Content-Type: text/html"
              ],
              "status": 200
            }
          },
          "started_at": "2020-08-10T14:00:05.364Z",
          "status": "delivered"
        },
        {
          "errors": [
            {
              "code": "75499",
              "detail": "The server returned another HTTP 4XX error",
              "title": "Webhook host returned HTTP 4XX"
            }
          ],
          "finished_at": "2020-08-10T14:00:05.360Z",
          "http": {
            "request": {
              "headers": [
                "Accept: */*"
              ],
              "url": "https://typo.example.com/webhooks"
            },
            "response": {
              "body": "Oops. Not found.",
              "headers": [
                "Content-Type: text/html",
                "Pragma: no-cache"
              ],
              "status": 404
            }
          },
          "started_at": "2020-08-10T14:00:05.004Z",
          "status": "failed"
        }
      ],
      "finished_at": "2020-08-10T14:00:05.595Z",
      "id": "f5586561-8ff0-4291-a0ac-84fe544797bd",
      "record_type": "webhook_delivery",
      "started_at": "2020-08-10T14:00:00.000Z",
      "status": "delivered",
      "user_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      "webhook": {
        "event_type": "webhook.command",
        "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
        "occurred_at": "2018-02-02T22:25:27.521992Z",
        "payload": {},
        "record_type": "event"
      }
    }
  ],
  "meta": {
    "page_number": 2,
    "page_size": 25,
    "total_pages": 3,
    "total_results": 55
  }
}

Find webhook_delivery details by IDgetWebhookDelivery

get https://api.telnyx.com/v2/webhook_deliveries/{id}

Provides webhook_delivery debug data, such as timestamps, delivery status and attempts.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/webhook_deliveries/C9C0797E-901D-4349-A33C-C2C8F31A92C2"
Parameters
In path
id
string (uuid)
required

Uniquely identifies the webhook_delivery.

Example: "C9C0797E-901D-4349-A33C-C2C8F31A92C2"
Responses
200

Webhook delivery record.

401

Unauthorized

404

WebhookDelivery not found

Success Response
{
  "data": {
    "attempts": [
      {
        "finished_at": "2020-08-10T14:00:05.595Z",
        "http": {
          "request": {
            "headers": [
              "Accept: */*"
            ],
            "url": "https://fallback.example.com/webhooks"
          },
          "response": {
            "body": "All good.",
            "headers": [
              "Content-Type: text/html"
            ],
            "status": 200
          }
        },
        "started_at": "2020-08-10T14:00:05.364Z",
        "status": "delivered"
      },
      {
        "errors": [
          {
            "code": "75499",
            "detail": "The server returned another HTTP 4XX error",
            "title": "Webhook host returned HTTP 4XX"
          }
        ],
        "finished_at": "2020-08-10T14:00:05.360Z",
        "http": {
          "request": {
            "headers": [
              "Accept: */*"
            ],
            "url": "https://typo.example.com/webhooks"
          },
          "response": {
            "body": "Oops. Not found.",
            "headers": [
              "Content-Type: text/html",
              "Pragma: no-cache"
            ],
            "status": 404
          }
        },
        "started_at": "2020-08-10T14:00:05.004Z",
        "status": "failed"
      }
    ],
    "finished_at": "2020-08-10T14:00:05.595Z",
    "id": "f5586561-8ff0-4291-a0ac-84fe544797bd",
    "record_type": "webhook_delivery",
    "started_at": "2020-08-10T14:00:00.000Z",
    "status": "delivered",
    "user_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    "webhook": {
      "event_type": "webhook.command",
      "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      "occurred_at": "2018-02-02T22:25:27.521992Z",
      "payload": {},
      "record_type": "event"
    }
  }
}
Previous: Overview

Was this section helpful?