## List Webhook Invocations

`print_mail.webhooks.list_invocations(strid, WebhookListInvocationsParams**kwargs)  -> SyncSkipLimit[WebhookInvocation]`

**get** `/print-mail/v1/webhooks/{id}/invocations`

Retrieve a paginated list of invocations for a Webhook.

### Parameters

- `id: str`

- `limit: Optional[int]`

- `search: Optional[str]`

  You can supply any string to help narrow down the list of resources. For example, if you pass `"New York"` (quoted), it will return resources that have that string present somewhere in their response. Alternatively, you can supply a structured search query. See the documentation on `StructuredSearchQuery` for more details.

- `skip: Optional[int]`

### Returns

- `class WebhookInvocation: …`

  - `id: str`

    A unique ID prefixed with `webhook_invocation_`.

  - `created_at: datetime`

    The UTC time at which this invocation was created.

  - `event: str`

    The ID of the event that was delivered in this invocation.

  - `object: Literal["webhook_invocation"]`

    Always `webhook_invocation`.

    - `"webhook_invocation"`

  - `status_code: int`

    The HTTP status code returned by your endpoint for this invocation.

  - `type: Literal["letter.created", "letter.updated", "postcard.created", 18 more]`

    The type of event that a Webhook can listen for and that an Event represents.

    - `"letter.created"`

    - `"letter.updated"`

    - `"postcard.created"`

    - `"postcard.updated"`

    - `"self_mailer.created"`

    - `"self_mailer.updated"`

    - `"cheque.created"`

    - `"cheque.updated"`

    - `"box.created"`

    - `"box.updated"`

    - `"snap_pack.created"`

    - `"snap_pack.updated"`

    - `"return_envelope_order.created"`

    - `"return_envelope_order.updated"`

    - `"tracker.visited"`

    - `"campaign.created"`

    - `"campaign.updated"`

    - `"virtual_mailbox_item.created"`

    - `"postal_statement.created"`

    - `"document.created"`

    - `"document.updated"`

  - `updated_at: datetime`

    The UTC time at which this invocation was last updated.

  - `webhook: str`

    The ID of the webhook that was invoked.

  - `order_id: Optional[str]`

    The ID of the order associated with this invocation, if the event was order-related.

### Example

```python
import os
from postgrid import PostGrid

client = PostGrid(
    print_mail_api_key=os.environ.get("POSTGRID_PRINT_MAIL_API_KEY"),  # This is the default and can be omitted
)
page = client.print_mail.webhooks.list_invocations(
    id="id",
)
page = page.data[0]
print(page.id)
```

#### Response

```json
{
  "object": "list",
  "limit": 10,
  "skip": 0,
  "totalCount": 1,
  "data": [
    {
      "id": "webhook_invocation_6TAGtJezjUyGFnznTRdX37",
      "object": "webhook_invocation",
      "webhook": "webhook_skN2ZTvFwS62oc5tJY1gzw",
      "event": "event_r1nfP4xAacyqMYtt7PeyFD",
      "orderID": "letter_rqfnwvzq5TUsYR2r6L9V8X",
      "type": "letter.created",
      "statusCode": 200,
      "createdAt": "2021-04-02T02:09:32.066Z",
      "updatedAt": "2021-04-02T02:09:32.066Z"
    }
  ]
}
```
