# deleteConnection

```graphql
mutation DeleteConnection($projectReference: ID!, $name: String!, $connectionId: ID!, $scope: ConnectionScope!) {
  deleteConnection(projectReference: $projectReference, name: $name, connectionId: $connectionId, scope: $scope) {
    ok
    providerRevoked
  }
}
```

Delete a connection.

## Arguments

| Name               | Type             | Required | Description                                                                                                                                                                                                                                                                                                                        |
| ------------------ | ---------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `projectReference` | ID!              | Yes      | Project ID or slug. A missing or inaccessible project, including a denied scope-dependent project access check, returns not\_found.                                                                                                                                                                                                |
| `name`             | String!          | Yes      | Integration name, for example github.                                                                                                                                                                                                                                                                                              |
| `connectionId`     | ID!              | Yes      | Connection ID from connectionStatus.                                                                                                                                                                                                                                                                                               |
| `scope`            | ConnectionScope! | Yes      | Connection owner. Project scope needs the editor role for project.integrations.connect; user scope needs viewer access to the project. API keys also need the integrations write scope. Verified user-session or API-key credentials are required; MCP OAuth grants and runtime credentials are refused. One of `user`, `project`. |

## Variables

```json
{
  "projectReference": "string",
  "name": "string",
  "connectionId": "string",
  "scope": "user"
}
```

## Responses

| Status | Description                                       |
| ------ | ------------------------------------------------- |
| 200    | The ConnectionDeletion! in data.deleteConnection. |

## 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 DeleteConnection($projectReference: ID!, $name: String!, $connectionId: ID!, $scope: ConnectionScope!) {\n  deleteConnection(projectReference: $projectReference, name: $name, connectionId: $connectionId, scope: $scope) {\n    ok\n    providerRevoked\n  }\n}",
  "variables": {
    "projectReference": "string",
    "name": "string",
    "connectionId": "string",
    "scope": "user"
  }
}'
```

## Example response

```json
{
  "data": {
    "deleteConnection": {
      "ok": false,
      "providerRevoked": false
    }
  }
}
```
