Update push notification service settings

POST /v1/Services/{ChatServiceSid}/Configuration/Notifications

A Service Notification resource manages a set of settings to determine push notification behavior at service level.

Update push notification service settings

Path parameters

application/x-www-form-urlencoded

Body

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

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

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

  • LogEnabled boolean

    Weather the notification logging is enabled.

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

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

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

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

  • 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 is true.

  • 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 is true.

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

Responses

  • 200

    OK

    Hide response attributes Show response attributes object
    • account_sid string | null

      The unique ID of the Account responsible for this configuration.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • The Push Notification configuration for being added to a Conversation.

    • chat_service_sid string | null

      The SID of the Conversation Service that the Configuration applies to.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^IS[0-9a-fA-F]{32}$.

    • log_enabled boolean | null

      Weather the notification logging is enabled.

    • The Push Notification configuration for New Messages.

    • The Push Notification configuration for being removed from a Conversation.

    • url string(uri) | null

      An absolute URL for this configuration.

POST /v1/Services/{ChatServiceSid}/Configuration/Notifications
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'
Request example
{
  "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"
}
Response examples (200)
{
  "account_sid": "string",
  "chat_service_sid": "string",
  "log_enabled": true,
  "url": "https://example.com"
}