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 PHP format
sid
sid<IS> Not PII

accountSid
sid<AC> Not PII

friendlyName
string Not PII

Human-readable name for this service instance

dateCreated
date_time<iso8601> Not PII

dateUpdated
date_time<iso8601> Not PII

apnCredentialSid
sid<CR> Not PII

The SID of the Credential to be used for APN Bindings.

gcmCredentialSid
sid<CR> Not PII

The SID of the Credential to be used for GCM Bindings.

fcmCredentialSid
sid<CR> Not PII

The SID of the Credential to be used for FCM Bindings.

messagingServiceSid
sid<MG> Not PII

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

facebookMessengerPageId
string Not PII

The Page ID to be used to send for Facebook Messenger Bindings. It has to match the Page ID you configured when you enabled Facebook Messaging on your account.

defaultApnNotificationProtocolVersion
string Not PII

The version of the protocol to be used for sending APNS notifications. Can be overriden on a Binding by Binding basis when creating a Binding resource.

defaultGcmNotificationProtocolVersion
string Not PII

The version of the protocol to be used for sending GCM notifications. Can be overriden on a Binding by Binding basis when creating a Binding resource.

defaultFcmNotificationProtocolVersion
string Not PII

The version of the protocol to be used for sending FCM notifications. Can be overriden on a Binding by Binding basis when creating a Binding resource.

logEnabled
boolean Not PII

url
url Not PII

links
uri_map Not PII

alexaSkillId
string Not PII

defaultAlexaNotificationProtocolVersion
string Not PII

Create a Service resource

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

Human-readable name for this service instance

apn_credential_sid
Optional
post sid<CR> Not PII

The SID of the Credential to be used for APN Bindings.

gcm_credential_sid
Optional
post sid<CR> Not PII

The SID of the Credential to be used for GCM Bindings.

messaging_service_sid
Optional
post sid<MG> Not PII

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

facebook_messenger_page_id
Optional
post string Not PII

The Page ID to be used to send for Facebook Messenger Bindings. It has to match the Page ID you configured when you enabled Facebook Messaging on your account.

default_apn_notification_protocol_version
Optional
post string Not PII

The version of the protocol to be used for sending APNS notifications. Can be overriden on a Binding by Binding basis when creating a Binding resource.

default_gcm_notification_protocol_version
Optional
post string Not PII

The version of the protocol to be used for sending GCM notifications. Can be overriden 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 be used for FCM Bindings.

default_fcm_notification_protocol_version
Optional
post string Not PII

The version of the protocol to be used for sending FCM notifications. Can be overriden on a Binding by Binding basis when creating a Binding resource.

Example
        
        
        
        

        Fetch a Service resource

        get
        https://notify.twilio.com/v1/Services/{Sid}
        Example
              
              
              
              

              Read multiple Service resources

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

              Filter services by FriendlyName

              Example
                    
                    
                    
                    

                    Update a Service resource

                    post
                    https://notify.twilio.com/v1/Services/{Sid}
                    Parameters
                    Names in None format
                    friendly_name
                    Optional
                    post string Not PII

                    Human-readable name for this service instance

                    apn_credential_sid
                    Optional
                    post sid<CR> Not PII

                    The SID of the default Credential to be used for APN Bindings

                    gcm_credential_sid
                    Optional
                    post sid<CR> Not PII

                    The SID of the default Credential to be used for GCM Bindings

                    messaging_service_sid
                    Optional
                    post sid<MG> Not PII

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

                    facebook_messenger_page_id
                    Optional
                    post string Not PII

                    The Page ID to be used to send for Facebook Messenger Bindings. It has to match the Page ID you configured when you enabled Facebook Messaging on your account. Facebook Messenger integration is in beta. You need to be in the beta program to be able to enable Facebook Messaging for your account.

                    default_apn_notification_protocol_version
                    Optional
                    post string Not PII

                    The version of the protocol to be used for sending APNS notifications. Can be overriden on a Binding by Binding basis when creating a Binding resource.

                    default_gcm_notification_protocol_version
                    Optional
                    post string Not PII

                    The version of the protocol to be used for sending GCM notifications. Can be overriden on a Binding by Binding basis when creating a Binding resource.

                    fcm_credential_sid
                    Optional
                    post sid<CR> Not PII

                    The SID of the default Credential to be used for FCM Bindings

                    default_fcm_notification_protocol_version
                    Optional
                    post string Not PII

                    The version of the protocol to be used for sending FCM notifications. Can be overriden on a Binding by Binding basis when creating a Binding resource.

                    Example
                          
                          
                          
                          

                          Delete a Service resource

                          delete
                          https://notify.twilio.com/v1/Services/{Sid}
                          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.