Menu

Expand
Rate this page:

Service-Scoped Notification Resource

The Twilio Conversations Service Notification resource manages a set of settings to determine push notification Service Binding behavior for a specific Conversation Service.

API Base URL

All URLs in the reference documentation use the following base URL:

https://conversations.twilio.com/v1

For Conversations applications that build on more than one Conversation Service instance, you will need to specify the Conversation Service SID in the REST API call:

GET /v1/Services/ISxx/Conversations/CHxx/Messages

ServiceNotification properties

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The unique ID of the Account responsible for this configuration.

chat_service_sid
sid<IS> Not PII

The SID of the Conversation Service the Configuration applies to.

new_message
object Not PII

The Push Notification configuration for New Messages.

added_to_conversation
object Not PII

The Push Notification configuration for being added to a Conversation.

removed_from_conversation
object Not PII

The Push Notification configuration for being removed from a Conversation.

log_enabled
boolean Not PII

Weather the notification logging is enabled.

url
url Not PII

An absolute API resource URL for this configuration.

Fetch a ServiceNotification resource

get
https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Configuration/Notifications
Parameters
Parameters in REST API format
chat_service_sid
Path
get sid<IS> Not PII

The SID of the Conversation Service the Configuration applies to.

Example 1
Loading Code Sample...
        
        

        Fetch Notification

        Update a ServiceNotification resource

        post
        https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Configuration/Notifications
        Parameters
        Parameters in REST API format
        chat_service_sid
        Path
        post sid<IS> Not PII

        The SID of the Conversation Service the Configuration applies to.

        log_enabled
        Optional
        post boolean Not PII

        Weather the notification logging is enabled.

        new_message.enabled
        Optional
        post boolean Not PII

        Whether to send a notification when a new message is added to a conversation. The default is false.

        new_message.template
        Optional
        post string Not PII

        The template to use to create the notification text displayed when a new message is added to a conversation and new_message.enabled is true.

        new_message.sound
        Optional
        post string Not PII

        The name of the sound to play when a new message is added to a conversation and new_message.enabled is true.

        new_message.badge_count_enabled
        Optional
        post boolean Not PII

        Whether the new message badge is enabled. The default is false.

        added_to_conversation.enabled
        Optional
        post boolean Not PII

        Whether to send a notification when a participant is added to a conversation. The default is false.

        added_to_conversation.template
        Optional
        post string Not PII

        The template to use to create the notification text displayed when a participant is added to a conversation and added_to_conversation.enabled is true.

        added_to_conversation.sound
        Optional
        post string Not PII

        The name of the sound to play when a participant is added to a conversation and added_to_conversation.enabled is true.

        removed_from_conversation.enabled
        Optional
        post boolean Not PII

        Whether to send a notification to a user when they are removed from a conversation. The default is false.

        removed_from_conversation.template
        Optional
        post string Not PII

        The template to use to create the notification text displayed to a user when they are removed from a conversation and removed_from_conversation.enabled is true.

        removed_from_conversation.sound
        Optional
        post string Not PII

        The name of the sound to play to a user when they are removed from a conversation and removed_from_conversation.enabled is true.

        new_message.with_media.enabled
        Optional
        post boolean Not PII

        Whether to send a notification when a new message with media/file attachments is added to a conversation. The default is false.

        new_message.with_media.template
        Optional
        post string Not PII

        The template to use to create the notification text displayed when a new message with media/file attachments is added to a conversation and new_message.attachments.enabled is true.

        Example 1
        Loading Code Sample...
              
              

              Update Notification

              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