Delete mail tool connection

Delete the mail tool connections and associated credentials saved in the current workspace. The interface returns a disconnected status even if there is no current connection.

HTTP
DELETE $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/tools/mail/{provider}/connect

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

The request body of this interface must be empty.

Request

Shell
curl -X DELETE "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/tools/mail/qq/connect" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Parameters

Type

Is it required

Description

workspace_id

string

Yes

The current workspace ID.

provider

string

Yes

Mail provider to disconnect: qq or wecom.

Successful response

Returns 200 on success. After disconnection, subsequent mail tool calls cannot continue to use the deleted connection credentials.

JSON
{
  "code": 0,
  "data": {
    "tool_id": "moi.qq.mail",
    "provider": "qq",
    "status": "disconnected",
    "requires_reconnect": false
  }
}

The response fields are as follows.

Field

Type

Description

code

integer

0 on success.

data.tool_id

string

Email built-in tool ID and provider.

data.provider

string

Email built-in tool ID and provider.

data.status

string

disconnected after disconnection.

data.requires_reconnect

boolean

false after disconnection.

Error response

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

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

2(INVALID_ARGUMENT)

provider or invalid workspace ID.

provider Use only qq or wecom and check the path parameters.

401

6(UNAUTHENTICATED)

Lack of valid identity credentials.

Check API Key.

403

5(PERMISSION_DENIED)

The current identity does not have permission to manage tool connections.

Check workspace authorization.

503

15(UNAVAILABLE)

The email connection service or authorization dependency is temporarily unavailable.

Try again later.

Follow-up operations

Query tool tag, confirm that the target no longer appears.

Last updated on