# Delete a callback URI

> **DELETE** `https://api.us.nylas.com/v3/applications/redirect-uris/{id}`

Source: https://developer.nylas.com/docs/reference/api/applications/delete_callback_uri/

Deletes the specified callback URI.

**Authentication:** NYLAS_API_KEY

## Parameters

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | 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/applications/redirect-uris/<CALLBACK_URI_ID>' \
  --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>",
});

async function deleteRedirectUriId() {
  try {
    const response = await nylas.applications.redirectUris.destroy({
      redirectUriId: "<CALLBACK_URI_ID>",
    });

    console.log("Callback URI deleted:", response);
  } catch (error) {
    console.error("Couldn't delete callback URI:", error);
  }
}

deleteRedirectUriId();

```

### Python SDK

```python
from nylas import Client

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

response = nylas.applications.redirect_uris.destroy(
    redirect_uri_id="<CALLBACK_URI_ID>",
)

print(response)

```

### Ruby SDK

```ruby
# frozen_string_literal: true

require 'nylas'

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

redirect_uris = nylas.applications.redirect_uris.destroy(redirect_uri_id: "<CALLBACK_URI_ID>")

puts redirect_uris
```

### Java SDK

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

public class DeleteApplicationURIs {
    public static void main(String[] args) throws 
    NylasSdkTimeoutError, NylasApiError {

        NylasClient nylas = new NylasClient.Builder("<NYLAS_API_KEY>").build();

        DeleteResponse redirect_uris = 
        nylas.applications().redirectUris().destroy("<REDIRECT_URI>");
        System.out.println(redirect_uris);
    }
}

```

### Kotlin SDK

```kotlin
import com.nylas.NylasClient

fun main(args: Array<String>) {

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

    val redirecturis = nylas.applications().redirectUris().destroy("<REDIRECT_URIS>")
    print(redirecturis)
}

```
