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

# Authentication

> All API requests require a Bearer token.

## Get your API key

API keys are managed from your dashboard.

Go to **Dashboard → Settings → API Keys** at [www.majarrah.io/ar/dashboard/settings/api-keys](https://www.majarrah.io/ar/dashboard/settings/api-keys) and click **New key**. Each key is tied to your workspace's decision balance.

<Warning>
  Keep your API key secret. Never expose it in client-side code or public repositories.
</Warning>

## Using your key

Pass the key as a Bearer token in the `Authorization` header on every request.

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Example

```bash theme={null}
curl -X POST https://api.majarrah.io/v1/decisions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "property": {
      "type": "apartment",
      "price": 850000,
      "area": 95,
      "bedrooms": 2,
      "bathrooms": 2,
      "floor": 8
    },
    "location": {
      "city": "Al Khobar",
      "district": "Al Corniche"
    },
    "reasoning": false
  }'
```

## Decision balance

Every API key is tied to your workspace's decision balance. You can check your remaining balance in the response of any `/decisions` call via `decisions_remaining`, or from **Dashboard → Settings → API Credits**.

When your balance reaches zero, all requests return `402 insufficient_decisions` until you top up.
