Channels

Object

Use live API calls for an example of the object.

Fields

Field Type Description
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.
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 their channel types the same way.
owner object This is an embedded User object. Note: In certain cases (e.g., when a user account has been deleted), this key may be omitted.
recent_message_id string Optional ID of the most recent message in the channel. Not included if no message has been created yet.
recent_message object Optional embedded Message object.
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. (or a list of objects, in certain 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. (or a list of objects, in certain 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. (or a list of objects, in certain 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.
you_subscribed boolean Whether or not you subscribe to the channel.
you_muted boolean You muted subscriptions to the channel.
has_unread boolean Your stream marker is not updated to the latest message in the channel.

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. Defaults to false.
include_limited_users integer (0 or 1) Include limited user objects instead of user IDs 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.