---
title: ข้อมูลอ้างอิง API: Channel events
description: Platform API v1 ส่วน Channel events: path, พารามิเตอร์, ฟิลด์ของคำขอและคำตอบ, scope, idempotency และข้อผิดพลาดของทุก operation จาก contract
url: https://agentlab.cresclab.com/docs/th/api/channel-events
language: th
updated: 2026-12-05
---

# ข้อมูลอ้างอิง API: Channel events

Platform API v1 ส่วน Channel events: path, พารามิเตอร์, ฟิลด์ของคำขอและคำตอบ, scope, idempotency และข้อผิดพลาดของทุก operation จาก contract

> [!NOTE]
> สร้างจาก API contract (Agent Lab Platform API 1.0.0-alpha.1) คำอธิบายเป็นภาษาอังกฤษตามต้นฉบับใน contract

Answering a channel event the platform delivered to the application (`sdk-event/v1`).

## Reply to a channel event

`POST /v1/sdk/replies`

Answers one `sdk-event/v1` event the platform delivered to the application, by its
`correlationId`. The credential — an `al_app_` key, or an installation token of the
installed application — is the only source of the workspace and the application; the body cannot choose either, or where the answer goes. Server to server
only: a request with an `Origin` header or a query string is refused. An installation
token answers only when its installation is granted `channels:respond`; an `al_app_` key
carries no scopes and needs none.

| Scope | ทำในนามของ | การยืนยันตัวตน | Idempotency-Key |
| --- | --- | --- | --- |
| ไม่มี | — | `applicationKey`, `installationToken` | — |

### เนื้อหาคำขอ

`application/json`: [SdkReply](https://agentlab.cresclab.com/docs/th/api/schemas.md#SdkReply)

| ฟิลด์ | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- |
| `version` | `string` | ใช่ | ค่าที่เป็นไปได้: `sdk-event/v1`. |
| `correlationId` | `string (uuid)` | ใช่ | The delivered event's `correlationId`. |
| `content` | `string` | ใช่ | The answer's text; not blank. |

### คำตอบ

| สถานะ | เนื้อหา | คำอธิบาย |
| --- | --- | --- |
| `202` | `application/json`: `object` | Accepted for delivery. |
| `400` | `application/json`: [LegacyErrorCode](https://agentlab.cresclab.com/docs/th/api/schemas.md#LegacyErrorCode) | `invalid_sdk_reply`. |
| `401` | `application/json`: [LegacyErrorCode](https://agentlab.cresclab.com/docs/th/api/schemas.md#LegacyErrorCode) | `application_key_not_accepted`: neither a live key nor an installation token. |
| `403` | `application/json`: [LegacyErrorCode](https://agentlab.cresclab.com/docs/th/api/schemas.md#LegacyErrorCode) | `server_application_required`: sent from a browser or with a query string; `scope_not_granted`: an installation token whose installation is not granted `channels:respond`. |
| `404` | `application/json`: [LegacyErrorCode](https://agentlab.cresclab.com/docs/th/api/schemas.md#LegacyErrorCode) | `sdk_event_not_found`. |
| `409` | `application/json`: [LegacyErrorCode](https://agentlab.cresclab.com/docs/th/api/schemas.md#LegacyErrorCode) | `sdk_reply_conflict`: the event was already answered or can no longer be. |
| `413` | `application/json`: [LegacyErrorCode](https://agentlab.cresclab.com/docs/th/api/schemas.md#LegacyErrorCode) | `request_too_large`. |
| `415` | `application/json`: [LegacyErrorCode](https://agentlab.cresclab.com/docs/th/api/schemas.md#LegacyErrorCode) | `json_required`. |
| `503` | `application/json`: [LegacyErrorCode](https://agentlab.cresclab.com/docs/th/api/schemas.md#LegacyErrorCode) | `sdk_reply_unavailable`, or `CONTRACT_UNAVAILABLE` when the API contract could not be read. |

#### `202` `application/json`

| ฟิลด์ | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- |
| `accepted` | `boolean` | ใช่ | ค่าที่เป็นไปได้: `true`. |
| `correlationId` | `string (uuid)` | ใช่ | — |
