List Webhooks
print_mail.webhooks.list(WebhookListParams**kwargs) -> SyncSkipLimit[Webhook]
GET/print-mail/v1/webhooks
Retrieve a paginated list of Webhooks.
Parameters
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.
List Webhooks
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){
"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"
}
]
}Returns Examples
{
"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"
}
]
}