NotifyV1Notification
post/v1/Services/{ServiceSid}/Notifications

Request

  • Base URL
    https://notify.twilio.com
  • URL
    https://notify.twilio.com/v1/Services/{ServiceSid}/Notifications
  • Auth
    HTTP basic

Path parameters

ServiceSidstring required

The SID of the Service to create the resource under.

Request body application/x-www-form-urlencoded

Bodystring

The notification text. For FCM and GCM, translates to data.twi_body. For APNS, translates to aps.alert.body. For SMS, translates to body. SMS requires either this body value, or media_urls attribute defined in the sms parameter of the notification.

Priority'high' | 'low'

The priority of the notification. Can be: low or high and the default is high. A value of low optimizes the client app's battery consumption; however, notifications may be delivered with unspecified delay. For FCM and GCM, low priority is the same as Normal priority. For APNS low priority is the same as 5. A value of high sends the notification immediately, and can wake up a sleeping device. For FCM and GCM, high is the same as High priority. For APNS, high is a priority 10. SMS does not support this property.

Ttlinteger

How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property.

Titlestring

The notification title. For FCM and GCM, this translates to the data.twi_title value. For APNS, this translates to the aps.alert.title value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices.

Soundstring

The name of the sound to be played for the notification. For FCM and GCM, this Translates to data.twi_sound. For APNS, this translates to aps.sound. SMS does not support this property.

Actionstring

The actions to display for the notification. For APNS, translates to the aps.category value. For GCM, translates to the data.twi_action value. For SMS, this parameter is not supported and is omitted from deliveries to those channels.

Dataunknown
Apnunknown
Gcmunknown
Smsunknown
FacebookMessengerunknown
Fcmunknown
Segmentstring[]

The Segment resource is deprecated. Use the tag parameter, instead.

Alexaunknown
ToBindingstring[]

The destination address specified as a JSON string. Multiple to_binding parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers.

DeliveryCallbackUrlstring

URL to send webhooks.

Identitystring[]

The identity value that uniquely identifies the new resource's User within the Service. Delivery will be attempted only to Bindings with an Identity in this list. No more than 20 items are allowed in this list.

Tagstring[]

A tag that selects the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 5 tags. The implicit tag all is available to notify all Bindings in a Service instance. Similarly, the implicit tags apn, fcm, gcm, sms and facebook-messenger are available to notify all Bindings in a specific channel.

Response

Created

sidstring nullable

The unique string that we created to identify the Notification resource.

account_sidstring nullable

The SID of the Account that created the Notification resource.

service_sidstring nullable

The SID of the Service the resource is associated with.

date_createdstring date-time nullable

The date and time in GMT when the resource was created specified in RFC 2822 format.

identitiesstring[] nullable

The list of identity values of the Users to notify. We will attempt to deliver notifications only to Bindings with an identity in this list.

tagsstring[] nullable

The tags that select the Bindings to notify. Notifications will be attempted only to Bindings that have all of the tags listed in this property.

segmentsstring[] nullable

The list of Segments to notify. The Segment resource is deprecated. Use the tags property, instead.

priority'high' | 'low'

The priority of the notification. Can be: low or high and the default is high. A value of low optimizes the client app's battery consumption; however, notifications may be delivered with unspecified delay. For FCM and GCM, low priority is the same as Normal priority. For APNS low priority is the same as 5. A value of high sends the notification immediately, and can wake up a sleeping device. For FCM and GCM, high is the same as High priority. For APNS, high is a priority 10. SMS does not support this property.

ttlinteger

How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property.

titlestring nullable

The notification title. For FCM and GCM, this translates to the data.twi_title value. For APNS, this translates to the aps.alert.title value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices.

bodystring nullable

The notification text. For FCM and GCM, translates to data.twi_body. For APNS, translates to aps.alert.body. For SMS, translates to body. SMS requires either this body value, or media_urls attribute defined in the sms parameter of the notification.

soundstring nullable

The name of the sound to be played for the notification. For FCM and GCM, this Translates to data.twi_sound. For APNS, this translates to aps.sound. SMS does not support this property.

actionstring nullable

The actions to display for the notification. For APNS, translates to the aps.category value. For GCM, translates to the data.twi_action value. For SMS, this parameter is not supported and is omitted from deliveries to those channels.

dataunknown
apnunknown
gcmunknown
fcmunknown
smsunknown
facebook_messengerunknown
alexaunknown

Changes

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • info

      the request property type was generalized from object to no type

    • info

      the request property type was generalized from object to no type

    • info

      the request property type was generalized from object to no type

    • info

      the request property type was generalized from object to no type

    • info

      the request property type was generalized from object to no type

    • info

      the request property type was generalized from object to no type

    • info

      the request property type was generalized from object to no type

    • breaking

      the request property type changed from no type to object

    • breaking

      the request property type changed from no type to object

    • breaking

      the request property type changed from no type to object

    • breaking

      the request property type changed from no type to object

    • breaking

      the request property type changed from no type to object

    • breaking

      the request property type changed from no type to object

    • breaking

      the request property type changed from no type to object

    • breaking

      the response's property type changed from no type to object for status

    • breaking

      the response's property type changed from no type to object for status

    • breaking

      the response's property type changed from no type to object for status

    • breaking

      the response's property type changed from no type to object for status

    • breaking

      the response's property type changed from no type to object for status

    • breaking

      the response's property type changed from no type to object for status

    • breaking

      the response's property type changed from no type to object for status