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.
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¶
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 |
|---|---|---|---|
|
string |
Yes |
workspace ID. |
|
string |
Yes |
Channel provider ID. |
Request body
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The channel type within the Provider. |
|
string |
No |
Instance name. When omitted, the provider default name is used. |
|
string |
No |
Example description. |
|
object |
No |
Non-sensitive configuration. |
|
object |
According to channel type requirements |
Keys and other sensitive configuration. |
|
string |
No |
Visible range. |
|
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 |
|
|
|
|
wecom |
wecom_group_robot |
|
None |
|
|
wecom |
wecom_mail |
|
|
|
|
github |
github_app |
|
None |
|
|
feishu |
feishu_app |
|
|
|
|
slack |
slack_app |
|
None |
|
By certification method, see below. |
grafana |
grafana |
|
|
|
|
kubernetes |
kubernetes |
|
|
|
By certification method, see below. |
qq_mail |
qq_mail |
|
|
|
|
codex |
codex_api |
|
|
|
|
bocha |
bocha_web_search |
|
|
|
|
tavily |
tavily_web_search |
|
|
|
|
brave |
brave_web_search |
|
|
|
|
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¶
{
"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 |
|---|---|---|
|
integer |
|
|
object |
response data. |
|
string |
Object ID. |
|
string |
The workspace ID to which it belongs. |
|
string |
The channel type corresponding to the provider. Values: |
|
string |
The channel type corresponding to the provider. Values: |
|
string |
Name. |
|
string |
Description. Can be omitted if not set. |
|
string |
Current status. Values: |
|
string |
A reference to a saved credential, not a clear-text key. |
|
string |
Callback request path. Can be omitted if not set. |
|
array of string |
List of available capabilities. Can be omitted if not set. |
|
array of string |
List of associated tool IDs. Can be omitted if not set. |
|
object |
Non-sensitive configuration, fields vary with connection or channel type. Can be omitted if not set. |
|
string |
The most recent test status, either succeeded or failed. Can be omitted if not set. Value: |
|
string |
The most recent test time, in RFC 3339 format. Can be omitted if not set. |
|
string |
Error description for recent tests. Can be omitted if not set. |
|
string |
Error codes from recent tests. Can be omitted if not set. |
|
object |
Tag key-value pairs. Can be omitted if not set. |
|
string |
Creation and last update times, using RFC 3339 format. |
|
string |
Creation and last update times, using RFC 3339 format. |
|
integer |
Current version number. |
Error response¶
{
"code": 2,
"message": "<错误信息>"
}
Field |
Type |
Description |
|---|---|---|
|
integer |
error code. |
|
string |
Error message for the caller. |