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

# Quickstart

> Create an API key and make your first requests.

This guide takes you from no key to reading your opportunities. You need an Eloout organization
and the **admin** role in it.

**1. Create a key**

In Eloout, open **Settings → API keys** and create a key:

* **Key name**: the system that will use it, for example `ERP sync`.
* **Permissions**: for this guide, `opportunities:read` is enough. Grant only what your
  system needs; see [Authentication](https://docs.eloout.com/authentication.md).

Copy the key: it is shown only once.

**2. Load it into an environment variable**

Paste the key at the prompt; it is not echoed and does not reach your shell history:

```bash theme={null}
read -rsp 'Eloout API key: ' ELOOUT_API_KEY && export ELOOUT_API_KEY
```

In production, inject it from your secret manager instead. Keep the key out of your code.

**3. Check the key**

`GET /me` needs no permission and tells you which organization and permissions the key has:

```bash theme={null}
curl -s "https://app.eloout.com/api/v1/me" \
  -H "Authorization: Bearer $ELOOUT_API_KEY"
```

```json theme={null}
{
  "ok": true,
  "data": {
    "organization": { "id": "6f1d2c3b-4a59-4e6f-8a7b-9c0d1e2f3a4b", "name": "Acme" },
    "apiKey": {
      "id": "f5e6f7a8-9b0c-4e1f-8a3b-4c5d6e7f8a9b",
      "name": "ERP sync",
      "scopes": ["opportunities:read"],
      "legacy": false
    }
  }
}
```

**4. Read your opportunities**

```bash theme={null}
curl -s "https://app.eloout.com/api/v1/opportunities?limit=5" \
  -H "Authorization: Bearer $ELOOUT_API_KEY"
```

The answer lists up to five opportunities in `data.opportunities`. When there are more,
`data.nextCursor` is not `null`: pass it as `?cursor=` to get the next page.

## If something fails

| Answer | Fix |
| - | - |
| `401 UNAUTHENTICATED` | The key is missing, mistyped or revoked. Check the `Authorization: Bearer` header. |
| `403 FORBIDDEN` | The key lacks the permission in `details.requiredScope`. Create a key that has it. |
| `429 RATE_LIMITED` | Wait the seconds in `Retry-After`. |

See [Errors and rate limits](https://docs.eloout.com/errors.md) for every code.

## Next steps

* Browse every endpoint in the [API reference](https://docs.eloout.com/api-reference/introduction.md).
* Before retrying a write, read [Retrying writes](https://docs.eloout.com/errors.md#retrying-writes): it explains what
  `Idempotency-Key` replays and why you check the resource after a `500` or a timeout.


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