Skip to main content
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

id
string
required
The unique identifier of the channel to update

Request Body

name
string
required
Channel name
description
string
Channel description
is_private
boolean
Whether the channel is private (for group channels)
data
object
Additional channel data
meta
object
Channel metadata
access_grants
array
Access control grants for the channel
group_ids
array
Array of group IDs to grant access to the channel
user_ids
array
Array of user IDs to grant access to the channel

Response

Returns the updated channel object.
id
string
required
Unique channel identifier
user_id
string
required
ID of the user who created the channel
type
string
Channel type
name
string
required
Channel name
description
string
Channel description
is_private
boolean
Whether the channel is private
data
object
Additional channel data
meta
object
Channel metadata
access_grants
array
Updated access control grants
created_at
integer
required
Creation timestamp (epoch time in nanoseconds)
updated_at
integer
required
Updated timestamp (epoch time in nanoseconds)
updated_by
string
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 name field should be provided
  • Updating access grants will replace the existing grants entirely
  • The updated_at timestamp and updated_by field are automatically updated