> ## Documentation Index
> Fetch the complete documentation index at: https://bobprince-78964c2b.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Endpoints API

> Create and manage webhook capture endpoints

An endpoint is a unique URL that Hookdrop provides for capturing incoming webhooks. Every captured request is stored as an [event](/api-reference/events) you can inspect, search, and replay.

Your capture URL is built from the `public_token` returned when you create an endpoint:

```
https://hookdrop.dev/in/{public_token}
```

Point any webhook sender at that URL and Hookdrop will capture everything it receives.

***

## List all endpoints

`GET /api/endpoints`

Returns all endpoints belonging to your account.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://hookdrop.dev/api/endpoints \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```
</CodeGroup>

**Response**

```json theme={null}
[
  {
    "id": "ep_01hx9k2z3mq8p4j6n7r5st0vwu",
    "name": "Stripe payments",
    "public_token": "tok_abc123xyz",
    "is_active": true,
    "created_at": "2024-05-12T10:30:00.000Z"
  },
  {
    "id": "ep_01hx9k2z3mq8p4j6n7r5st0vwv",
    "name": "GitHub webhooks",
    "public_token": "tok_def456uvw",
    "is_active": true,
    "created_at": "2024-05-13T08:15:00.000Z"
  }
]
```

***

## Create an endpoint

`POST /api/endpoints`

Creates a new webhook capture endpoint and returns a `public_token` you use to build your capture URL.

<ParamField body="name" type="string" required>
  A label for this endpoint so you can identify it in your dashboard.
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://hookdrop.dev/api/endpoints \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Stripe payments"
    }'
  ```
</CodeGroup>

**Response**

<ResponseField name="id" type="string">
  Unique identifier for the endpoint. Use this in all subsequent API calls.
</ResponseField>

<ResponseField name="name" type="string">
  The label you provided.
</ResponseField>

<ResponseField name="public_token" type="string">
  Use this to build your capture URL: `https://hookdrop.dev/in/{public_token}`
</ResponseField>

<ResponseField name="is_active" type="boolean">
  Whether the endpoint is currently accepting incoming webhooks.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp of when the endpoint was created.
</ResponseField>

```json theme={null}
{
  "id": "ep_01hx9k2z3mq8p4j6n7r5st0vwu",
  "name": "Stripe payments",
  "public_token": "tok_abc123xyz",
  "is_active": true,
  "created_at": "2024-05-12T10:30:00.000Z"
}
```

Your capture URL for this endpoint is:

```
https://hookdrop.dev/in/tok_abc123xyz
```

***

## Get a single endpoint

`GET /api/endpoints/:id`

Returns details for one endpoint.

<ParamField path="id" type="string" required>
  The endpoint ID.
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl https://hookdrop.dev/api/endpoints/ep_01hx9k2z3mq8p4j6n7r5st0vwu \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```
</CodeGroup>

**Response**

```json theme={null}
{
  "id": "ep_01hx9k2z3mq8p4j6n7r5st0vwu",
  "name": "Stripe payments",
  "public_token": "tok_abc123xyz",
  "is_active": true,
  "created_at": "2024-05-12T10:30:00.000Z"
}
```

***

## Update an endpoint

`PATCH /api/endpoints/:id`

Updates the name or active status of an endpoint.

<ParamField path="id" type="string" required>
  The endpoint ID.
</ParamField>

<ParamField body="name" type="string">
  New label for the endpoint.
</ParamField>

<ParamField body="is_active" type="boolean">
  Set to `false` to stop capturing incoming webhooks without deleting the endpoint.
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://hookdrop.dev/api/endpoints/ep_01hx9k2z3mq8p4j6n7r5st0vwu \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Stripe payments (production)",
      "is_active": true
    }'
  ```
</CodeGroup>

**Response**

```json theme={null}
{
  "id": "ep_01hx9k2z3mq8p4j6n7r5st0vwu",
  "name": "Stripe payments (production)",
  "public_token": "tok_abc123xyz",
  "is_active": true,
  "created_at": "2024-05-12T10:30:00.000Z"
}
```

***

## Delete an endpoint

`DELETE /api/endpoints/:id`

Permanently deletes an endpoint and all its captured events. This action cannot be undone.

<ParamField path="id" type="string" required>
  The endpoint ID.
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE https://hookdrop.dev/api/endpoints/ep_01hx9k2z3mq8p4j6n7r5st0vwu \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```
</CodeGroup>

**Response**

Returns `204 No Content` on success.
