# Delete a communication channel

`DELETE /api/configuration/consent/communication-channels/{channelId}`

- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Delete a communication channel](https://support.gladstonesoftware.cloud/reference/configuration/delete-a-communication-channel)

## Overview

Removes a communication channel — the medium a member consents to be contacted through, such as email or SMS — from consent configuration.

**This is a hard delete, and it takes every member's consent for that channel with it.** The channel is removed, and so is every member consent record naming it, across all members and all campaigns. There is no soft-delete or deactivation flag on a channel, so this cannot be undone by re-creating the channel: recreating it gives you an empty channel that no member has consented to. Before each consent record is removed, a history entry is written for each one — capturing the member, campaign, channel, channel name and capture date — so the audit trail survives even though the consent does not.

**Channels flagged as system channels cannot be deleted.** They are rejected with `400`, whatever else is true of them. You can tell which ones these are before you call: the list-channels response marks them with `protected: true`.

A repeat call is **not** a no-op — it answers `404`, because the channel no longer exists to look up. Treat `404` on a retry as confirmation that the first attempt succeeded rather than as a failure.

On success, a subsequent read of the channel list reflects the deletion immediately.

## Endpoint

`DELETE {base_url}/api/configuration/consent/communication-channels/{channelId}`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `channelId` | string | Yes | The channel code, as returned in `channelId` by the list-channels endpoint — for example `EMAIL` or `SMS`, not a numeric id. It is matched exactly, so case and spacing must agree with the stored value. A code that matches nothing returns `404`; a code belonging to a system channel returns `400`. |

## Sample request

```bash title="cURL"
curl -X DELETE '{base_url}/api/configuration/consent/communication-channels/{channelId}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | The channel exists but is a system channel and cannot be removed — `Cannot delete {channelId} as this is a non removable communication channel`. No consent records are touched. |
| `400` | Bad request | `channelId` is empty — `A channel ID must be supplied`. In practice a request with an empty path segment does not reach this endpoint at all. |
| `404` | Not found | No channel has that code — either it never existed, or a previous delete already removed it. The body is empty; no message is returned. |
| `500` | Internal server error | The delete failed — for example other records still reference the channel or its consent records. Nothing is changed, because the consent removals, history entries and channel removal are all-or-nothing. The body is empty. |
