Skip to main content
Channels

Update a channel pairing

Change the Identity or Template of a bound Channel pairing record.

Channel pairing is currently in Beta. API definitions, response structures, and behavior may change. Check the documentation for updates.
POST /api/v1/forward/channel_pairings/{pairing_id} Change the Identity or Template of a bound (active) record. For pending records, use Pair a channel.

Request parameters

Use Authorization: Bearer <PAT or SAT> and Content-Type: application/json. The required path parameter pairing_id is the pairing record's id.
Body parameterTypeDescription
identity_idstringNew Identity ID.
template_idstringNew Template ID.
Provide at least one field. Omitted fields remain unchanged; blank strings, null, non-string values, control characters, and unknown fields are not supported. The Channel and pairing scope cannot be changed. scope_display_name comes from channel messages and cannot be edited manually.

Example request

curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/channel_pairings/pair_019eabc123' \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"template_id":"tmpl_support"}'

Response

Returns HTTP 200 OK on success with the updated pairing object, using the same structure as Get a channel pairing. The status remains active. After the binding changes, new messages use the new execution configuration and existing sessions are no longer reused. Submitting the same values again does not change the binding again.

HTTP error codes

HTTPTypeTrigger
400invalid_request_errorRequest parameters violate the constraints above, pairing_id is blank or contains control characters, or the Channel is not in pairing mode.
401authentication_errorPAT or SAT is invalid or expired.
403permission_errorThe caller does not have permission to invoke the API.
404not_found_errorThe active pairing binding, Channel, Identity, or Template does not exist or is inaccessible, or the Channel is archived.
409conflict_errorThe pairing status conflicts, the binding was modified concurrently, or the target Identity is disabled.