# Get destinations for an application

> **GET** `https://api.us.nylas.com/v3/webhooks`

Source: https://developer.nylas.com/docs/reference/api/webhook-notifications/get-webhook-destinations-application/

Get a list of all webhook destinations for an application id.

**Authentication:** NYLAS_API_KEY

## Responses

### 200 - List of destinations for an application.

- `data` (array)
  - `id` (string) - A unique identifier for the webhook destination.
  - `description` (string) - A human-readable description of the webhook destination.
  - `trigger_types` (array) - The event that triggers the notification. See the
[notification schemas](/docs/reference/notifications/) for details about each trigger
type.

See the [Grants](/docs/reference/api/manage-grants/), [Calendar](/docs/reference/api/calendar/),
[Events](/docs/reference/api/events/), and [Messages](/docs/reference/api/messages/) references
for information on how to trigger each event type.
  - `webhook_url` (string) - The URL to send webhooks to.
  - `status` (string) - The status of the new destination.
  - `notification_email_addresses` (array) - The email addresses that Nylas notifies when a webhook is down for a while. See
[Failing and failed webhooks](/docs/v3/notifications/#failing-and-failed-webhooks) for
details.
  - `compressed_delivery` (boolean) - If `true`, Nylas compresses notification payloads using gzip before delivering them.
- `request_id` (string) - The ID for each request.

### 400 - Destination not returned

- `error` (object)
  - `type` (string) - An alphanumeric code that represents the error type.
  - `message` (string) - A human readable message with details about the error.
- `request_id` (string) - The ID for each request.

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.us.nylas.com/v3/webhooks' \
  --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 listWebhooks = async () => {
  try {
    const webhooks = await nylas.webhooks.list({});

    console.log("webhooks:", webhooks);
  } catch (error) {
    console.error("Error fetching webhooks:", error);
  }
};

listWebhooks();

```

### Python SDK

```python
from nylas import Client

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

webhooks = nylas.webhooks.list()

print("webhooks:", webhooks)

```

### Ruby SDK

```ruby
require 'nylas'

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

webhooks = nylas.webhooks.list()
puts webhooks

```

### Java SDK

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

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

        ListResponse<Webhook> webhooks = nylas.webhooks().list();
        System.out.println(webhooks.getData());
    }
}

```

### Kotlin SDK

```kotlin
import com.nylas.NylasClient

fun main(args: Array<String>){

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

    val webhooks = nylas.webhooks().list()
    println(webhooks.data)
}

```
