Update channel instance

Partially updates an already created channel instance. Fields not provided remain unchanged.

HTTP
PATCH $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/channels/{provider}/instances/{instance_id}

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First query the channel instance details and confirm the instance to be updated. Prepare the personal access token, target workspace ID, channel provider ID, and instance ID that can access the target workspace.

Request body

Shell
curl -X PATCH "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/channels/$PROVIDER/instances/$INSTANCE_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "生产告警通道"
  }'

When channel_type is provided, it must be consistent with the saved channel type.

Path parameters

Field

Type

Required

Description

workspace_id

string

Yes

workspace ID.

provider

string

Yes

Channel provider ID.

instance_id

string

Yes

Channel instance ID.

expected_version

integer

No

Check the current version when it is greater than 0. 0 or omitted does not enable this caller version condition.

Query parameters

Field

Type

Required

Description

channel_type

string

No

The channel type within the Provider. Must be provided consistent with the saved type.

name

string

No

Instance name.

description

string

No

Example description.

config

object

No

Non-sensitive configuration.

secrets

object

No

Keys and other sensitive configuration.

visibility

string

No

Visible range.

labels

object

No

Tag key-value pairs.

channel_type cannot be modified after creation. config Key merging, when the value is an empty string, the key is deleted, but the required configuration cannot be cleared. Keep the original value when filling in null.

Saved credentials are retained when secrets is blank. labels is replaced as a whole, cleared when {} is filled in, and retained when null is filled in.

An empty PATCH request also increments the version. When updating the search channel, a non-empty API Key will rotate credentials and clear the test information. Only changing other configurations will retain the test information. After other channels are updated, the recent test information will be cleared. If the version does not match, HTTP 409 will be returned.

Successful response

JSON
{
  "code": 0,
  "data": {
    "id": "inst_01",
    "workspace_id": "ws_01",
    "provider": "wecom",
    "channel_type": "wecom_mail",
    "name": "生产告警通道",
    "status": "active",
    "credential_ref": "cred_01",
    "created_at": "2026-10-14T00:00:00Z",
    "updated_at": "2026-08-18T01:00:00Z",
    "version": 1,
    "config": {
      "provider": "wecom",
      "channel_type": "wecom_mail",
      "email": "alerts@example.com",
      "timeout_seconds": "30"
    }
  }
}

Field

Type

Description

code

integer

0 when the request is processed successfully.

data

object

response data.

data.id

string

Object ID.

data.workspace_id

string

The workspace ID to which it belongs.

data.provider

string

Provider ID. Values: wecom, github, feishu, slack, grafana, kubernetes, qq_mail, codex, bocha, tavily, brave.

data.channel_type

string

Channel type. Values: wecom_app, wecom_group_robot, wecom_mail, github_app, feishu_app, slack_app, grafana, kubernetes, qq_mail, codex_api, bocha_web_search, tavily_web_search, brave_web_search.

data.name

string

Name.

data.description

string

Description. Can be omitted if not set.

data.status

string

Current status. Values: draft, active, disabled, archived.

data.credential_ref

string

Credential reference, not clear text key.

data.callback_path

string

Callback request path. Can be omitted if not set.

data.capabilities

array of string

List of available capabilities. Can be omitted if not set.

data.tool_ids

array of string

List of associated tool IDs. Can be omitted if not set.

data.config

object

Non-sensitive configuration, fields vary with connection or channel type. Can be omitted if not set.

data.last_test_status

string

The most recent test status, either succeeded or failed. Can be omitted if not set. Value: succeeded, failed.

data.last_tested_at

string

The most recent test time, in RFC 3339 format. Can be omitted if not set.

data.last_test_error

string

Error description for recent tests. Can be omitted if not set.

data.last_test_error_code

string

Error codes from recent tests. Can be omitted if not set.

data.labels

object

Tag key-value pairs. Can be omitted if not set.

data.created_at

string

Creation time, in RFC 3339 format.

data.updated_at

string

Last updated, using RFC 3339 format.

data.version

integer

Current version number.

Error response

JSON
{
  "code": 2,
  "message": "<错误信息>"
}

Field

Type

Description

code

integer

error code.

message

string

Error message for the caller.

Last updated on