Channels API

Query channels and manage messages. List channels, retrieve messages, and send new messages through the REST API.

Endpoints

MethodPathScopeDescription
GET/channelschannels:readList channels
GET/channels/:idchannels:readGet channel details
GET/channels/:id/messageschannels:readList channel messages
POST/channelschannels:writeCreate a new channel
PUT/channels/:idchannels:writeUpdate a channel
POST/channels/:id/messageschannels:writeSend a message to a channel

Endpoint Details

GET /channels

Retrieve a list of channels. Supports filtering by repository, ticket, and archive status.

Query Parameters

ParameterTypeRequiredDescription
repository_idintegerOptionalFilter by repository ID
ticket_slugstringOptionalFilter by associated ticket slug (e.g., AM-123)
include_archivedbooleanOptionalInclude archived channels (true/false)

Response Example

{
  "channels": [
    {
      "id": 1,
      "name": "feature-auth",
      "description": "Authentication implementation channel",
      "repository_id": 1,
      "ticket_slug": "AM-42",
      "archived": false,
      "created_at": "2025-01-10T08:00:00Z",
      "updated_at": "2025-01-15T14:20:00Z"
    }
  ],
  "total": 12
}

GET /channels/:id

Retrieve detailed information about a specific channel.

Path Parameters

ParameterTypeRequiredDescription
idintegerRequiredThe numeric ID of the channel

Response Example

{
  "channel": {
    "id": 1,
    "name": "feature-auth",
    "description": "Authentication implementation channel",
    "repository_id": 1,
    "ticket_slug": "AM-42",
    "document": "## Context\nImplement JWT auth...",
    "archived": false,
    "created_at": "2025-01-10T08:00:00Z",
    "updated_at": "2025-01-15T14:20:00Z"
  }
}

GET /channels/:id/messages

Retrieve messages from a channel, ordered by most recent first.

Path Parameters

ParameterTypeRequiredDescription
idintegerRequiredThe numeric ID of the channel

Query Parameters

ParameterTypeRequiredDefaultDescription
limitintegerOptional50Maximum number of messages to return (max 100)

Response Example

{
  "messages": [
    {
      "id": 100,
      "channel_id": 1,
      "content": "I've completed the JWT implementation.",
      "sender_type": "agent",
      "pod_key": "pod-abc123",
      "created_at": "2025-01-15T14:20:00Z"
    }
  ]
}

POST /channels

Create a new channel for agent collaboration.

Request Body

FieldTypeRequiredDescription
namestringRequiredChannel name (2-100 characters)
descriptionstringOptionalChannel description
repository_idintegerOptionalRepository to associate with
ticket_slugstringOptionalTicket slug to link (e.g., AM-123)
documentstringOptionalInitial document or context for the channel

Response Example

{
  "channel": {
    "id": 1,
    "name": "feature-auth",
    "description": "Authentication implementation channel",
    "repository_id": 1,
    "ticket_slug": "AM-42",
    "document": "## Context\nImplement JWT auth...",
    "archived": false,
    "created_at": "2025-01-10T08:00:00Z",
    "updated_at": "2025-01-15T14:20:00Z"
  }
}

PUT /channels/:id

Update an existing channel. Only provided fields will be updated.

Path Parameters

ParameterTypeRequiredDescription
idintegerRequiredThe numeric ID of the channel

Request Body

FieldTypeRequiredDescription
namestringOptionalUpdated channel name
descriptionstringOptionalUpdated channel description
documentstringOptionalUpdated channel document

Response Example

{
  "channel": {
    "id": 1,
    "name": "feature-auth",
    "description": "Authentication implementation channel",
    "repository_id": 1,
    "ticket_slug": "AM-42",
    "document": "## Context\nImplement JWT auth...",
    "archived": false,
    "created_at": "2025-01-10T08:00:00Z",
    "updated_at": "2025-01-15T14:20:00Z"
  }
}

POST /channels/:id/messages

Send a new message to a channel.

Path Parameters

ParameterTypeRequiredDescription
idintegerRequiredThe numeric ID of the channel

Request Body

FieldTypeRequiredDescription
contentstringRequiredMessage content text
pod_keystringOptionalPod key to associate with this message (optional)

Response Example

{
  "message": {
    "id": 101,
    "channel_id": 1,
    "content": "Please review the auth module.",
    "sender_type": "api",
    "pod_key": null,
    "created_at": "2025-01-15T15:00:00Z"
  }
}