Menu

Expand
Rate this page:

Notify Service Resource

We are no longer allowing customers to onboard to Notify. We intend to deprecate the Notify product on April 25, 2024. Learn more in our Notify API End of Life Notice. We prepared this Transition Guide to assist in supporting your push notification use cases.

A Service is the top-level scope of all other resources in Notify REST API.

You can create up to 10 Service resources per account and you can use them to:

  • Create separate operational environments, such as dev, stage, and prod, all using the same Twilio account.
  • Scope access to resources used by the Notify REST API
  • Configure different behaviors of a push-notification or messaging service.

If you need more than 10 Service resources for your account, please contact support.

Service properties

Resource Properties in REST API format
sid
sid<IS> Not PII

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

account_sid
sid<AC> Not PII

The SID of the Account that created the Service resource.

friendly_name
string Not PII

The string that you assigned to describe the resource.

date_created
date_time<iso8601> Not PII

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

date_updated
date_time<iso8601> Not PII

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

apn_credential_sid
sid<CR> Not PII

The SID of the Credential to use for APN Bindings.

gcm_credential_sid
sid<CR> Not PII

The SID of the Credential to use for GCM Bindings.

fcm_credential_sid
sid<CR> Not PII

The SID of the Credential to use for FCM Bindings.

messaging_service_sid
sid<MG> Not PII

The SID of the Messaging Service to use for SMS Bindings. In order to send SMS notifications this parameter has to be set.

facebook_messenger_page_id
string Not PII

Deprecated.

default_apn_notification_protocol_version
string Not PII

The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

default_gcm_notification_protocol_version
string Not PII

The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

default_fcm_notification_protocol_version
string Not PII

The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

log_enabled
boolean Not PII

Whether to log notifications. Can be: true or false and the default is true.

url
url Not PII

The absolute URL of the Service resource.

links
uri_map Not PII

The URLs of the Binding, Notification, Segment, and User resources related to the service.

alexa_skill_id
string Not PII

Deprecated.

default_alexa_notification_protocol_version
string Not PII

Deprecated.

delivery_callback_url
string Not PII

URL to send delivery status callback.

delivery_callback_enabled
boolean Not PII

Callback configuration that enables delivery callbacks, default false

Create a Service resource

post
https://notify.twilio.com/v1/Services
Parameters
Parameters in REST API format
friendly_name
Optional
post string Not PII

A descriptive string that you create to describe the resource. It can be up to 64 characters long.

apn_credential_sid
Optional
post sid<CR> Not PII

The SID of the Credential to use for APN Bindings.

gcm_credential_sid
Optional
post sid<CR> Not PII

The SID of the Credential to use for GCM Bindings.

messaging_service_sid
Optional
post sid<MG> Not PII

The SID of the Messaging Service to use for SMS Bindings. This parameter must be set in order to send SMS notifications.

facebook_messenger_page_id
Optional
post string Not PII

Deprecated.

default_apn_notification_protocol_version
Optional
post string Not PII

The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

default_gcm_notification_protocol_version
Optional
post string Not PII

The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

fcm_credential_sid
Optional
post sid<CR> Not PII

The SID of the Credential to use for FCM Bindings.

default_fcm_notification_protocol_version
Optional
post string Not PII

The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

log_enabled
Optional
post boolean Not PII

Whether to log notifications. Can be: true or false and the default is true.

alexa_skill_id
Optional
post string Not PII

Deprecated.

default_alexa_notification_protocol_version
Optional
post string Not PII

Deprecated.

delivery_callback_url
Optional
post string Not PII

URL to send delivery status callback.

delivery_callback_enabled
Optional
post boolean Not PII

Callback configuration that enables delivery callbacks, default false

Example 1
Loading Code Sample...
        
        

        Create a Service resource

        Fetch a Service resource

        get
        https://notify.twilio.com/v1/Services/{Sid}
        Parameters
        Parameters in REST API format
        sid
        Path
        get sid<IS> Not PII

        The Twilio-provided string that uniquely identifies the Service resource to fetch.

        Example 1
        Loading Code Sample...
              
              

              Fetch a Service resource

              Read multiple Service resources

              get
              https://notify.twilio.com/v1/Services
              Parameters
              Parameters in REST API format
              friendly_name
              Optional
              get string Not PII

              The string that identifies the Service resources to read.

              Example 1
              Loading Code Sample...
                    
                    

                    Read multiple Service resources

                    Update a Service resource

                    post
                    https://notify.twilio.com/v1/Services/{Sid}
                    Parameters
                    Parameters in REST API format
                    sid
                    Path
                    post sid<IS> Not PII

                    The Twilio-provided string that uniquely identifies the Service resource to update.

                    friendly_name
                    Optional
                    post string Not PII

                    A descriptive string that you create to describe the resource. It can be up to 64 characters long.

                    apn_credential_sid
                    Optional
                    post sid<CR> Not PII

                    The SID of the Credential to use for APN Bindings.

                    gcm_credential_sid
                    Optional
                    post sid<CR> Not PII

                    The SID of the Credential to use for GCM Bindings.

                    messaging_service_sid
                    Optional
                    post sid<MG> Not PII

                    The SID of the Messaging Service to use for SMS Bindings. This parameter must be set in order to send SMS notifications.

                    facebook_messenger_page_id
                    Optional
                    post string Not PII

                    Deprecated.

                    default_apn_notification_protocol_version
                    Optional
                    post string Not PII

                    The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

                    default_gcm_notification_protocol_version
                    Optional
                    post string Not PII

                    The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

                    fcm_credential_sid
                    Optional
                    post sid<CR> Not PII

                    The SID of the Credential to use for FCM Bindings.

                    default_fcm_notification_protocol_version
                    Optional
                    post string Not PII

                    The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

                    log_enabled
                    Optional
                    post boolean Not PII

                    Whether to log notifications. Can be: true or false and the default is true.

                    alexa_skill_id
                    Optional
                    post string Not PII

                    Deprecated.

                    default_alexa_notification_protocol_version
                    Optional
                    post string Not PII

                    Deprecated.

                    delivery_callback_url
                    Optional
                    post string Not PII

                    URL to send delivery status callback.

                    delivery_callback_enabled
                    Optional
                    post boolean Not PII

                    Callback configuration that enables delivery callbacks, default false

                    Example 1
                    Loading Code Sample...
                          
                          

                          Update a Service resource

                          Delete a Service resource

                          delete
                          https://notify.twilio.com/v1/Services/{Sid}
                          Parameters
                          Parameters in REST API format
                          sid
                          Path
                          delete sid<IS> Not PII

                          The Twilio-provided string that uniquely identifies the Service resource to delete.

                          Example 1
                          Loading Code Sample...
                                
                                

                                Delete a Service resource

                                Rate this page:

                                Need some help?

                                We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                                Loading Code Sample...
                                      
                                      
                                      

                                      Thank you for your feedback!

                                      Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                      Sending your feedback...
                                      🎉 Thank you for your feedback!
                                      Something went wrong. Please try again.

                                      Thanks for your feedback!

                                      thanks-feedback-gif