curl -X POST "https://your-domain.com/api/channels/ch_abc123/update" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "announcements-updated",
"description": "Official company announcements"
}'
{
"id": "ch_abc123",
"user_id": "user_123",
"type": "standard",
"name": "announcements-updated",
"description": "Official company announcements",
"is_private": false,
"data": null,
"meta": null,
"access_grants": [
{
"principal_type": "user",
"principal_id": "*",
"permission": "read"
},
{
"principal_type": "role",
"principal_id": "admin",
"permission": "write"
}
],
"created_at": 1709500000000000000,
"updated_at": 1709567890123456789,
"updated_by": "user_123",
"archived_at": null,
"archived_by": null,
"deleted_at": null,
"deleted_by": null
}
Channels
Update Channel
Update channel settings and metadata
POST
/
api
/
channels
/
{id}
/
update
curl -X POST "https://your-domain.com/api/channels/ch_abc123/update" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "announcements-updated",
"description": "Official company announcements"
}'
{
"id": "ch_abc123",
"user_id": "user_123",
"type": "standard",
"name": "announcements-updated",
"description": "Official company announcements",
"is_private": false,
"data": null,
"meta": null,
"access_grants": [
{
"principal_type": "user",
"principal_id": "*",
"permission": "read"
},
{
"principal_type": "role",
"principal_id": "admin",
"permission": "write"
}
],
"created_at": 1709500000000000000,
"updated_at": 1709567890123456789,
"updated_by": "user_123",
"archived_at": null,
"archived_by": null,
"deleted_at": null,
"deleted_by": null
}
Updates a channel’s name, description, access controls, and other settings. Only the channel creator or admins can update channels.
Authentication
Requires a valid user session. User must be the channel creator or an admin.Path Parameters
The unique identifier of the channel to update
Request Body
Channel name
Channel description
Whether the channel is private (for group channels)
Additional channel data
Channel metadata
Array of group IDs to grant access to the channel
Array of user IDs to grant access to the channel
Response
Returns the updated channel object.Unique channel identifier
ID of the user who created the channel
Channel type
Channel name
Channel description
Whether the channel is private
Additional channel data
Channel metadata
Updated access control grants
Creation timestamp (epoch time in nanoseconds)
Updated timestamp (epoch time in nanoseconds)
ID of user who updated the channel
curl -X POST "https://your-domain.com/api/channels/ch_abc123/update" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "announcements-updated",
"description": "Official company announcements"
}'
{
"id": "ch_abc123",
"user_id": "user_123",
"type": "standard",
"name": "announcements-updated",
"description": "Official company announcements",
"is_private": false,
"data": null,
"meta": null,
"access_grants": [
{
"principal_type": "user",
"principal_id": "*",
"permission": "read"
},
{
"principal_type": "role",
"principal_id": "admin",
"permission": "write"
}
],
"created_at": 1709500000000000000,
"updated_at": 1709567890123456789,
"updated_by": "user_123",
"archived_at": null,
"archived_by": null,
"deleted_at": null,
"deleted_by": null
}
Notes
- Only the channel creator (
user_id) or admins can update channels - All fields in the request body are optional, but at least the
namefield should be provided - Updating access grants will replace the existing grants entirely
- The
updated_attimestamp andupdated_byfield are automatically updated
⌘I