# deleteChannel

```graphql
mutation DeleteChannel($projectReference: ID!, $channelId: ID!) {
  deleteChannel(projectReference: $projectReference, channelId: $channelId) {
    ok
  }
}
```

Disconnect a channel. Requires project.channels.write; API keys also need delete scope.

## Arguments

| Name               | Type | Required | Description                                              |
| ------------------ | ---- | -------- | -------------------------------------------------------- |
| `projectReference` | ID!  | Yes      | Project UUID or slug.                                    |
| `channelId`        | ID!  | Yes      | Channel to disconnect; the Slack connection is retained. |

## Variables

```json
{
  "projectReference": "string",
  "channelId": "string"
}
```

## Responses

| Status | Description                                |
| ------ | ------------------------------------------ |
| 200    | The DeletionResult! in data.deleteChannel. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation DeleteChannel($projectReference: ID!, $channelId: ID!) {\n  deleteChannel(projectReference: $projectReference, channelId: $channelId) {\n    ok\n  }\n}",
  "variables": {
    "projectReference": "string",
    "channelId": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "deleteChannel": {
      "ok": false
    }
  }
}
```
