Create Binding
Authorization
accountSid_authToken In: header
Path Parameters
The SID of the Service to create the resource under.
^IS[0-9a-fA-F]{32}$34 <= length <= 34Request Body
application/x-www-form-urlencoded
The transport technology to use for the Binding. Can be: apn, fcm, gcm, sms, or facebook-messenger.
Value in
- "apn"
- "gcm"
- "sms"
- "fcm"
- "facebook-messenger"
- "alexa"
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.
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.
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. 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.
The SID of the Credential 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.
^CR[0-9a-fA-F]{32}$34 <= length <= 34Deprecated.
Response Body
application/json
curl -X POST "https://example.com/v1/Services/stringstringstringstringstringstri/Bindings" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'Address=address&BindingType=apn&CredentialSid=CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Endpoint=endpoint&Identity=24987039&NotificationProtocolVersion=notification_protocol_version&Tag=tag'{ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "address": "a7c658f4111ec4ff5a1a647f9d0edd819025b9f20522d2fae897049f32873e73", "binding_type": "apn", "credential_sid": null, "date_created": "2015-07-30T20:00:00Z", "date_updated": "2015-07-30T20:00:00Z", "endpoint": "26607274", "identity": "24987039", "notification_protocol_version": "3", "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "tags": [ "26607274" ], "links": { "user": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/24987039" }, "url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings/BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}