Channel Muting

Get current user’s muted Channels

Retrieve a list of the channels the current user has muted. A user cannot be auto-subscribed to muted channels.

This endpoint is not paginated and does not respond to the general channel parameters.

Endpoint

Method URL Token Scope
GET https://api.app.net/users/me/channels/muted User public_messages or messages

Example

to see more complete examples.

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/users/me/channels/muted"
{
  "data": [
    {
      "counts": {
        "messages": 42,
        "subscribers": 43
      },
      "has_unread": false,
      "id": "1",
      "owner": "...user object...",
      "is_inactive": false,
      "readers": {
        "any_user": false,
        "immutable": false,
        "public": true,
        "user_ids": [

        ],
        "you": true
      },
      "editors": {
        "any_user": false,
        "immutable": false,
        "public": false,
        "user_ids": [

        ],
        "you": true
      },
      "recent_message_id": "231",
      "recent_message": "...message object...",
      "type": "com.example.channel",
      "writers": {
        "any_user": false,
        "immutable": false,
        "public": false,
        "user_ids": [

        ],
        "you": true
      },
      "you_can_edit": true,
      "you_subscribed": true,
      "you_muted": true
    }
  ],
  "meta": {
    "code": 200
  }
}

Mute a Channel

Mute a Channel. If a user doesn’t want to see a channel until there is a new message, they should unsubscribe from the channel instead of muting it. If a user mutes a channel, they will automatically be unsubscribed from it and cannot be auto-subscribed to it.

This endpoint responds to general Channel parameters.

Endpoint

Method URL Token Scope
POST https://api.app.net/channels/{channel_id}/mute User public_messages or messages

URL Parameters

Name Description
channel_id The id of the Channel to mute.

Example

to see more complete examples.

curl -X POST -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/channels/1/mute"
{
  "data": {
    "counts": {
      "messages": 42,
      "subscribers": 43
    },
    "has_unread": false,
    "id": "1",
    "owner": "...user object...",
    "is_inactive": false,
    "readers": {
      "any_user": false,
      "immutable": false,
      "public": true,
      "user_ids": [

      ],
      "you": true
    },
    "editors": {
      "any_user": false,
      "immutable": false,
      "public": false,
      "user_ids": [

      ],
      "you": true
    },
    "recent_message_id": "231",
    "recent_message": "...message object...",
    "type": "com.example.channel",
    "writers": {
      "any_user": false,
      "immutable": false,
      "public": false,
      "user_ids": [

      ],
      "you": true
    },
    "you_can_edit": true,
    "you_subscribed": false,
    "you_muted": true
  },
  "meta": {
    "code": 200
  }
}

Unmute a Channel

Unmute a Channel. This allows you to be resubscribed to the channel (but it does not happen automatically).

This endpoint responds to general Channel parameters.

Endpoint

Method URL Token Scope
DELETE https://api.app.net/channels/{channel_id}/mute User public_messages or messages

URL Parameters

Name Description
channel_id The id of the Channel to unmute.

Example

to see more complete examples.

curl -X DELETE -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/channels/1/mute"
{
  "data": {
    "counts": {
      "messages": 42,
      "subscribers": 43
    },
    "has_unread": false,
    "id": "1",
    "owner": "...user object...",
    "is_inactive": false,
    "readers": {
      "any_user": false,
      "immutable": false,
      "public": true,
      "user_ids": [

      ],
      "you": true
    },
    "editors": {
      "any_user": false,
      "immutable": false,
      "public": false,
      "user_ids": [

      ],
      "you": true
    },
    "recent_message_id": "231",
    "recent_message": "...message object...",
    "type": "com.example.channel",
    "writers": {
      "any_user": false,
      "immutable": false,
      "public": false,
      "user_ids": [

      ],
      "you": true
    },
    "you_can_edit": true,
    "you_subscribed": false,
    "you_muted": false
  },
  "meta": {
    "code": 200
  }
}