github.com/twilio/twilio-go@v1.20.1/rest/notify/v1/docs/ServicesBindingsApi.md (about) 1 # ServicesBindingsApi 2 3 All URIs are relative to *https://notify.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateBinding**](ServicesBindingsApi.md#CreateBinding) | **Post** /v1/Services/{ServiceSid}/Bindings | 8 [**DeleteBinding**](ServicesBindingsApi.md#DeleteBinding) | **Delete** /v1/Services/{ServiceSid}/Bindings/{Sid} | 9 [**FetchBinding**](ServicesBindingsApi.md#FetchBinding) | **Get** /v1/Services/{ServiceSid}/Bindings/{Sid} | 10 [**ListBinding**](ServicesBindingsApi.md#ListBinding) | **Get** /v1/Services/{ServiceSid}/Bindings | 11 12 13 14 ## CreateBinding 15 16 > NotifyV1Binding CreateBinding(ctx, ServiceSidoptional) 17 18 19 20 21 22 ### Path Parameters 23 24 25 Name | Type | Description 26 ------------- | ------------- | ------------- 27 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 28 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to create the resource under. 29 30 ### Other Parameters 31 32 Other parameters are passed through a pointer to a CreateBindingParams struct 33 34 35 Name | Type | Description 36 ------------- | ------------- | ------------- 37 **Identity** | **string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Up to 20 Bindings can be created for the same Identity in a given Service. 38 **BindingType** | **string** | 39 **Address** | **string** | The channel-specific address. For APNS, the device token. For FCM and GCM, the registration token. For SMS, a phone number in E.164 format. For Facebook Messenger, the Messenger ID of the user or a phone number in E.164 format. 40 **Tag** | **[]string** | A tag that can be used to select the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 20 tags. 41 **NotificationProtocolVersion** | **string** | The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `\\\"3\\\"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed. 42 **CredentialSid** | **string** | The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) resource to be used to send notifications to this Binding. If present, this overrides the Credential specified in the Service resource. Applies to only `apn`, `fcm`, and `gcm` type Bindings. 43 **Endpoint** | **string** | Deprecated. 44 45 ### Return type 46 47 [**NotifyV1Binding**](NotifyV1Binding.md) 48 49 ### Authorization 50 51 [accountSid_authToken](../README.md#accountSid_authToken) 52 53 ### HTTP request headers 54 55 - **Content-Type**: application/x-www-form-urlencoded 56 - **Accept**: application/json 57 58 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 59 [[Back to Model list]](../README.md#documentation-for-models) 60 [[Back to README]](../README.md) 61 62 63 ## DeleteBinding 64 65 > DeleteBinding(ctx, ServiceSidSid) 66 67 68 69 70 71 ### Path Parameters 72 73 74 Name | Type | Description 75 ------------- | ------------- | ------------- 76 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 77 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to delete the resource from. 78 **Sid** | **string** | The Twilio-provided string that uniquely identifies the Binding resource to delete. 79 80 ### Other Parameters 81 82 Other parameters are passed through a pointer to a DeleteBindingParams struct 83 84 85 Name | Type | Description 86 ------------- | ------------- | ------------- 87 88 ### Return type 89 90 (empty response body) 91 92 ### Authorization 93 94 [accountSid_authToken](../README.md#accountSid_authToken) 95 96 ### HTTP request headers 97 98 - **Content-Type**: Not defined 99 - **Accept**: Not defined 100 101 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 102 [[Back to Model list]](../README.md#documentation-for-models) 103 [[Back to README]](../README.md) 104 105 106 ## FetchBinding 107 108 > NotifyV1Binding FetchBinding(ctx, ServiceSidSid) 109 110 111 112 113 114 ### Path Parameters 115 116 117 Name | Type | Description 118 ------------- | ------------- | ------------- 119 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 120 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to fetch the resource from. 121 **Sid** | **string** | The Twilio-provided string that uniquely identifies the Binding resource to fetch. 122 123 ### Other Parameters 124 125 Other parameters are passed through a pointer to a FetchBindingParams struct 126 127 128 Name | Type | Description 129 ------------- | ------------- | ------------- 130 131 ### Return type 132 133 [**NotifyV1Binding**](NotifyV1Binding.md) 134 135 ### Authorization 136 137 [accountSid_authToken](../README.md#accountSid_authToken) 138 139 ### HTTP request headers 140 141 - **Content-Type**: Not defined 142 - **Accept**: application/json 143 144 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 145 [[Back to Model list]](../README.md#documentation-for-models) 146 [[Back to README]](../README.md) 147 148 149 ## ListBinding 150 151 > []NotifyV1Binding ListBinding(ctx, ServiceSidoptional) 152 153 154 155 156 157 ### Path Parameters 158 159 160 Name | Type | Description 161 ------------- | ------------- | ------------- 162 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 163 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to read the resource from. 164 165 ### Other Parameters 166 167 Other parameters are passed through a pointer to a ListBindingParams struct 168 169 170 Name | Type | Description 171 ------------- | ------------- | ------------- 172 **StartDate** | **string** | Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. 173 **EndDate** | **string** | Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. 174 **Identity** | **[]string** | The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. 175 **Tag** | **[]string** | Only list Bindings that have all of the specified Tags. The following implicit tags are available: `all`, `apn`, `fcm`, `gcm`, `sms`, `facebook-messenger`. Up to 5 tags are allowed. 176 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 177 **Limit** | **int** | Max number of records to return. 178 179 ### Return type 180 181 [**[]NotifyV1Binding**](NotifyV1Binding.md) 182 183 ### Authorization 184 185 [accountSid_authToken](../README.md#accountSid_authToken) 186 187 ### HTTP request headers 188 189 - **Content-Type**: Not defined 190 - **Accept**: application/json 191 192 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 193 [[Back to Model list]](../README.md#documentation-for-models) 194 [[Back to README]](../README.md) 195