> Source: https://wexa.ai/docs/connectors/delete-connector

# delete-connector

[Can be held for approval](/docs/sdks-and-apis/how-every-tool-call-works#lifecycle-and-governance)

Delete a connector provisioned in this project, the same as the console's delete. Irreversible: its skills, triggers and synced data go with it. Needs the `fabric:skill.write` grant, and a project or organization admin.

**Delete a connector**

**Wexa MCP server**

```bash
curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "Mcp-Session-Id: $MCP_SESSION_ID" \
  -H "content-type: application/json" -H "accept: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"delete-connector","arguments":{"connector_id":"6b1a3d5e7f9c0b2a4d6e8f01"}}}'
```

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000017\",\"result\":{\"connector_id\":\"6b1a3d5e7f9c0b2a4d6e8f01\",\"category\":\"servicenow\",\"deleted\":true}}"
    }
  ],
  "isError": false
}
```

**REST API**

```bash
curl -sS https://fabric.wexa.ai/v1/delete-connector \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{"connector_id":"6b1a3d5e7f9c0b2a4d6e8f01"}'
```

```json
{
  "lifecycle_id": "qlc_000017",
  "result": {
    "connector_id": "6b1a3d5e7f9c0b2a4d6e8f01",
    "category": "servicenow",
    "deleted": true
  }
}
```

**TypeScript SDK**

```ts
import { Fabric } from '@wexa-fabric/sdk'

const fabric = new Fabric()
const result = await fabric.deleteConnector({
  connector_id: '6b1a3d5e7f9c0b2a4d6e8f01'
})
```

```ts
// result is the payload itself, with no `.result` to read
{
  connector_id: '6b1a3d5e7f9c0b2a4d6e8f01',
  category: 'servicenow',
  deleted: true
}
```

**Python SDK**

```python
from wexa import Fabric

fabric = Fabric()
out = fabric.delete_connector(connector_id="6b1a3d5e7f9c0b2a4d6e8f01")
```

```python
# out is the result, already unwrapped
{
    "connector_id": "6b1a3d5e7f9c0b2a4d6e8f01",
    "category": "servicenow",
    "deleted": True
}
```

## Parameters

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `connector_id` | string | Required | The connector, from [`list-connectors`](/docs/connectors/list-connectors). It must have been provisioned in this project. Non-empty. One you cannot delete (unknown, in another organization, provisioned in another project, or outside your access scope) is refused (403). |

**Errors**

- `ForbiddenError` (403): you are not an admin.

**Show full response**

- `connector_id`: the connector that was deleted.
- `category`: its category.
- `deleted`: always `true`. A delete that did not happen is an error, not `false`.

An example response, for a ServiceNow connector.

**Result of delete-connector**

**REST API**

```json
{
  "lifecycle_id": "qlc_000017",
  "result": {
    "connector_id": "6b1a3d5e7f9c0b2a4d6e8f01",
    "category": "servicenow",
    "deleted": true
  }
}
```

**Wexa MCP server**

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000017\",\"result\":{\"connector_id\":\"6b1a3d5e7f9c0b2a4d6e8f01\",\"category\":\"servicenow\",\"deleted\":true}}"
    }
  ],
  "isError": false
}
```

**TypeScript SDK**

```ts
// the object you get back IS the result — there is no `.result` to read
{
  "connector_id": "6b1a3d5e7f9c0b2a4d6e8f01",
  "category": "servicenow",
  "deleted": true
}

// The TS SDK names these camelCase — lifecycleId, traceId — where Python uses
// lifecycle_id and trace_id. Both are non-enumerable: readable, but omitted by
// Object.keys() and JSON.stringify(). `result.lifecycleId` here is undefined.
result.lifecycleId // 'qlc_000017'
```

**Python SDK**

```python
# a dict subclass; `result` is already unwrapped
{
 "connector_id": "6b1a3d5e7f9c0b2a4d6e8f01",
 "category": "servicenow",
 "deleted": True
}

out.lifecycle_id  # 'qlc_000017' — an attribute, not a key
```

**More details**

A connector that this project may use but that was provisioned in another project, which [`list-connectors`](/docs/connectors/list-connectors) shows with a different `home_project_id`, is refused. The error codes are `S8:connector-admin-only` (not an admin), `S8:connector-not-usable` (the connector is not one you can delete) and `S4:validate-input` (`connector_id`).

The connector id in the example is illustrative: swap it for one `list-connectors` returned to you.

Every call by an admin also writes a `delete-connector.run` audit event, with the connector, its category and the outcome: `deleted` or `failed`. A failed call records the error.

Marked consequential: it is audited in full, and a policy rule may hold it for a person to approve. The project's write gate, when a project admin has turned it on (it is off by default), holds it this way when an API key or SDK session calls it. The admin check runs when the call is executed, after any approval, so a call by someone who is not an admin is refused then, even when a person approved it.

See also [`configure-connector`](/docs/connectors/configure-connector).

Every tool call works the same way: [How every tool call works](/docs/sdks-and-apis/how-every-tool-call-works).
