webhooks
Webhooks
Bases: ListableApiResource
, FindableApiResource
, CreatableApiResource
, UpdatableApiResource
, DestroyableApiResource
Source code in nylas/resources/webhooks.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
create(request_body)
Create a webhook destination
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request_body |
CreateWebhookRequest
|
The request body to create the webhook destination |
required |
Returns:
Type | Description |
---|---|
Response[WebhookWithSecret]
|
The created webhook destination |
Source code in nylas/resources/webhooks.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
destroy(webhook_id)
Delete a webhook destination
Parameters:
Name | Type | Description | Default |
---|---|---|---|
webhook_id |
str
|
The ID of the webhook destination to delete |
required |
Returns:
Type | Description |
---|---|
WebhookDeleteResponse
|
The response from deleting the webhook destination |
Source code in nylas/resources/webhooks.py
86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
find(webhook_id)
Get a webhook destination
Parameters:
Name | Type | Description | Default |
---|---|---|---|
webhook_id |
str
|
The ID of the webhook destination to get |
required |
Returns:
Type | Description |
---|---|
Response[Webhook]
|
The webhook destination |
Source code in nylas/resources/webhooks.py
37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
ip_addresses()
Get the current list of IP addresses that Nylas sends webhooks from
Returns:
Type | Description |
---|---|
Response[WebhookIpAddressesResponse]
|
The list of IP addresses that Nylas sends webhooks from |
Source code in nylas/resources/webhooks.py
117 118 119 120 121 122 123 124 125 |
|
list()
List all webhook destinations
Returns:
Type | Description |
---|---|
ListResponse[Webhook]
|
The list of webhook destinations |
Source code in nylas/resources/webhooks.py
28 29 30 31 32 33 34 35 |
|
rotate_secret(webhook_id)
Update the webhook secret value for a destination
Parameters:
Name | Type | Description | Default |
---|---|---|---|
webhook_id |
str
|
The ID of the webhook destination to update |
required |
Returns:
Type | Description |
---|---|
Response[WebhookWithSecret]
|
The updated webhook destination |
Source code in nylas/resources/webhooks.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
update(webhook_id, request_body)
Update a webhook destination
Parameters:
Name | Type | Description | Default |
---|---|---|---|
webhook_id |
str
|
The ID of the webhook destination to update |
required |
request_body |
UpdateWebhookRequest
|
The request body to update the webhook destination |
required |
Returns:
Type | Description |
---|---|
Response[Webhook]
|
The updated webhook destination |
Source code in nylas/resources/webhooks.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|
extract_challenge_parameter(url)
Extract the challenge parameter from a URL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
str
|
The URL sent by Nylas containing the challenge parameter |
required |
Returns:
Type | Description |
---|---|
str
|
The challenge parameter |
Source code in nylas/resources/webhooks.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|