Test unsaved channel configuration

Verify channel configuration without creating an instance. Currently supports corporate email, QQ email, and Bocha, Tavily, and Brave search channels.

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

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 that can access the target workspace, the target workspace ID, and the channel configuration and key to be tested.

Prepare the corresponding account or search service credentials according to the selected channel.

Request body

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/channels/wecom/instances/test" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "channel_type": "wecom_mail",
    "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

wecom, qq_mail, bocha, tavily or brave.

Request body

Field

Type

Required

Description

channel_type

string

Yes

Use wecom_mail, qq_mail, bocha_web_search, tavily_web_search or brave_web_search respectively.

name

string

No

The request structure accepts this field, but the value is not used by unsaved configuration tests.

description

string

No

The request structure accepts this field, but the value is not used by unsaved configuration tests.

config

object

No

Non-sensitive configuration.

secrets

object

According to channel type requirements

Keys and other sensitive configuration.

visibility

string

No

The request structure accepts this field, but the value is not used by unsaved configuration tests.

labels

object

No

The request structure accepts this field, but the value is not used by unsaved configuration tests.

Tested using only channel_type, config and secrets. Fill in the email address and password or authorization code in the email channel. The search channel fills in the API Key and string timeout value according to the selected provider, and optional service address. $MAIL_PASSWORD in the example is the email password or authorization code.

Successful response

JSON
{
  "code": 0,
  "data": {
    "ok": true,
    "status": "COMPLETED",
    "last_test_status": "succeeded",
    "last_tested_at": "2026-08-18T01:00:00Z"
  }
}

Field

Type

Description

code

integer

0 when the request is processed successfully.

data

object

response data.

data.ok

boolean

Whether the connection test passed.

data.status

string

Current status.

data.worker_id

string

The actor and request IDs returned when available. Can be omitted if not set.

data.request_id

string

The actor and request IDs returned when available. Can be omitted if not set.

data.last_test_status

string

The most recent test status, either succeeded or failed. Value: succeeded, failed.

data.last_test_error

string

Error message when the test fails. Can be omitted if not set.

data.error_code

string

The error code, stage, and category by which the service is categorized. Can be omitted if not set.

data.error_stage

string

The error code, stage, and category by which the service is categorized. Can be omitted if not set.

data.provider_error_code

string

The error message returned by the Provider. Return when available. Can be omitted if not set.

data.provider_error_message

string

The error message returned by the Provider. Return when available. Can be omitted if not set.

data.error_category

string

The error code, stage, and category by which the service is categorized. Can be omitted if not set.

data.suggestion

string

Actionable fix recommendations. Return when available. Can be omitted if not set.

data.last_tested_at

string

Test time, using RFC 3339 format.

Error response

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

Field

Type

Description

code

integer

error code.

message

string

Error message for the caller.

Last updated on