---
title: "Route one thread of a connection to a session or your webhook [write]"
method: POST
path: "/channels/bindings"
tags: ["channels"]
---

# Route one thread of a connection to a session or your webhook \[write\]

`POST /channels/bindings`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/channels/bindings`
- Auth: HTTP bearer

## Request body

- CreateChannelBinding
  - `connection_id` string, required
  - `thread_id` string, required: The one thread this rule routes. Connection-level routing is a single slot — set it via PUT /connections/{id}/binding
  - `destination` object, required: Exactly one of webhook (endpoint id) or session (session id)
    - `webhook` string
    - `session` string
  - `route_key` string

## Response `201`

Created

- ChannelBinding
  - `id` string
  - `connection_id` string
  - `thread_id` string, nullable
  - `destination` object: Exactly one of webhook (endpoint id) or session (session id)
    - `webhook` string
    - `session` string
  - `is_default` boolean
  - `status` string
  - `route_key` string

## Other responses

- `default`: Error — { error: { code, message } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - added the optional property `error/request_id` to the response with the `default` status

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/channels/bindings/post.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/8280a065ef6a?raw)
