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

# Destinations

Manage event destinations — where your webhooks get delivered.

Destinations define where events are delivered. hookstream supports 8 destination types: HTTP/Webhook, AWS SQS, AWS S3, AWS EventBridge, GCP Pub/Sub, Kafka (Confluent REST Proxy), RabbitMQ (HTTP Management API), and WebSocket. Each destination has its own retry policy, circuit breaker state, and dead letter queue.

Each destination has an automatic circuit breaker. When consecutive failures exceed the threshold, the circuit opens and deliveries pause. After a cooldown, a single test delivery is attempted (half-open). You can inspect and reset circuit state via the API below.

## List Destinations

GET `/v1/destinations`

List all destinations for the authenticated organization.

**Authentication:** API key or session cookie.

### Query Parameters

Cursor for pagination.

Number of results to return (max 100).

```bash cURL
curl https://hookstream.io/v1/destinations \
  -H "X-API-Key: $HOOKSTREAM_API_KEY"
```

```json 200 OK
{
  "destinations": [
    {
      "id": "dst_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7",
      "name": "Backend API",
      "type": "http",
      "url": "https://api.example.com/webhooks",
      "retry_max_attempts": 5,
      "retry_backoff_type": "exponential",
      "retry_intervals": [30, 300, 1800, 7200, 86400],
      "created_at": "2026-02-28T10:00:00Z"
    }
  ],
  "cursor": null,
  "has_more": false
}
```

## Create Destination

POST `/v1/destinations`

Create a new destination with delivery configuration and retry policy.

**Authentication:** API key or session cookie.

### Body Parameters

Display name for the destination.

URL-safe slug for the destination.

Provider type: `http`, `sqs`, `s3`, `eventbridge`, `pubsub`, `kafka`, `rabbitmq`, or `websocket`.

Destination URL (required for HTTP destinations).

HTTP method to use for delivery.

Custom headers to include with deliveries.

Provider-specific configuration. For SQS: `{ queue_url, region, access_key_id, secret_access_key }`. For S3: `{ bucket, region, ... }`.

Maximum retry attempts (1-10).

Retry backoff strategy: `exponential`, `linear`, or `fixed`.

Array of retry delay intervals in seconds. Default: `[30, 300, 1800, 7200, 86400]`.

```bash cURL
curl -X POST https://hookstream.io/v1/destinations \
  -H "X-API-Key: $HOOKSTREAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Backend API",
    "slug": "backend-api",
    "type": "http",
    "url": "https://api.example.com/webhooks",
    "headers": { "X-Custom": "value" },
    "retry_max_attempts": 5,
    "retry_backoff_type": "exponential",
    "retry_intervals": [30, 300, 1800, 7200, 86400]
  }'
```

```json 201 Created
{
  "id": "dst_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7",
  "name": "Backend API",
  "slug": "backend-api",
  "type": "http",
  "url": "https://api.example.com/webhooks",
  "retry_max_attempts": 5,
  "retry_backoff_type": "exponential",
  "retry_intervals": [30, 300, 1800, 7200, 86400],
  "created_at": "2026-03-01T12:00:00Z"
}
```

## Retrieve Destination

GET `/v1/destinations/:id`

Get a single destination by ID with its configuration.

**Authentication:** API key or session cookie.

```json 200 OK
{
  "id": "dst_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7",
  "name": "Backend API",
  "type": "http",
  "url": "https://api.example.com/webhooks",
  "retry_max_attempts": 5,
  "retry_backoff_type": "exponential",
  "retry_intervals": [30, 300, 1800, 7200, 86400],
  "delivery_count": 892,
  "created_at": "2026-02-28T10:00:00Z",
  "updated_at": "2026-03-01T08:30:00Z"
}
```

## Update Destination

PATCH `/v1/destinations/:id`

Update a destination. All fields are optional.

**Authentication:** API key or session cookie.

```bash cURL
curl -X PATCH https://hookstream.io/v1/destinations/dst_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7 \
  -H "X-API-Key: $HOOKSTREAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Backend API v2", "retry_max_attempts": 10}'
```

```json 200 OK
{
  "id": "dst_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7",
  "name": "Backend API v2",
  "type": "http",
  "retry_max_attempts": 10,
  "updated_at": "2026-03-01T15:00:00Z"
}
```

## Delete Destination

DELETE `/v1/destinations/:id`

Delete a destination and stop all pending deliveries.

**Authentication:** API key or session cookie.

```json 200 OK
{ "success": true }
```

## List Destination Templates

GET `/v1/destinations/templates`

List pre-configured destination templates (Slack, Discord, PagerDuty, etc.).

**Authentication:** API key or session cookie.

```json 200 OK
{
  "templates": [
    {
      "id": "slack",
      "name": "Slack",
      "type": "http",
      "description": "Send webhook events to a Slack channel via Incoming Webhook URL.",
      "config_template": { "url": "" }
    },
    {
      "id": "discord",
      "name": "Discord",
      "type": "http",
      "description": "Post webhook events to a Discord channel webhook.",
      "config_template": { "url": "" }
    }
  ]
}
```

## Get Circuit Breaker Status

GET `/v1/destinations/:id/circuit`

Get the circuit breaker status for a destination (`closed`, `open`, or `half_open`).

**Authentication:** API key or session cookie.

```json 200 OK
{
  "destination_id": "dst_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7",
  "state": "closed",
  "failure_count": 0,
  "last_failure_at": null,
  "opened_at": null
}
```

## Reset Circuit Breaker

POST `/v1/destinations/:id/circuit/reset`

Manually reset the circuit breaker to closed state, allowing deliveries to resume.

**Authentication:** API key or session cookie.

```bash cURL
curl -X POST https://hookstream.io/v1/destinations/dst_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7/circuit/reset \
  -H "X-API-Key: $HOOKSTREAM_API_KEY"
```

```json 200 OK
{
  "destination_id": "dst_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7",
  "state": "closed",
  "failure_count": 0
}
```