Skip to main content
POST
/
api
/
v3
/
notification
/
setting
Save push notification setting.
curl --request POST \
  --url https://apix.us.amity.co/api/v3/notification/setting \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "level": "user",
  "isPushNotifiable": true,
  "channelId": "<string>",
  "communityId": "<string>",
  "notifiableEvents": [
    {
      "name": "channel.created",
      "moduleName": "chat",
      "isPushNotifiable": true,
      "titleTemplate": "<string>",
      "bodyTemplate": "<string>",
      "listenFromRoleIds": [
        "<string>"
      ],
      "ignoreFromRoleIds": [
        "<string>"
      ]
    }
  ]
}'
{
  "status": "success"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Notification setting information to be updated

level
enum<string>
required

level:

  • user - need to specific modules via notifiableEvents.
  • channel - need to specific channelId.
  • community - need to specific communityId and community event via notifiableEvents.
Available options:
user,
channel,
community
isPushNotifiable
boolean
channelId
string
Required string length: 1 - 900
communityId
string
Required string length: 1 - 900
notifiableEvents
object[]
Required array length: 1 - 7 elements

Response

save information

status
string