Test unsaved channel configuration¶
Verify channel configuration without creating an instance. Currently supports corporate email, QQ email, and Bocha, Tavily, and Brave search channels.
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¶
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 |
|---|---|---|---|
|
string |
Yes |
workspace ID. |
|
string |
Yes |
wecom, qq_mail, bocha, tavily or brave. |
Request body
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Use wecom_mail, qq_mail, bocha_web_search, tavily_web_search or brave_web_search respectively. |
|
string |
No |
The request structure accepts this field, but the value is not used by unsaved configuration tests. |
|
string |
No |
The request structure accepts this field, but the value is not used by unsaved configuration tests. |
|
object |
No |
Non-sensitive configuration. |
|
object |
According to channel type requirements |
Keys and other sensitive configuration. |
|
string |
No |
The request structure accepts this field, but the value is not used by unsaved configuration tests. |
|
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¶
{
"code": 0,
"data": {
"ok": true,
"status": "COMPLETED",
"last_test_status": "succeeded",
"last_tested_at": "2026-08-18T01:00:00Z"
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
object |
response data. |
|
boolean |
Whether the connection test passed. |
|
string |
Current status. |
|
string |
The actor and request IDs returned when available. Can be omitted if not set. |
|
string |
The actor and request IDs returned when available. Can be omitted if not set. |
|
string |
The most recent test status, either succeeded or failed. Value: |
|
string |
Error message when the test fails. Can be omitted if not set. |
|
string |
The error code, stage, and category by which the service is categorized. Can be omitted if not set. |
|
string |
The error code, stage, and category by which the service is categorized. Can be omitted if not set. |
|
string |
The error message returned by the Provider. Return when available. Can be omitted if not set. |
|
string |
The error message returned by the Provider. Return when available. Can be omitted if not set. |
|
string |
The error code, stage, and category by which the service is categorized. Can be omitted if not set. |
|
string |
Actionable fix recommendations. Return when available. Can be omitted if not set. |
|
string |
Test time, using RFC 3339 format. |
Error response¶
{
"code": 2,
"message": "<错误信息>"
}
Field |
Type |
Description |
|---|---|---|
|
integer |
error code. |
|
string |
Error message for the caller. |