webhooks
Webhooks
Bases: ListableApiResource
, FindableApiResource
, CreatableApiResource
, UpdatableApiResource
, DestroyableApiResource
Nylas Webhooks API
The Nylas webhooks API allows you to manage webhook destinations for your Nylas application.
Source code in nylas/resources/webhooks.py
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 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|
create(request_body, overrides=None)
Create a webhook destination
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request_body |
CreateWebhookRequest
|
The request body to create the webhook destination |
required |
overrides |
RequestOverrides
|
The request overrides to apply to the request |
None
|
Returns:
Type | Description |
---|---|
Response[WebhookWithSecret]
|
The created webhook destination |
Source code in nylas/resources/webhooks.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|
destroy(webhook_id, overrides=None)
Delete a webhook destination
Parameters:
Name | Type | Description | Default |
---|---|---|---|
webhook_id |
str
|
The ID of the webhook destination to delete |
required |
overrides |
RequestOverrides
|
The request overrides to apply to the request |
None
|
Returns:
Type | Description |
---|---|
WebhookDeleteResponse
|
The response from deleting the webhook destination |
Source code in nylas/resources/webhooks.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
find(webhook_id, overrides=None)
Get a webhook destination
Parameters:
Name | Type | Description | Default |
---|---|---|---|
webhook_id |
str
|
The ID of the webhook destination to get |
required |
overrides |
RequestOverrides
|
The request overrides to apply to the request |
None
|
Returns:
Type | Description |
---|---|
Response[Webhook]
|
The webhook destination |
Source code in nylas/resources/webhooks.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
ip_addresses(overrides=None)
Get the current list of IP addresses that Nylas sends webhooks from
Parameters:
Name | Type | Description | Default |
---|---|---|---|
overrides |
RequestOverrides
|
The request overrides to apply to the request |
None
|
Returns:
Type | Description |
---|---|
Response[WebhookIpAddressesResponse]
|
The list of IP addresses that Nylas sends webhooks from |
Source code in nylas/resources/webhooks.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|
list(overrides=None)
List all webhook destinations
Parameters:
Name | Type | Description | Default |
---|---|---|---|
overrides |
RequestOverrides
|
The request overrides to apply to the request |
None
|
Returns:
Type | Description |
---|---|
ListResponse[Webhook]
|
The list of webhook destinations |
Source code in nylas/resources/webhooks.py
35 36 37 38 39 40 41 42 43 44 45 |
|
rotate_secret(webhook_id, overrides=None)
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 |
overrides |
RequestOverrides
|
The request overrides to apply to the request |
None
|
Returns:
Type | Description |
---|---|
Response[WebhookWithSecret]
|
The updated webhook destination |
Source code in nylas/resources/webhooks.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
update(webhook_id, request_body, overrides=None)
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 |
overrides |
RequestOverrides
|
The request overrides to apply to the request |
None
|
Returns:
Type | Description |
---|---|
Response[Webhook]
|
The updated webhook destination |
Source code in nylas/resources/webhooks.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
|
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
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
|