All Products
Search
Document Center

Seri Qoder CN:Perbarui channel

Last Updated:Jul 04, 2026

Perbarui binding Channel, nama tampilan, status aktif, atau opsi respons.

Header permintaan

Header

Wajib

Deskripsi

Authorization

Ya

Bearer <PAT>

Content-Type

Ya

application/json

Idempotency-Key

Tidak

Kunci idempotensi opsional untuk permintaan yang tidak aman.

Parameter path

Parameter

Tipe

Wajib

Deskripsi

channel_id

string

Ya

ID Channel.

Body permintaan

Parameter

Tipe

Wajib

Deskripsi

name

string

Tidak

Nama tampilan Channel.

identity_id

string

Tidak

Forward Identity ID terikat yang baru.

template_id

string

Tidak

ID Forward Template yang baru untuk diikat.

enabled

boolean

Tidak

Sakelar manual untuk mengaktifkan atau menonaktifkan.

channel_config.credentials

object

Tidak

Kredensial channel yang diperbarui, digunakan untuk rotasi kredensial.

channel_config.response_options

object

Tidak

Pengaturan visibilitas balasan.

Contoh permintaan

curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/channels/ci_019eabc123' \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": false,
    "channel_config": {
      "response_options": {
        "include_tool_calls": true,
        "include_thinking": false
      }
    }
  }'

Contoh respons

HTTP 200 OK

{
  "id": "ci_019eabc123",
  "type": "channel",
  "identity_id": "idn_019eabc123",
  "template_id": "tmpl_support",
  "channel_type": "feishu",
  "name": "Support Feishu channel",
  "enabled": false,
  "binding_status": "bound",
  "channel_config": {
    "response_options": {
      "include_tool_calls": true,
      "include_thinking": false
    }
  },
  "created_at": "2026-06-18T10:00:00Z",
  "updated_at": "2026-06-18T10:30:00Z"
}

Bidang respons

Mengembalikan objek Channel yang telah diperbarui.

Kesalahan

HTTP

Tipe

Kode

Pemicu

400

invalid_request_error

invalid_request

Body permintaan tidak valid.

404

not_found_error

channel_not_found

Channel tidak ada.

404

not_found_error

channel_template_not_found

Template baru tidak ada.

404

not_found_error

channel_identity_not_found

Identity baru tidak ada.

409

conflict_error

channel_identity_disabled

Identity baru dinonaktifkan.

401

authentication_error

authentication_required

PAT tidak valid atau telah kedaluwarsa.

Catatan

  • id, type, dan channel_type tidak dapat diperbarui.

  • binding_status dikelola oleh sistem.

  • enabled=true hanya mengaktifkan sakelar manual dan tidak mengubah nilai binding_status.

  • Memperbarui identity_id atau template_id akan mengakhiri percakapan Channel aktif sebelumnya; pesan inbound baru akan menggunakan binding yang baru.