> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autosend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Webhook

> Retrieves a single webhook by its ID. The webhook must belong to the authenticated project. The signing secret is not included.

> [!NOTE]
>
> This endpoint accepts a **project API key** (`AS_` prefix). The signing secret is masked — use [Reveal Webhook Secret](https://docs.autosend.com/webhooks/reveal-webhook-secret) to retrieve it.

```bash cURL theme={null}
curl --request GET \
  --url https://api.autosend.com/v1/webhooks/60d5ec49f1b2c72d9c8b1234 \
  --header 'Authorization: Bearer AS_your-api-key'
```

```python Python theme={null}
import requests

webhook_id = "60d5ec49f1b2c72d9c8b1234"
url = f"https://api.autosend.com/v1/webhooks/{webhook_id}"

headers = {
    "Authorization": "Bearer AS_your-api-key"
}

response = requests.get(url, headers=headers)
print(response.json())
```

```javascript JavaScript theme={null}
const webhookId = '60d5ec49f1b2c72d9c8b1234';

fetch(`https://api.autosend.com/v1/webhooks/${webhookId}`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer AS_your-api-key'
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
```

```php PHP theme={null}
<?php

$webhookId = '60d5ec49f1b2c72d9c8b1234';
$url = "https://api.autosend.com/v1/webhooks/{$webhookId}";

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer AS_your-api-key'
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
```

```go Go theme={null}
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    webhookID := "60d5ec49f1b2c72d9c8b1234"
    url := "https://api.autosend.com/v1/webhooks/" + webhookID

    req, _ := http.NewRequest("GET", url, nil)
    req.Header.Set("Authorization", "Bearer AS_your-api-key")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        fmt.Println("Error:", err)
        return
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
```

```java Java theme={null}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class GetWebhook {
    public static void main(String[] args) {
        try {
            String webhookId = "60d5ec49f1b2c72d9c8b1234";
            URL url = new URL("https://api.autosend.com/v1/webhooks/" + webhookId);
            HttpURLConnection con = (HttpURLConnection) url.openConnection();

            con.setRequestMethod("GET");
            con.setRequestProperty("Authorization", "Bearer AS_your-api-key");

            BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
            String inputLine;
            StringBuilder content = new StringBuilder();
            while ((inputLine = in.readLine()) != null) {
                content.append(inputLine);
            }
            in.close();
            System.out.println(content.toString());

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
```

```ruby Ruby theme={null}
require 'net/http'
require 'uri'

webhook_id = '60d5ec49f1b2c72d9c8b1234'
uri = URI("https://api.autosend.com/v1/webhooks/#{webhook_id}")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)
request['Authorization'] = 'Bearer AS_your-api-key'

response = http.request(request)
puts response.body
```

```json 200 Response theme={null}
{
  "success": true,
  "data": {
    "id": "60d5ec49f1b2c72d9c8b1234",
    "organizationId": "60d5ec49f1b2c72d9c8b0000",
    "projectId": "60d5ec49f1b2c72d9c8b1111",
    "url": "https://example.com/webhooks/autosend",
    "secret": "***hidden***",
    "events": ["email.delivered", "email.bounced"],
    "isActive": true,
    "status": "active",
    "failureCount": 0,
    "lastFailedAt": null,
    "lastSuccessAt": "2026-06-12T10:00:00.000Z",
    "lastDeliveredAt": "2026-06-12T10:00:00.000Z",
    "metadata": { "team": "growth" },
    "createdAt": "2026-06-01T09:00:00.000Z",
    "updatedAt": "2026-06-12T10:15:00.000Z"
  }
}
```

***

#### Authorizations

**Authorizations** `string | header` *required*

Project API key header of the form Bearer `AS_<key>`.

### Path Parameters

**id** `string` *required*

The unique identifier of the webhook.

Example: `"60d5ec49f1b2c72d9c8b1234"`

#### Response

Webhook retrieved successfully (200)

**success** `boolean`

Indicates if the request was successful

**data** `object`

The webhook object. The signing secret is masked as `***hidden***`.

**child attributes**

**data.id** `string`

Unique webhook identifier

**data.organizationId** `string`

Organization the webhook belongs to

**data.projectId** `string`

Project the webhook is scoped to

**data.url** `string`

The destination URL events are delivered to

**data.secret** `string`

HMAC signing secret, always masked as `***hidden***` in this endpoint. Use [Reveal Webhook Secret](https://docs.autosend.com/webhooks/reveal-webhook-secret) to retrieve the actual value.

**data.events** `string[]`

The subscribed event types

**data.isActive** `boolean`

Whether the webhook is currently active

**data.status** `string`

Delivery status. One of `active`, `inactive`, or `disabled` (disabled due to too many failures)

**data.failureCount** `integer`

Number of consecutive delivery failures

**data.lastFailedAt** `string | null`

Timestamp of the most recent failed delivery (ISO 8601), or `null`

**data.lastSuccessAt** `string | null`

Timestamp of the most recent successful delivery (ISO 8601), or `null`

**data.lastDeliveredAt** `string | null`

Timestamp of the most recent delivery attempt (ISO 8601), or `null`

**data.metadata** `object | null`

Arbitrary key-value metadata attached to the webhook

**data.createdAt** `string`

ISO 8601 creation timestamp

**data.updatedAt** `string`

ISO 8601 last-updated timestamp

#### Error Responses

**404 - Webhook not found** `object`

Returned when no webhook with the given ID exists in the project.

```json theme={null}
{
  "success": false,
  "error": {
    "message": "Webhook not found",
    "code": "WEBHOOK_NOT_FOUND",
  }
}
```


## OpenAPI

````yaml GET /webhooks/{id}
openapi: 3.1.0
info:
  title: AutoSend API
  description: >-
    AutoSend REST API for managing project webhooks. These endpoints accept a
    project API key (AS_ prefix) and let you subscribe to email and contact
    events, inspect delivery logs, and test deliveries.
  version: 1.0.0
servers:
  - url: https://api.autosend.com/v1
security:
  - bearerAuth: []
paths:
  /webhooks/{id}:
    get:
      summary: Get Webhook
      description: >-
        Retrieves a single webhook by its ID. The webhook must belong to the
        authenticated project. The signing secret is not included.
components: {}

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.