Create and Manage Channels

A channel is a logical container for the watchers, events, and operations that belong to one application or environment. Most teams create a channel per application (and per environment within that application).

This guide covers the four channel-management operations exposed by the SDK and the Channels page in the CRE Connect UI: create, list/filter, update, and archive.

Create a channel

The fastest way to create a channel is through the Platform UI.

  1. Navigate to app.chain.link/cre-connect/channels.
  2. Click the Create channel button in the top-right corner.
  3. Enter a unique name and an optional description.
  4. Click Create channel.

The new channel appears in the list with status active.

Use the SDK or POST /channels directly.

Go SDK

ch, err := client.Channels.Create(ctx, channels.CreateInput{
    Name:        "my-app-prod",
    Description: ptr("Production channel for My App"),
})
if err != nil {
    return fmt.Errorf("create channel: %w", err)
}
fmt.Println(ch.ChannelId, ch.Status) // -> <uuid> active

curl

curl -sS -X POST "$CREC_BASE_URL/channels" \
  -H "Authorization: Apikey $CREC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"my-app-prod","description":"Production channel for My App"}'

The SDK validates locally that:

  • Name is non-empty (channels.ErrChannelNameRequired).
  • NameMaxChannelNameLength (channels.ErrChannelNameTooLong).

The server returns the created channel with HTTP 201.

List and filter channels

The Channels page lists every channel in your tenant. Use the Search field to filter by name and the Status dropdown to include archived channels (hidden by default).

Go SDK

limit := 50
list, hasMore, err := client.Channels.List(ctx, channels.ListInput{
    Name:  ptr("my-app"),
    Limit: &limit,
})
if err != nil {
    return err
}
for _, c := range list {
    fmt.Println(c.ChannelId, c.Name, c.Status)
}

curl

curl -sS "$CREC_BASE_URL/channels?name=my-app&limit=50" \
  -H "Authorization: Apikey $CREC_API_KEY"

Filters supported by ListInput:

FieldNotes
NamePartial-match search on channel name.
StatusSlice of apiClient.ChannelStatus. Archived channels are excluded by default.
Limit1–50, default 20.
OffsetCursor offset for pagination; check hasMore and increment.

Update channel metadata

Open a channel from the list, click the pencil icon next to the name, edit the value, and save.

Go SDK

updated, err := client.Channels.Update(ctx, channelID, channels.UpdateInput{
    Name:        "my-app-prod-renamed",
    Description: ptr("New description"),
})

curl

curl -sS -X PATCH "$CREC_BASE_URL/channels/$CHANNEL_ID" \
  -H "Authorization: Apikey $CREC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"my-app-prod-renamed","description":"New description"}'

Both Name and Description can be updated. If the channel does not exist the SDK returns channels.ErrChannelNotFound and the API returns 404.

Archive a channel

From the Channels page, click the menu on the channel and select Archive. Confirm in the dialog. The channel transitions immediately to archived.

Go SDK

archived, err := client.Channels.Archive(ctx, channelID)
if err != nil {
    return err
}
fmt.Println(archived.Status) // -> archived

curl

curl -sS -X PATCH "$CREC_BASE_URL/channels/$CHANNEL_ID" \
  -H "Authorization: Apikey $CREC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"archived"}'

Archive is synchronous and returns the channel with status: archived.

Naming constraints

Channel names must be unique within your organisation (verified by the SDK package documentation in crec-sdk/channels). Pick a naming scheme that encodes the channel's purpose and environment so collisions are obvious before you call Create. The Description field is free-form text up to 255 characters and is a useful place for ownership / on-call context.

Next steps

Get the latest Chainlink content straight to your inbox.