Channels

Channel Fields

Field Type Description
acl object
Field Type Description
full object
Field Type Description
immutable boolean If full access is immutable.
you boolean If you have full access.
user_ids list A list of user IDs who have full access.
users list A list of user objects. Only included in some cases.
write object
Field Type Description
any_user boolean Whether any user can write to the channel
immutable boolean If write access is immutable.
you boolean If you have write access.
user_ids list A list of user IDs who have write access.
users list A list of user objects. Only included in some cases.
read object
Field Type Description
any_user boolean Whether any user can read the channel.
immutable boolean If read access is immutable.
public boolean If the channel can be read by unauthenticated access.
you boolean If you have read access.
user_ids list A list of user IDs who have read access.
users list A list of user objects. Only included in some cases.
counts object
Field Type Description
messages integer The number of messages in the channel.
subscribers integer Optional number of subscribers to the channel. Only included if the requesting user has full ACL access.
created_at string

The time at which the channel was created in ISO 8601 format; YYYY-MM-DDTHH:MM:SSZ.

Added at the end of 2020, in version 1.0.0. Channels from before then have it set to the earliest message in the channel.

has_sticky_messages boolean The channel contains sticky messages.
has_unread boolean Your stream marker is not updated to the latest message in the channel. Only included if the call is authenticated.
id string Primary identifier for a channel. This will be an integer, but it is always expressed as a string to avoid limitations with the way JavaScript integers are expressed. This id space is unique to Channel objects. There can be a Post and User with the same ID; no relation is implied.
is_active boolean Only included if false.
raw object The raw items attached to this object. Only included if query parameter specified.
Field Type Description
{type name} list A list of objects of this type.
recent_deleted_message object Optional embedded Message object of the recent_deleted_message_id.
recent_deleted_message_id string Optional ID of the most recent message that has been deleted in the channel. Only present if the most recent message in a channel is a deleted message.
recent_message object Optional embedded Message object of the recent_message_id.
recent_message_id string Optional ID of the most recent message in the channel. Ignores deleted messages. Not included if no message has been created yet or only deleted messages in the channel
type string The type of channel. Generally uses a reversed domain name to identify the intended purpose. None-core channel types (io.pnut.core.*) are not authenticated by the server; clients should not assume other clients created a custom channel type the same way
you_muted boolean You muted subscriptions to the channel. Only set on authenticated calls
you_subscribed boolean Whether or not you subscribe to the channel. Only set on authenticated calls
user object This is an embedded object of the User that owns the channel. In certain cases (e.g., when a user account has been deleted), this key may be omitted. In that case, user_id will still be included. Private messages are an exception
user_id string Primary identifier for the user who created the channel. This is only included if the user above is omitted

General Channel Parameters

Any endpoint that returns channel objects can be subject to these parameters.

General Parameters

Name Type Description
include_read integer (0 or 1) Include channels that do not have unread messages. Defaults to true.
channel_types string Comma-separated list of channel types to retrieve. If not included, will return any channels the app is authorized to view.
exclude_channel_types string Comma-separated list of channel types not to retrieve. If channel_types is set, this is ignored.
include_marker integer (0 or 1) Include a stream marker. Defaults to true except on GET /channels/{channel_id}
include_inactive integer (0 or 1) Include inactive channels. Defaults to false.
include_raw integer (0 or 1) Include raw on all objects. Defaults to false.
include_channel_raw integer (0 or 1) Include raw on all channel objects. Defaults to false.
include_recent_message integer (0 or 1) Include the most recent message in the channel (and the recent deleted message, if the most recent message was deleted). Defaults to false.
include_limited_users integer (0 or 1) Include limited user objects in the ACL. Only on /users/me/channels/subscribed and /channels/{channel_id}. User objects include username, id, name (if set), avatar_image (as URL only), and presence (if not offline). Defaults to false.