# Get the destinations for an application by webhook ID

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

Source: https://developer.nylas.com/docs/reference/api/webhook-notifications/get-webhook-by-id/

Get the webhook destinations for an application ID by webhook ID

**Authentication:** NYLAS_API_KEY

## Parameters

### Path parameters

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

## Responses

### 200 - The destinations matching the query

- `data` (object)
  - `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 webhook 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.
  - `status_updated_at` (integer) - The time the `status` field was last updated, represented as a Unix timestamp in seconds.
  - `created_at` (integer) - The time the webhook destination was created, represented as a Unix timestamp in seconds.
  - `updated_at` (integer) - The time the webhook destination was last updated, represented as a Unix timestamp in seconds.
- `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/<WEBHOOK_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 fetchWebhookById() {
  try {
    const webhook = await nylas.webhooks.find({
      webhookId: "<WEBHOOK_ID>",
    });

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

fetchWebhookById();

```

### Python SDK

```python
from nylas import Client

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

message = nylas.webhooks.find(
    "<WEBHOOK_ID>",
)

print(message)

```

### Ruby SDK

```ruby
require 'nylas'

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

webhook = nylas.webhooks.find(webhook_id: "<WEBHOOK_ID>")
puts webhook

```

### 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();

        Response<Webhook> webhook = nylas.webhooks().find("<WEBHOOK_ID>");
        System.out.println(webhook.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().find("<WEBHOOK_ID>")
    println(webhooks.data)
}

```
