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

# Quick Start

> Send your first event through EldrStream in under five minutes

This guide walks you through creating an account, retrieving your API key, registering a webhook, and sending your first event.

***

## Step 1 — Create an account

### Free (sandbox) account

No email or password required. A temporary account and credentials are generated for you.

```bash theme={null}
curl -X POST https://api.eldrstream.com/v1/tenants \
  -H "Content-Type: application/json" \
  -d '{"tier": "free"}'
```

**Response**

```json theme={null}
{
  "tenant_id": "a3f8bc1d2e",
  "tier": "free",
  "name": "sandbox-4a2c9f71",
  "email": "anonymous-4a2c9f71@eldrstream.internal",
  "password": "xK9pQr7mA1@"
}
```

Save the `tenant_id` and `password` — you will need them to log in.

***

## Step 2 — Log in and get a session token

```bash theme={null}
curl -X POST https://api.eldrstream.com/v1/tenants/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "loginId": "a3f8bc1d2e",
    "password": "xK9pQr7mA1@"
  }'
```

**Response**

```json theme={null}
{
  "status": "authenticated",
  "token": "eyJhbGciOiJ...",
  "tenant_id": "a3f8bc1d2e",
  "tenant_name": "sandbox-4a2c9f71",
  "tier": "free"
}
```

The `token` is a JWT valid for **2 hours**. Use it as a Bearer token for all management API calls.

***

## Step 3 — Retrieve your API key

```bash theme={null}
curl https://api.eldrstream.com/v1/tenants/api-keys \
  -H "Authorization: Bearer <token>"
```

**Response**

```json theme={null}
[
  {
    "id": "a3f8bc1d2e",
    "key": "eldr_sk_9f4c2a...",
    "is_active": true,
    "created_at": "2025-01-15T10:30:00Z",
    "last_used": null
  }
]
```

Your API key (`eldr_sk_...`) authenticates event ingestion requests.

***

## Step 4 — Register a webhook endpoint

```bash theme={null}
curl -X PUT https://api.eldrstream.com/v1/tenants/webhooks \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "name": "My Webhook",
      "webhook_url": "https://example.com/hooks/eldrstream"
    }
  ]'
```

EldrStream will deliver all your events to this URL. If you do not have a publicly reachable endpoint yet, use a service like [webhook.site](https://webhook.site) for testing.

***

## Step 5 — Send your first event

Use your API key in the `Authorization` header to ingest an event:

```bash theme={null}
curl -X POST https://api.eldrstream.com/v1/ingest \
  -H "Authorization: Bearer eldr_sk_9f4c2a..." \
  -H "Content-Type: application/json" \
  -d '{
    "payload": {
      "event_type": "order.created",
      "order_id": "ORD-1001",
      "amount": 4999
    }
  }'
```

**Response**

```json theme={null}
{
  "status": "accepted",
  "eventId": "evt_01J8ZXQY5H..."
}
```

A `202 Accepted` response means the event has been received and queued for delivery. EldrStream will dispatch it to your webhook endpoint, retrying automatically on failure.

***

## Next steps

* [Core Concepts](./core-concepts.md) — Understand event states, replay, and delivery guarantees
* [API Reference](./api/) — Explore all available endpoints
* [Security & Signing](./security.md) — Verify that webhook deliveries genuinely come from EldrStream
