Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Service Resource

A notification Service resource describes the push notification and messaging accounts that will send your notifications. With a notification Service resource defined, you can send Notifications to users with a Binding resource or by specifying the destination address or addresses.

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

Names in C# format
Sid
sid<IS> Not PII

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

AccountSid
sid<AC> Not PII

The SID of the Account that created the Service resource.

FriendlyName
string Not PII

The string that you assigned to describe the resource.

DateCreated
date_time<iso8601> Not PII

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

DateUpdated
date_time<iso8601> Not PII

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

ApnCredentialSid
sid<CR> Not PII

The SID of the Credential to use for APN Bindings.

GcmCredentialSid
sid<CR> Not PII

The SID of the Credential to use for GCM Bindings.

FcmCredentialSid
sid<CR> Not PII

The SID of the Credential to use for FCM Bindings.

MessagingServiceSid
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.

FacebookMessengerPageId
string Not PII

Deprecated.

DefaultApnNotificationProtocolVersion
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.

DefaultGcmNotificationProtocolVersion
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.

DefaultFcmNotificationProtocolVersion
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.

LogEnabled
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.

AlexaSkillId
string Not PII

Deprecated.

DefaultAlexaNotificationProtocolVersion
string Not PII

Deprecated.

Create a Service resource

post
https://notify.twilio.com/v1/Services
Parameters
Names in None 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.

Example
        
        
        
        

        Fetch a Service resource

        get
        https://notify.twilio.com/v1/Services/{Sid}
        Parameters
        Names in None format
        sid
        Required
        get sid<IS> Not PII

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

        Example
              
              
              
              

              Read multiple Service resources

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

              The string that identifies the Service resources to read.

              Example
                    
                    
                    
                    

                    Update a Service resource

                    post
                    https://notify.twilio.com/v1/Services/{Sid}
                    Parameters
                    Names in None format
                    sid
                    Required
                    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.

                    Example
                          
                          
                          
                          

                          Delete a Service resource

                          delete
                          https://notify.twilio.com/v1/Services/{Sid}
                          Parameters
                          Names in None format
                          sid
                          Required
                          delete sid<IS> Not PII

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

                          Example
                                
                                
                                
                                
                                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 browsing the Twilio tag on Stack Overflow.