---
title: disconnect-a-connector-from-a-project-environment
product: vercel
url: /docs/rest-api/connect/disconnect-a-connector-from-a-project-environment
canonical_url: "https://vercel.com/docs/rest-api/connect/disconnect-a-connector-from-a-project-environment"
last_updated: 2026-10-30
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about disconnect-a-connector-from-a-project-environment on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Disconnect a connector from a project environment

```http
DELETE /v1/connect/connectors/{connector}/projects/{projectId}/environments/{environment}
```

Remove a connector's access and event destinations for one project environment. Other environments, the connector, and its provider installations are preserved. Preview disconnect removes destinations for every preview branch in the project. Disconnecting the last environment also releases the project-local UID. Safe to retry.

## Authentication

**bearerToken**: HTTP bearer

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `connector` | string | Yes |  |
| `projectId` | string | Yes |  |
| `environment` | object | Yes | A built-in environment name or the stable env_* ID of a custom environment. |


## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `slug` | string | No |  |
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |


## Example request

### TypeScript

```typescript
const response = await fetch('https://api.vercel.com/v1/connect/connectors/connector/projects/projectId/environments/environment?slug=string&teamId=string', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Next.js

```typescript
'use server';

export async function callEndpoint() {
  const response = await fetch('https://api.vercel.com/v1/connect/connectors/connector/projects/projectId/environments/environment?slug=string&teamId=string', {
    method: 'DELETE',
    headers: {
      'Authorization': `Bearer ${process.env.VERCEL_ACCESS_TOKEN}`,
      'Content-Type': 'application/json',
    },
    next: { revalidate: 3600 }
  });

  if (!response.ok) {
    throw new Error('Request failed');
  }

  return response.json();
}
```

### cURL

```bash
curl -X DELETE 'https://api.vercel.com/v1/connect/connectors/connector/projects/projectId/environments/environment?slug=string&teamId=string' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
```

## Responses

### 204: No description

### 400: One of the provided values in the request query is invalid.

### 401: The request is not authorized.

### 403: You do not have permission to access this resource.

### 404: No description

### 409: No description

### 410: No description

### 422: No description

### 500: No description

### 501: No description

### 504: No description

---

## Related

- [connect endpoints](/docs/rest-api#connect)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://vercel.com/openapi.json) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
