client.webhook_deliveries
Delivery attempts of events to your endpoints. These methods are on client.webhook_deliveries, where client is a MoreVoice client (see the Python SDK). On AsyncMoreVoice the same methods are awaited. Each one returns the response object and raises an exception when the API answers with an error.
list()
Section titled “list()”List webhook deliveries. Deliveries of events to your endpoints in this mode, newest first. Filter by endpoint, event or status (status=failed for the ones being retried). Kept 30 days.
def list(self, *, limit: int | Unset = 20, starting_after: str | Unset = UNSET, ending_before: str | Unset = UNSET, endpoint_id: str | Unset = UNSET, event_id: str | Unset = UNSET, status: _m.WebhookDeliveriesListStatus | Unset = UNSET, more_voice_version: str | Unset = UNSET) -> AsyncPage[_m.WebhookDelivery]client.webhook_deliveries.list() · await async_client.webhook_deliveries.list() · GET /webhook_deliveries · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
limit |
integer |
no | How many objects to return, 1–100 (default 20). |
starting_after |
string |
no | A cursor (next_cursor) or object ID: return the objects after it (older). |
ending_before |
string |
no | A cursor or object ID: return the objects before it (newer). |
endpoint_id |
string |
no | A webhook endpoint ID (we_…). |
event_id |
string |
no | A event ID (evt_…). |
status |
"pending" | "failed" | "succeeded" | "dead" |
no |
Returns
Section titled “Returns”A page of results (WebhookDeliveryList): data, has_more and next_cursor.
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
for webhook_delivery in client.webhook_deliveries.list(): print(webhook_delivery)retrieve()
Section titled “retrieve()”Retrieve a webhook delivery. The delivery with the request as last sent (headers without the signatures, the exact body) and the start of the endpoint’s answer.
def retrieve(self, id: str, *, more_voice_version: str | Unset = UNSET) -> _m.WebhookDeliveryclient.webhook_deliveries.retrieve() · await async_client.webhook_deliveries.retrieve() · GET /webhook_deliveries/{id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A webhook delivery ID (whd_…). |
Returns
Section titled “Returns”WebhookDelivery:
| Field | Type | Description |
|---|---|---|
id |
string |
A webhook delivery ID (prefix whd_). |
object |
"webhook_delivery" |
Always webhook_delivery. |
endpoint_id |
string |
A webhook endpoint ID (prefix we_). |
event_id |
string |
A event ID (prefix evt_). |
event_type |
string | null |
— |
status |
"pending" | "failed" | "succeeded" | "dead" |
pending: not sent yet. failed: the last attempt failed; retried at next_attempt_at (for up to 72 hours). succeeded: answered 2xx. dead: given up. |
attempts |
integer |
— |
next_attempt_at |
string | null |
— |
last_attempt_at |
string | null |
— |
delivered_at |
string | null |
— |
response_status |
integer | null |
— |
response_excerpt |
string | null |
The first 2 KB of the endpoint’s last answer. |
duration_ms |
integer | null |
How long the last attempt took. |
error |
string | null |
— |
livemode |
boolean |
true in live mode, false in test mode. |
created |
string |
An ISO-8601 timestamp in UTC. |
request |
object |
The request as last sent (retrieve only). |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
webhook_delivery = client.webhook_deliveries.retrieve("whd_7Hk2Lm9Qp")print(webhook_delivery)retry()
Section titled “retry()”Retry a webhook delivery. Sends the delivery again right now (a dead one too) and returns it with the outcome. A retry that fails leaves a dead delivery dead; a delivery still being retried keeps its schedule.
def retry(self, id: str, *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.WebhookDeliveryclient.webhook_deliveries.retry() · await async_client.webhook_deliveries.retry() · POST /webhook_deliveries/{id}/retry · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A webhook delivery ID (whd_…). |
Returns
Section titled “Returns”WebhookDelivery:
| Field | Type | Description |
|---|---|---|
id |
string |
A webhook delivery ID (prefix whd_). |
object |
"webhook_delivery" |
Always webhook_delivery. |
endpoint_id |
string |
A webhook endpoint ID (prefix we_). |
event_id |
string |
A event ID (prefix evt_). |
event_type |
string | null |
— |
status |
"pending" | "failed" | "succeeded" | "dead" |
pending: not sent yet. failed: the last attempt failed; retried at next_attempt_at (for up to 72 hours). succeeded: answered 2xx. dead: given up. |
attempts |
integer |
— |
next_attempt_at |
string | null |
— |
last_attempt_at |
string | null |
— |
delivered_at |
string | null |
— |
response_status |
integer | null |
— |
response_excerpt |
string | null |
The first 2 KB of the endpoint’s last answer. |
duration_ms |
integer | null |
How long the last attempt took. |
error |
string | null |
— |
livemode |
boolean |
true in live mode, false in test mode. |
created |
string |
An ISO-8601 timestamp in UTC. |
request |
object |
The request as last sent (retrieve only). |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
webhook_delivery = client.webhook_deliveries.retry("whd_7Hk2Lm9Qp")print(webhook_delivery)