/ Platform API
Platform API
    Chat Platform API v3
    Chat Platform API
    Chat Platform API
    Version 3

    This page shows webhook events related to users within your Sendbird application.


    user:block

    Copy link

    This webhook event is invoked when a user blocks another user. The following shows a webhook payload of a user:block event.

    {
        "category": "user:block",
        "blocker": {
            "user_id": "Benjamin",
            "nickname": "Soulmate",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_30_512px.png",
            "metadata": {}
        },
        "blockee": {
            "user_id": "Matthew",
            "nickname": "GameStart",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_24_512px.png",
            "metadata": {}
        },
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    user:unblock

    Copy link

    This webhook event is invoked when a user unblocks another user. The following shows a webhook payload of a user:unblock event.

    {
        "category": "user:unblock",
        "unblocker": {
            "user_id": "Benjamin",
            "nickname": "Soulmate",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_30_512px.png",
            "metadata": {}
        },
        "unblockee": {
            "user_id": "Matthew",
            "nickname": "GameStart",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_24_512px.png",
            "metadata": {}
        },
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    user:push_preference

    Copy link

    This webhook event is invoked when a user's push notification preferences is updated. The following shows a webhook payload of a user:push_preference event.

    For further information, see the Update push notification preferences page.

    {
        "category": "user:push_preference",
        "user_id": "Jane",
        "do_not_disturb": true,
        "start_hour": 1,
        "start_min": 2,
        "end_hour": 3,
        "end_min": 4,
        "timezone": "Asia/Seoul",
        "push_sound": "default",
        "push_trigger_option": "all",
        "snooze_enabled": false,
        "snooze_start_ts": "",
        "snooze_end_ts": "",
        "block_push_from_bots": false,
        "push_blocked_bot_ids": [],
        "enable_push_for_replies": true,
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    user:push_channel_preference

    Copy link

    This webhook event is invoked when a user's notification preferences for a specific channel is updated. The following shows a webhook payload of a user:push_channel_preference event.

    For further information, see the Update push notification preferences for a channel page.

    {
        "category": "user:push_channel_preference",
        "user_id": "Jane",
        "channel_url": "channel_url_sample",
        "push_trigger_option": "mention_only",
        "push_sound": "whistle.swf"
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    user:device_token_register

    Copy link

    This webhook event is triggered when a user's device token for push notifications is registered with the Sendbird server. The webhook payload contains details about the user and the newly registered device token.

    For further information, see the Add a registration or device token page.

    {
      "app_id": "XXXX-XXXX-XXXX-XXXX-XXXX",
      "category": "user:device_token_register"
      "user": {
          "user_id": "jerry",
          "nickname": "Jerry",
          "profile_url": "https://sendbird.com/main/img/profiles/profile_30_512px.png",
          "metadata": {}
      },
      "device_tokens":[
        {
          "token": "gcm_token",
          "type": "GCM"
        }
      ],
    }
    

    user:device_token_unregister

    Copy link

    This webhook event occurs when a user's device token for push notifications is unregistered, meaning it will no longer receive push notifications. The webhook payload includes information about the user and the device token that has been unregistered.

    For further information, see the Remove a registration or device token from an owner page.

    {
      "app_id": "XXXX-XXXX-XXXX-XXXX-XXXX",
      "category": "device_token:unregister",
      "user":{
          "user_id": "jerry",
          "nickname": "Jerry",
          "profile_url": "https://sendbird.com/main/img/profiles/profile_30_512px.png",
          "metadata": {}
      },
      "device_tokens": [
        {
          "token": "gcm_token",
          "type": "GCM"
        },
        {
          "token": "apns_token",
          "type": "APNS",
        }
      ]
    }