# Remove Lead source

`source_channels.remove`

Remove a supported Lead source after reading its removal options. When activity exists, supply the replacement Lead source selected by the user so business and Deal attribution moves before removal. Business signup links should no longer be used after removal. Removing an empty Referral API channel revokes its API credentials. Moving attribution changes how reports group this activity; the businesses and Deals remain. Reuse client_request_id only for an identical retry.

[Lead sources guide](https://docs.levr.ai/mcp/resources/source_channels.md)

Availability depends on live discovery and your access to the record. Do not infer MCP calls from REST paths.

Operation: write. Required OAuth scopes: mcp.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "client_request_id": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "expected_revision": {
      "description": "Opaque configuration revision returned by a Lead source read.",
      "pattern": "^[a-f0-9]{64}$",
      "type": "string"
    },
    "provider_slug": {
      "description": "Copy provider_slug from providers.list; named slugs are valid.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "replacement_source_channel_id": {
      "anyOf": [
        {
          "description": "Replacement Lead source ID returned by source_channels.get_removal_options when activity must be moved.",
          "maxLength": 255,
          "minLength": 1,
          "pattern": "^srcch_[A-Za-z0-9_-]+$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Replacement Lead source ID returned by source_channels.get_removal_options when activity must be moved."
    },
    "review_token": {
      "description": "After initial removal intent, use source_channels.review_removal, explain its effects and affected counts, and obtain a second explicit confirmation. Send the unchanged token and reviewed replacement.",
      "maxLength": 16000,
      "minLength": 1,
      "type": "string"
    },
    "source_channel_id": {
      "description": "Canonical Lead source ID returned by source_channels.list.",
      "maxLength": 255,
      "minLength": 1,
      "pattern": "^srcch_[A-Za-z0-9_-]+$",
      "type": "string"
    },
    "user_confirmed": {
      "const": true,
      "type": "boolean"
    }
  },
  "required": [
    "provider_slug",
    "source_channel_id",
    "expected_revision",
    "client_request_id",
    "review_token",
    "user_confirmed"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "oneOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "properties": {
        "ok": {
          "const": true
        }
      },
      "required": [
        "data"
      ]
    },
    {
      "not": {
        "required": [
          "data"
        ]
      },
      "properties": {
        "ok": {
          "const": false
        }
      },
      "required": [
        "error"
      ]
    }
  ],
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "api_credentials_revoked": {
          "type": "boolean"
        },
        "id": {
          "description": "Stable public identifier for the referenced resource.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "moved_business_count": {
          "minimum": 0,
          "type": "integer"
        },
        "moved_deal_count": {
          "minimum": 0,
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "removed": {
          "const": true,
          "type": "boolean"
        },
        "replacement_source_channel_id": {
          "anyOf": [
            {
              "description": "Stable public identifier for the referenced resource.",
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Stable public identifier for the referenced resource."
        },
        "signup_links_should_no_longer_be_used": {
          "type": "boolean"
        },
        "type": {
          "enum": [
            "in_house",
            "client_added",
            "marketplace",
            "business_signup_link",
            "referrer_api",
            "provider_relationship"
          ],
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "type",
        "removed",
        "moved_business_count",
        "moved_deal_count",
        "replacement_source_channel_id",
        "signup_links_should_no_longer_be_used",
        "api_credentials_revoked"
      ],
      "type": "object"
    },
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "details": {
          "additionalProperties": true,
          "description": "Optional bounded, agent-safe correction or recovery facts.",
          "type": "object"
        },
        "message": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        }
      },
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "type": "object"
    },
    "ok": {
      "description": "Whether the tool completed successfully.",
      "type": "boolean"
    }
  },
  "required": [
    "ok",
    "meta"
  ],
  "type": "object"
}
```

Check the result, then read the affected record to confirm your change.
