Path parameters
-
The SID of the Service to create the resource under.
Body
-
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.
-
The transport technology to use for the Binding. Can be:
apn
,fcm
,gcm
,sms
, orfacebook-messenger
.Values are
apn
,gcm
,sms
,fcm
,facebook-messenger
, oralexa
. -
CredentialSid string
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
, andgcm
type Bindings.Minimum length is
34
, maximum length is34
. Format should match the following pattern:^CR[0-9a-fA-F]{32}$
. -
Endpoint string
Deprecated.
-
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. The current version is"3"
forapn
,fcm
, andgcm
type Bindings. The parameter is not applicable tosms
andfacebook-messenger
type Bindings as the data format is fixed. -
Tag array[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.
curl \
-X POST https://notify.twilio.com/v1/Services/{ServiceSid}/Bindings \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'Address=string&BindingType=apn&CredentialSid=string&Endpoint=string&Identity=string&NotificationProtocolVersion=string&Tag=string'
{
"Address": "string",
"BindingType": "apn",
"CredentialSid": "string",
"Endpoint": "string",
"Identity": "string",
"NotificationProtocolVersion": "string",
"Tag": [
"string"
]
}
{
"Address": "string",
"BindingType": "apn",
"CredentialSid": "string",
"Endpoint": "string",
"Identity": "string",
"NotificationProtocolVersion": "string",
"Tag": [
"string"
]
}
{
"account_sid": "string",
"address": "string",
"binding_type": "string",
"credential_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"endpoint": "string",
"identity": "string",
"links": {},
"notification_protocol_version": "string",
"service_sid": "string",
"sid": "string",
"tags": [
"string"
],
"url": "https://example.com"
}
{
"account_sid": "string",
"address": "string",
"binding_type": "string",
"credential_sid": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"endpoint": "string",
"identity": "string",
"links": {},
"notification_protocol_version": "string",
"service_sid": "string",
"sid": "string",
"tags": [
"string"
],
"url": "https://example.com"
}