Send Push Notifications

This operation creates and sends out push notifications to the specified recipients.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <account_id:auth_token>.

OR
AuthorizationBasic

Basic authentication of the form Basic <api_key:api_key_secret>.

Request

This endpoint expects an object.
tolist of objectsRequired

A list of recipients to send the push notifications(s) to.

contentobjectRequired
The content of the Push Notification. - Use `PushNotificationContentBody` to construct content with body but no images. - Use `PushNotificationContentBodyWithImages` to construct content with body and images. - Use `PushNotificationContentImages` to construct content with images but no body. - Use `PushNotificationContentTemplate` to reference a stored `Content` template. *** * Use the [Liquid](https://shopify.github.io/liquid/) templating language for personalization in any text-based field. * When using a templated content, use the `variables` field on each recipient to specify the values to substitute. * For each variable you specify in your template, you should have a matching key in each recipient's `variables` object. * When targeting `Audience` or `Contact` recipients, you may specify `variables` with values that reference stored fields, including custom fields, on the `Contact` -- for example: `${Twilio.Contact.firstName}` or `${Twilio.Contact.myCustomField}`.
fromobjectOptional
The sender of the Push Notification(s). - Leave unspecified to automatically use the default `App`. - Use `PushNotificationCredentialSender` to specify `Credential(s)`' (one per provider) to be used for sending the Push Notification(s). - Use `PushNotificationAppSender` to specify the name of the `App` to be used for sending the Push Notification(s). - Use `SenderIdSender` or `SenderIdSender` to send the Push Notification(s) from a `Sender` or `Sender Pool`.
priorityenumOptionalDefaults to HIGH
The priority of the Push Notification. A value of "low" reduces the client app battery consumption. A value of "high" sends the notification immediately and can wake up a sleeping device.
Allowed values:
soundstring or nullOptional
The name of the sound to be played for the push notification.
scheduleobjectOptional

A schedule defines when a communication will be sent to a recipient.

Response headers

Locationstring or null

The location (uri) of the Operation resource. Issue a GET request to this URI to retrieve the status of the Operation.

Response

The request was accepted and an Operation was created to track its progress. The response body contains the ID and link to the Operation resource.
operationIdstringformat: "^comms_operation_[0-7][a-hjkmnpqrstv-z0-9]{25,34}"
The Operation ID is an identifier that can be used to correlate all of the resources created in a request. Issue a GET request to the resource list location, using the Operation ID as a query parameter to retrieve the resources that correlate with the Operation.
operationLocationstringformat: "uri"

The location (uri) of the Operation resource identified by operationId.

Errors