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

# Events API

> Publish and inspect events.

# Events API

## Publish event

```http theme={null}
POST /v1/events
```

Creates an event, matches subscribed endpoints, creates deliveries, and queues delivery work.

### Headers

```http theme={null}
Authorization: Bearer praeto_live_...
Idempotency-Key: order-123-created
Content-Type: application/json
```

### Request body

```json theme={null}
{
  "event_type": "order.created",
  "payload": {
    "order_id": "ord_123",
    "customer_id": "cus_456"
  }
}
```

### Response

```json theme={null}
{
  "ok": true,
  "event_id": "811fad9a-d2cb-4dd2-a2e1-9bb5d90190db",
  "tenant_id": "default",
  "idempotency_key": "order-123-created",
  "endpoint_count": 4,
  "queued_delivery_count": 4,
  "delivery_ids": [
    "d904b72a-58c5-42c0-8eaa-7f4403ec77e8"
  ]
}
```

## Get event

```http theme={null}
GET /v1/events/{event_id}
```

## Get event deliveries

```http theme={null}
GET /v1/events/{event_id}/deliveries
```
