## List Webhooks

`print_mail.webhooks.list(WebhookListParams**kwargs)  -> SyncSkipLimit[Webhook]`

**get** `/print-mail/v1/webhooks`

Retrieve a paginated list of Webhooks.

### Parameters

- `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 Webhook: …`

  - `id: str`

    A unique ID prefixed with webhook_

  - `created_at: datetime`

    The UTC time at which this resource was created.

  - `enabled: bool`

    Whether this webhook is enabled. Disabled webhooks are not triggered.

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

    The list of event types this webhook listens for.

    - `"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"`

  - `live: bool`

    `true` if this is a live mode resource else `false`.

  - `object: Literal["webhook"]`

    Always `webhook`.

    - `"webhook"`

  - `updated_at: datetime`

    The UTC time at which this resource was last updated.

  - `url: str`

    An HTTPS URL that PostGrid can invoke for webhook deliveries.

  - `description: Optional[str]`

    An optional string describing this resource. Will be visible in the API and the dashboard.

  - `metadata: Optional[Dict[str, object]]`

    See the section on Metadata.

  - `payload_format: Optional[Literal["jwt", "json"]]`

    The format in which a Webhook's event payload is delivered.

    - `"jwt"`

    - `"json"`

  - `secret: Optional[str]`

    A webhook signing secret with at least 20 non-whitespace characters.

### 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()
page = page.data[0]
print(page.id)
```

#### Response

```json
{
  "object": "list",
  "limit": 10,
  "skip": 0,
  "totalCount": 1,
  "data": [
    {
      "id": "webhook_skN2ZTvFwS62oc5tJY1gzw",
      "object": "webhook",
      "live": false,
      "description": "Letter Created",
      "url": "https://example.com/postgrid-webhook",
      "enabledEvents": [
        "letter.created"
      ],
      "payloadFormat": "jwt",
      "enabled": true,
      "secret": "webhook_secret_xkNXtQ4jHevFdkTG3mSf1Q",
      "createdAt": "2022-02-16T18:37:02.048Z",
      "updatedAt": "2022-02-16T18:37:02.048Z"
    }
  ]
}
```
