# Delete a connector

> **DELETE** `https://api.us.nylas.com/v3/connectors/{provider}`

Source: https://developer.nylas.com/docs/reference/api/connectors-integrations/delete_connector_by_provider/

Deletes the connector for the provider you specify. All grants on the connector stop working right away, and its credentials are deleted too.

To learn what gets removed and when, see [Deleting resources and data](/docs/dev-guide/platform/deleting-resources/).

**Authentication:** NYLAS_API_KEY

## Parameters

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `provider` | string | Yes |  |

## Responses

### 200 - Delete Succeeded

- `request_id` (string) **(required)** - ID of the request.

### 401 - Not Authenticated

- `request_id` (string) **(required)** - ID of the request
- `error` (object) **(required)** - Error object
  - `type` (string) - Type of error
  - `message` (string) - Informative error message
  - `provider_error` (object) - (OPTIONAL) informative error message from provider's side

### 404 - Not Found

- `request_id` (string) **(required)** - ID of the request
- `error` (object) **(required)** - Error object
  - `type` (string) - Type of error
  - `message` (string) - Informative error message
  - `provider_error` (object) - (OPTIONAL) informative error message from provider's side

## Code samples

### cURL

```bash
curl --request DELETE \
  --url 'https://api.us.nylas.com/v3/connectors/<PROVIDER>' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>' \
  --header 'Content-Type: application/json'
```

### Node.js SDK

```javascript
import Nylas from "nylas";

const nylas = new Nylas({
  apiKey: "<NYLAS_API_KEY>",
  apiUri: "<NYLAS_API_URI>",
});

const provider = "google";

try {
  await nylas.connectors.destroy({ provider });
  console.log(`Connector with ID ${provider} removed successfully.`);
} catch (error) {
  console.error("Error removing connector:", error);
}

```

### Python SDK

```python
from nylas import Client

nylas = Client(
    "<NYLAS_API_KEY>",
    "<NYLAS_API_URI>",
)

provider = "google"

request = nylas.connectors.destroy(
    provider,
)

print(request)

```

### Ruby SDK

```ruby
require 'nylas'

nylas = Nylas::Client.new(
    api_key: "<NYLAS_API_KEY>",
)

connector = nylas.connectors.destroy(provider: "google")

puts connector

```

### Java SDK

```java
import com.nylas.NylasClient;
import com.nylas.models.*;

public class ListDraft {
    public static void main(String[] args) throws 
    NylasSdkTimeoutError, NylasApiError {
        NylasClient nylas = new NylasClient.Builder("<NYLAS_API_KEY>").build();

        DeleteResponse connector = 
        nylas.connectors().destroy(AuthProvider.GOOGLE);
        System.out.println(connector);
    }
}

```

### Kotlin SDK

```kotlin
import com.nylas.NylasClient
import com.nylas.models.AuthProvider

fun main(args: Array<String>) {

    val nylas: NylasClient = NylasClient(
        apiKey = "<NYLAS_API_KEY>"
    )

    val connector = 
    nylas.connectors().destroy(AuthProvider.GOOGLE)
    println(connector)
}

```
