Create channel instance

Creates a channel instance for the specified Provider. Sensitive configuration is only submitted in the request, and no clear text is returned in a successful response.

HTTP
POST $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/channels/{provider}/instances

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. Prepare the personal access token, target workspace ID, and channel provider ID that can access the target workspace.

Request body

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/channels/$PROVIDER/instances" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "channel_type": "wecom_mail",
    "name": "告警通道",
    "config": {
      "email": "alerts@example.com",
      "timeout_seconds": "30"
    },
    "secrets": {
      "password": "'"$MAIL_PASSWORD"'"
    }
  }'

Path parameters

Field

Type

Required

Description

workspace_id

string

Yes

workspace ID.

provider

string

Yes

Channel provider ID.

Request body

Field

Type

Required

Description

channel_type

string

Yes

The channel type within the Provider.

name

string

No

Instance name. When omitted, the provider default name is used.

description

string

No

Example description.

config

object

No

Non-sensitive configuration.

secrets

object

According to channel type requirements

Keys and other sensitive configuration.

visibility

string

No

Visible range.

labels

object

No

Tag key-value pairs.

Fill in the configuration by channel type

The values of config, secrets and labels are all strings. The example uses a business email, the provider in the path should be wecom. $MAIL_PASSWORD is the email login password or authorization code. Each channel only accepts the configuration keys listed in the table below.

Provider

channel_type

config allow key

config required key

secrets allow keys

secrets Required key for the first time.

wecom

wecom_app

corp_id、agent_id、timeout_seconds

corp_id、agent_id

secret、callback_token、callback_encoding_aes_key

secret

wecom

wecom_group_robot

timeout_seconds

None

webhook_key

webhook_key

wecom

wecom_mail

email、timeout_seconds

email

password

password

github

github_app

app_id、installation_id、owner、repository、timeout_seconds

None

webhook_secret、access_token

access_token

feishu

feishu_app

app_id、timeout_seconds

app_id

app_secret、verification_token、encrypt_key

app_secret、verification_token

slack

slack_app

app_id、team_id、timeout_seconds

None

signing_secret、bot_token

By certification method, see below.

grafana

grafana

grafana_url、timeout_seconds

grafana_url

service_account_token

service_account_token

kubernetes

kubernetes

api_server、auth_method、default_namespace、tls_server_name、timeout_seconds

api_server、auth_method

bearer_token、certificate_authority_data、client_certificate_data、client_key_data

By certification method, see below.

qq_mail

qq_mail

email、timeout_seconds

email

password

password

codex

codex_api

base_url、model、reasoning_effort、timeout_seconds

base_url、model、reasoning_effort

api_key

api_key

bocha

bocha_web_search

endpoint、timeout_seconds

timeout_seconds

api_key

api_key

tavily

tavily_web_search

endpoint、timeout_seconds

timeout_seconds

api_key

api_key

brave

brave_web_search

endpoint、timeout_seconds

timeout_seconds

api_key

api_key

The Kubernetes authentication method must be service_account_token or client_certificate. The former fills in bearer_token, and the latter fills in both the Base64 encoded PEM certificate and private key. Trusted CA is available through certificate_authority_data.

api_server must be an HTTPS address and cannot contain user information, query strings or fragments. The maximum size of the token is 64 KiB and the maximum size of the decoded PEM is 1 MiB.

The search channel must be filled with timeout_seconds, using the string representing 1–300. Other channels can be omitted or filled in with a string representing 0–300. When searching for endpoint is omitted, the provider’s default endpoint is used.

Codex’s reasoning_effort supports minimal, low, medium, high, xhigh, max and ultra. The availability of external services is not verified when saving.

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",
    "config": {
      "provider": "wecom",
      "channel_type": "wecom_mail",
      "email": "alerts@example.com",
      "timeout_seconds": "30"
    },
    "created_at": "2026-08-18T01:00:00Z",
    "updated_at": "2026-08-18T01:00:00Z",
    "version": 1
  }
}

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

The channel type corresponding to the provider. Values: wecom, github, feishu, slack, grafana, kubernetes, qq_mail, codex, bocha, tavily, brave.

data.channel_type

string

The channel type corresponding to the provider. 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

A reference to a saved credential, not a 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 and last update times, using RFC 3339 format.

data.updated_at

string

Creation and last update times, 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