Update push notification service settings
A Service Notification resource manages a set of settings to determine push notification behavior at service level.
Update push notification service settings
Path parameters
-
The SID of the Conversation Service the Configuration applies to.
Body
-
AddedToConversation.Enabled boolean
Whether to send a notification when a participant is added to a conversation. The default is
false
. -
AddedToConversation.Sound string
The name of the sound to play when a participant is added to a conversation and
added_to_conversation.enabled
istrue
. -
AddedToConversation.Template string
The template to use to create the notification text displayed when a participant is added to a conversation and
added_to_conversation.enabled
istrue
. -
LogEnabled boolean
Weather the notification logging is enabled.
-
NewMessage.BadgeCountEnabled boolean
Whether the new message badge is enabled. The default is
false
. -
NewMessage.Enabled boolean
Whether to send a notification when a new message is added to a conversation. The default is
false
. -
NewMessage.Sound string
The name of the sound to play when a new message is added to a conversation and
new_message.enabled
istrue
. -
NewMessage.Template string
The template to use to create the notification text displayed when a new message is added to a conversation and
new_message.enabled
istrue
. -
NewMessage.WithMedia.Enabled boolean
Whether to send a notification when a new message with media/file attachments is added to a conversation. The default is
false
. -
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
istrue
. -
RemovedFromConversation.Enabled boolean
Whether to send a notification to a user when they are removed from a conversation. The default is
false
. -
The name of the sound to play to a user when they are removed from a conversation and
removed_from_conversation.enabled
istrue
. -
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
istrue
.
curl \
-X POST https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Configuration/Notifications \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'AddedToConversation.Enabled=true&AddedToConversation.Sound=string&AddedToConversation.Template=string&LogEnabled=true&NewMessage.BadgeCountEnabled=true&NewMessage.Enabled=true&NewMessage.Sound=string&NewMessage.Template=string&NewMessage.WithMedia.Enabled=true&NewMessage.WithMedia.Template=string&RemovedFromConversation.Enabled=true&RemovedFromConversation.Sound=string&RemovedFromConversation.Template=string'
{
"AddedToConversation.Enabled": true,
"AddedToConversation.Sound": "string",
"AddedToConversation.Template": "string",
"LogEnabled": true,
"NewMessage.BadgeCountEnabled": true,
"NewMessage.Enabled": true,
"NewMessage.Sound": "string",
"NewMessage.Template": "string",
"NewMessage.WithMedia.Enabled": true,
"NewMessage.WithMedia.Template": "string",
"RemovedFromConversation.Enabled": true,
"RemovedFromConversation.Sound": "string",
"RemovedFromConversation.Template": "string"
}
{
"AddedToConversation.Enabled": true,
"AddedToConversation.Sound": "string",
"AddedToConversation.Template": "string",
"LogEnabled": true,
"NewMessage.BadgeCountEnabled": true,
"NewMessage.Enabled": true,
"NewMessage.Sound": "string",
"NewMessage.Template": "string",
"NewMessage.WithMedia.Enabled": true,
"NewMessage.WithMedia.Template": "string",
"RemovedFromConversation.Enabled": true,
"RemovedFromConversation.Sound": "string",
"RemovedFromConversation.Template": "string"
}
{
"account_sid": "string",
"chat_service_sid": "string",
"log_enabled": true,
"url": "https://example.com"
}
{
"account_sid": "string",
"chat_service_sid": "string",
"log_enabled": true,
"url": "https://example.com"
}