github.com/twilio/twilio-go@v1.20.1/rest/events/v1/docs/SubscriptionsApi.md (about) 1 # SubscriptionsApi 2 3 All URIs are relative to *https://events.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateSubscription**](SubscriptionsApi.md#CreateSubscription) | **Post** /v1/Subscriptions | 8 [**DeleteSubscription**](SubscriptionsApi.md#DeleteSubscription) | **Delete** /v1/Subscriptions/{Sid} | 9 [**FetchSubscription**](SubscriptionsApi.md#FetchSubscription) | **Get** /v1/Subscriptions/{Sid} | 10 [**ListSubscription**](SubscriptionsApi.md#ListSubscription) | **Get** /v1/Subscriptions | 11 [**UpdateSubscription**](SubscriptionsApi.md#UpdateSubscription) | **Post** /v1/Subscriptions/{Sid} | 12 13 14 15 ## CreateSubscription 16 17 > EventsV1Subscription CreateSubscription(ctx, optional) 18 19 20 21 Create a new Subscription. 22 23 ### Path Parameters 24 25 This endpoint does not need any path parameter. 26 27 ### Other Parameters 28 29 Other parameters are passed through a pointer to a CreateSubscriptionParams struct 30 31 32 Name | Type | Description 33 ------------- | ------------- | ------------- 34 **Description** | **string** | A human readable description for the Subscription **This value should not contain PII.** 35 **SinkSid** | **string** | The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. 36 **Types** | **[]interface{}** | An array of objects containing the subscribed Event Types 37 38 ### Return type 39 40 [**EventsV1Subscription**](EventsV1Subscription.md) 41 42 ### Authorization 43 44 [accountSid_authToken](../README.md#accountSid_authToken) 45 46 ### HTTP request headers 47 48 - **Content-Type**: application/x-www-form-urlencoded 49 - **Accept**: application/json 50 51 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 52 [[Back to Model list]](../README.md#documentation-for-models) 53 [[Back to README]](../README.md) 54 55 56 ## DeleteSubscription 57 58 > DeleteSubscription(ctx, Sid) 59 60 61 62 Delete a specific Subscription. 63 64 ### Path Parameters 65 66 67 Name | Type | Description 68 ------------- | ------------- | ------------- 69 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 70 **Sid** | **string** | A 34 character string that uniquely identifies this Subscription. 71 72 ### Other Parameters 73 74 Other parameters are passed through a pointer to a DeleteSubscriptionParams struct 75 76 77 Name | Type | Description 78 ------------- | ------------- | ------------- 79 80 ### Return type 81 82 (empty response body) 83 84 ### Authorization 85 86 [accountSid_authToken](../README.md#accountSid_authToken) 87 88 ### HTTP request headers 89 90 - **Content-Type**: Not defined 91 - **Accept**: Not defined 92 93 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 94 [[Back to Model list]](../README.md#documentation-for-models) 95 [[Back to README]](../README.md) 96 97 98 ## FetchSubscription 99 100 > EventsV1Subscription FetchSubscription(ctx, Sid) 101 102 103 104 Fetch a specific Subscription. 105 106 ### Path Parameters 107 108 109 Name | Type | Description 110 ------------- | ------------- | ------------- 111 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 112 **Sid** | **string** | A 34 character string that uniquely identifies this Subscription. 113 114 ### Other Parameters 115 116 Other parameters are passed through a pointer to a FetchSubscriptionParams struct 117 118 119 Name | Type | Description 120 ------------- | ------------- | ------------- 121 122 ### Return type 123 124 [**EventsV1Subscription**](EventsV1Subscription.md) 125 126 ### Authorization 127 128 [accountSid_authToken](../README.md#accountSid_authToken) 129 130 ### HTTP request headers 131 132 - **Content-Type**: Not defined 133 - **Accept**: application/json 134 135 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 136 [[Back to Model list]](../README.md#documentation-for-models) 137 [[Back to README]](../README.md) 138 139 140 ## ListSubscription 141 142 > []EventsV1Subscription ListSubscription(ctx, optional) 143 144 145 146 Retrieve a paginated list of Subscriptions belonging to the account used to make the request. 147 148 ### Path Parameters 149 150 This endpoint does not need any path parameter. 151 152 ### Other Parameters 153 154 Other parameters are passed through a pointer to a ListSubscriptionParams struct 155 156 157 Name | Type | Description 158 ------------- | ------------- | ------------- 159 **SinkSid** | **string** | The SID of the sink that the list of Subscriptions should be filtered by. 160 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 161 **Limit** | **int** | Max number of records to return. 162 163 ### Return type 164 165 [**[]EventsV1Subscription**](EventsV1Subscription.md) 166 167 ### Authorization 168 169 [accountSid_authToken](../README.md#accountSid_authToken) 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 ## UpdateSubscription 182 183 > EventsV1Subscription UpdateSubscription(ctx, Sidoptional) 184 185 186 187 Update a Subscription. 188 189 ### Path Parameters 190 191 192 Name | Type | Description 193 ------------- | ------------- | ------------- 194 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 195 **Sid** | **string** | A 34 character string that uniquely identifies this Subscription. 196 197 ### Other Parameters 198 199 Other parameters are passed through a pointer to a UpdateSubscriptionParams struct 200 201 202 Name | Type | Description 203 ------------- | ------------- | ------------- 204 **Description** | **string** | A human readable description for the Subscription. 205 **SinkSid** | **string** | The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. 206 207 ### Return type 208 209 [**EventsV1Subscription**](EventsV1Subscription.md) 210 211 ### Authorization 212 213 [accountSid_authToken](../README.md#accountSid_authToken) 214 215 ### HTTP request headers 216 217 - **Content-Type**: application/x-www-form-urlencoded 218 - **Accept**: application/json 219 220 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 221 [[Back to Model list]](../README.md#documentation-for-models) 222 [[Back to README]](../README.md) 223