curl -X GET "https://your-domain.com/api/channels/ch_abc123" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
import requests
response = requests.get(
"https://your-domain.com/api/channels/ch_abc123",
headers={"Authorization": "Bearer YOUR_TOKEN"}
)
channel = response.json()
print(f"Channel: {channel['name']}")
print(f"Unread messages: {channel['unread_count']}")
print(f"Write access: {channel['write_access']}")
{
"id": "ch_abc123",
"user_id": "user_123",
"type": "group",
"name": "Engineering Team",
"description": "Team discussions",
"is_private": true,
"data": {},
"meta": {},
"access_grants": [],
"user_ids": ["user_123", "user_456", "user_789"],
"users": [
{
"id": "user_123",
"name": "Alice",
"is_active": true
},
{
"id": "user_456",
"name": "Bob",
"is_active": false
},
{
"id": "user_789",
"name": "Charlie",
"is_active": true
}
],
"is_manager": true,
"write_access": true,
"user_count": 3,
"last_read_at": 1709567890123456789,
"unread_count": 5,
"created_at": 1709500000000000000,
"updated_at": 1709567890123456789,
"updated_by": "user_456"
}
{
"id": "ch_general",
"user_id": "admin_123",
"type": "standard",
"name": "general",
"description": "General discussion",
"is_private": false,
"data": {},
"meta": {},
"access_grants": [
{
"principal_type": "user",
"principal_id": "*",
"permission": "read"
}
],
"user_ids": null,
"users": null,
"is_manager": false,
"write_access": true,
"user_count": 42,
"last_read_at": 1709567890123456789,
"unread_count": 0,
"created_at": 1709500000000000000,
"updated_at": 1709567890123456789,
"updated_by": "admin_123"
}
{
"detail": "Not found"
}
{
"detail": "ERROR"
}
Channels
Get Channel
Get detailed information about a specific channel
GET
/
api
/
channels
/
{id}
curl -X GET "https://your-domain.com/api/channels/ch_abc123" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
import requests
response = requests.get(
"https://your-domain.com/api/channels/ch_abc123",
headers={"Authorization": "Bearer YOUR_TOKEN"}
)
channel = response.json()
print(f"Channel: {channel['name']}")
print(f"Unread messages: {channel['unread_count']}")
print(f"Write access: {channel['write_access']}")
{
"id": "ch_abc123",
"user_id": "user_123",
"type": "group",
"name": "Engineering Team",
"description": "Team discussions",
"is_private": true,
"data": {},
"meta": {},
"access_grants": [],
"user_ids": ["user_123", "user_456", "user_789"],
"users": [
{
"id": "user_123",
"name": "Alice",
"is_active": true
},
{
"id": "user_456",
"name": "Bob",
"is_active": false
},
{
"id": "user_789",
"name": "Charlie",
"is_active": true
}
],
"is_manager": true,
"write_access": true,
"user_count": 3,
"last_read_at": 1709567890123456789,
"unread_count": 5,
"created_at": 1709500000000000000,
"updated_at": 1709567890123456789,
"updated_by": "user_456"
}
{
"id": "ch_general",
"user_id": "admin_123",
"type": "standard",
"name": "general",
"description": "General discussion",
"is_private": false,
"data": {},
"meta": {},
"access_grants": [
{
"principal_type": "user",
"principal_id": "*",
"permission": "read"
}
],
"user_ids": null,
"users": null,
"is_manager": false,
"write_access": true,
"user_count": 42,
"last_read_at": 1709567890123456789,
"unread_count": 0,
"created_at": 1709500000000000000,
"updated_at": 1709567890123456789,
"updated_by": "admin_123"
}
{
"detail": "Not found"
}
{
"detail": "ERROR"
}
Retrieves detailed information about a channel, including members, access control, and unread message counts.
Authentication
Requires a valid user session. User must have read access to the channel.Path Parameters
string
required
The unique identifier of the channel
Response
Returns a detailed channel object with user information and metadata.string
required
Unique channel identifier
string
required
ID of the user who created the channel
string
Channel type:
standard, group, or dmstring
required
Channel name
string
Channel description
boolean
Whether the channel is private
object
Additional channel data
object
Channel metadata
array
Access control grants for the channel
array
Array of member user IDs (for group/dm channels only)
array
boolean
required
Whether the current user is a manager of this channel
boolean
required
Whether the current user has write access to this channel
integer
Total number of users with access to the channel
integer
Timestamp when the current user last read messages (epoch time in nanoseconds)
integer
required
Number of unread messages for the current user
integer
required
Creation timestamp (epoch time in nanoseconds)
integer
required
Last update timestamp (epoch time in nanoseconds)
string
ID of user who last updated the channel
curl -X GET "https://your-domain.com/api/channels/ch_abc123" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
import requests
response = requests.get(
"https://your-domain.com/api/channels/ch_abc123",
headers={"Authorization": "Bearer YOUR_TOKEN"}
)
channel = response.json()
print(f"Channel: {channel['name']}")
print(f"Unread messages: {channel['unread_count']}")
print(f"Write access: {channel['write_access']}")
{
"id": "ch_abc123",
"user_id": "user_123",
"type": "group",
"name": "Engineering Team",
"description": "Team discussions",
"is_private": true,
"data": {},
"meta": {},
"access_grants": [],
"user_ids": ["user_123", "user_456", "user_789"],
"users": [
{
"id": "user_123",
"name": "Alice",
"is_active": true
},
{
"id": "user_456",
"name": "Bob",
"is_active": false
},
{
"id": "user_789",
"name": "Charlie",
"is_active": true
}
],
"is_manager": true,
"write_access": true,
"user_count": 3,
"last_read_at": 1709567890123456789,
"unread_count": 5,
"created_at": 1709500000000000000,
"updated_at": 1709567890123456789,
"updated_by": "user_456"
}
{
"id": "ch_general",
"user_id": "admin_123",
"type": "standard",
"name": "general",
"description": "General discussion",
"is_private": false,
"data": {},
"meta": {},
"access_grants": [
{
"principal_type": "user",
"principal_id": "*",
"permission": "read"
}
],
"user_ids": null,
"users": null,
"is_manager": false,
"write_access": true,
"user_count": 42,
"last_read_at": 1709567890123456789,
"unread_count": 0,
"created_at": 1709500000000000000,
"updated_at": 1709567890123456789,
"updated_by": "admin_123"
}
{
"detail": "Not found"
}
{
"detail": "ERROR"
}
Notes
- For
groupanddmchannels, the response includes theuser_idsandusersarrays with member information - For
standardchannels, these fields are null and theuser_countrepresents all users with read access - The
is_managerfield indicates if the current user can modify channel settings - The
write_accessfield indicates if the current user can post messages - Admins always have full access to all channels