github.com/grokify/go-ringcentral-client@v0.3.31/engagedigital/v1/client/docs/WebhooksApi.md (about) 1 # \WebhooksApi 2 3 All URIs are relative to *https://DOMAIN.api.engagement.dimelo.com/1.0* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateWebhook**](WebhooksApi.md#CreateWebhook) | **Post** /webhooks | Creating a webhook 8 [**DeleteWebhook**](WebhooksApi.md#DeleteWebhook) | **Delete** /webhooks/{webhookId} | Deleting a webhook 9 [**GetAllWebhooks**](WebhooksApi.md#GetAllWebhooks) | **Get** /webhooks | Getting all webhooks 10 [**GetWebhook**](WebhooksApi.md#GetWebhook) | **Get** /webhooks/{webhookId} | Getting a webhook from its id 11 [**UpdateWebhook**](WebhooksApi.md#UpdateWebhook) | **Put** /webhooks/{webhookId} | Updating a webhook 12 13 14 15 ## CreateWebhook 16 17 > Webhook CreateWebhook(ctx, accessToken, label, url, registeredEvents, optional) 18 Creating a webhook 19 20 This method creates a webhook. In case of success it renders the webhook, otherwise, it renders an error (422 HTTP code). Authorization: All users having the manage_api_access_tokens permission or all users having an api access token. 21 22 ### Required Parameters 23 24 25 Name | Type | Description | Notes 26 ------------- | ------------- | ------------- | ------------- 27 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 28 **accessToken** | **string**| Access token. | 29 **label** | **string**| The label of the webhook. | 30 **url** | **string**| The url of a webhook. This is used to determine the endpoint of your webhook, where | 31 **registeredEvents** | [**[]string**](string.md)| An array containing all the events that your webhook wants to subscribe. | 32 **optional** | ***CreateWebhookOpts** | optional parameters | nil if no parameters 33 34 ### Optional Parameters 35 36 Optional parameters are passed through a pointer to a CreateWebhookOpts struct 37 38 39 Name | Type | Description | Notes 40 ------------- | ------------- | ------------- | ------------- 41 42 43 44 45 **active** | **optional.Bool**| true or false, this field is used to enable/disable a webhook. | 46 **stagingUse** | **optional.Bool**| true or false, this field is used to determine if a webhook will be run in staging | 47 **verifyToken** | **optional.String**| The token used in your webhook. | 48 **secret** | **optional.String**| The secret key that will be served as a `X-Dimelo-Secret` header in every request. | 49 50 ### Return type 51 52 [**Webhook**](Webhook.md) 53 54 ### Authorization 55 56 No authorization required 57 58 ### HTTP request headers 59 60 - **Content-Type**: Not defined 61 - **Accept**: application/json 62 63 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 64 [[Back to Model list]](../README.md#documentation-for-models) 65 [[Back to README]](../README.md) 66 67 68 ## DeleteWebhook 69 70 > Webhook DeleteWebhook(ctx, webhookId, accessToken) 71 Deleting a webhook 72 73 This method destroys an existing webhook. It renders webhook itself. It renders a 404 if id is invalid. Authorization: All users having the manage_api_access_tokens permission or all users having an api access token belonging to the webhook you’re deleting. 74 75 ### Required Parameters 76 77 78 Name | Type | Description | Notes 79 ------------- | ------------- | ------------- | ------------- 80 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 81 **webhookId** | **string**| | 82 **accessToken** | **string**| Access token. | 83 84 ### Return type 85 86 [**Webhook**](Webhook.md) 87 88 ### Authorization 89 90 No authorization required 91 92 ### HTTP request headers 93 94 - **Content-Type**: Not defined 95 - **Accept**: application/json 96 97 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 98 [[Back to Model list]](../README.md#documentation-for-models) 99 [[Back to README]](../README.md) 100 101 102 ## GetAllWebhooks 103 104 > GetAllWebhooksResponse GetAllWebhooks(ctx, accessToken, optional) 105 Getting all webhooks 106 107 This method renders webhooks ordered by active and staging_use (descending). Authorization: users having manage_api_access_tokens permission can see all webhooks / users don’t having the manage_api_access_tokens permission can see only the webhooks belonging to access token created by them. 108 109 ### Required Parameters 110 111 112 Name | Type | Description | Notes 113 ------------- | ------------- | ------------- | ------------- 114 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 115 **accessToken** | **string**| Access token. | 116 **optional** | ***GetAllWebhooksOpts** | optional parameters | nil if no parameters 117 118 ### Optional Parameters 119 120 Optional parameters are passed through a pointer to a GetAllWebhooksOpts struct 121 122 123 Name | Type | Description | Notes 124 ------------- | ------------- | ------------- | ------------- 125 126 **offset** | **optional.Int32**| The record index to start. Default value is 0. | 127 **limit** | **optional.Int32**| The max number of records to return. Default value is 30, max value is 150. | 128 129 ### Return type 130 131 [**GetAllWebhooksResponse**](GetAllWebhooksResponse.md) 132 133 ### Authorization 134 135 No authorization required 136 137 ### HTTP request headers 138 139 - **Content-Type**: Not defined 140 - **Accept**: application/json 141 142 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 143 [[Back to Model list]](../README.md#documentation-for-models) 144 [[Back to README]](../README.md) 145 146 147 ## GetWebhook 148 149 > Webhook GetWebhook(ctx, webhookId, accessToken) 150 Getting a webhook from its id 151 152 This method renders a webhook from given id. Authorization: users having manage_api_access_tokens permission can see any webhook / users don’t having the `manage_api_access_tokens` permission can see only the webhook in case the webhook is associated to an access token created by them. 153 154 ### Required Parameters 155 156 157 Name | Type | Description | Notes 158 ------------- | ------------- | ------------- | ------------- 159 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 160 **webhookId** | **string**| | 161 **accessToken** | **string**| Access token. | 162 163 ### Return type 164 165 [**Webhook**](Webhook.md) 166 167 ### Authorization 168 169 No authorization required 170 171 ### HTTP request headers 172 173 - **Content-Type**: Not defined 174 - **Accept**: application/json 175 176 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 177 [[Back to Model list]](../README.md#documentation-for-models) 178 [[Back to README]](../README.md) 179 180 181 ## UpdateWebhook 182 183 > Webhook UpdateWebhook(ctx, webhookId, accessToken, optional) 184 Updating a webhook 185 186 This method updates an existing webhook from given attributes and renders it in case of success. Authorization: All users having the manage_api_access_tokens permission or all users having an api access token belonging to the webhook you’re updating. 187 188 ### Required Parameters 189 190 191 Name | Type | Description | Notes 192 ------------- | ------------- | ------------- | ------------- 193 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 194 **webhookId** | **string**| | 195 **accessToken** | **string**| Access token. | 196 **optional** | ***UpdateWebhookOpts** | optional parameters | nil if no parameters 197 198 ### Optional Parameters 199 200 Optional parameters are passed through a pointer to a UpdateWebhookOpts struct 201 202 203 Name | Type | Description | Notes 204 ------------- | ------------- | ------------- | ------------- 205 206 207 **active** | **optional.Bool**| true or false, this field is used to enable/disable a webhook. | 208 **label** | **optional.String**| The label of the webhook. | 209 **stagingUse** | **optional.Bool**| true or false, this field is used to determine if a webhook will be run in staging | 210 **url** | **optional.String**| The url of a webhook. This is used to determine the endpoint of your webhook, where | 211 **verifyToken** | **optional.String**| The token used in your webhook. | 212 **secret** | **optional.String**| The secret key that will be served as a `X-Dimelo-Secret` header in every request. | 213 **registeredEvents** | [**optional.Interface of []string**](string.md)| An array containing all the events that your webhook wants to subscribe. | 214 215 ### Return type 216 217 [**Webhook**](Webhook.md) 218 219 ### Authorization 220 221 No authorization required 222 223 ### HTTP request headers 224 225 - **Content-Type**: Not defined 226 - **Accept**: application/json 227 228 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 229 [[Back to Model list]](../README.md#documentation-for-models) 230 [[Back to README]](../README.md) 231