# Quickstart

Create a key, make your first request and read a paginated list.

Guide 5 min

## Create a key

In ByDomu, go to Settings › API Keys. For your website, a **publishable** key (`domu_pk_live_`); for a server, a **secret** key (`domu_sk_live_`). Read-only secret keys come with Inmobiliaria Pro and Enterprise, at 60 requests per minute. The full key is shown only once: keep it in an environment variable.

```bash
export BYDOMU_API_KEY="domu_sk_live_…"
```

## Your first request

`GET /me` needs no permission: it tells you which agency the key belongs to, its plan and its permissions.

```bash
curl https://api.bydomu.com/v1/me \
  -H "X-API-Key: $BYDOMU_API_KEY"
```

**Response · 200 · example**

```json
{
  "data": {
    "apiKeyId": "clx1key001",
    "organization": { "id": "clx1org001", "plan": "BUSINESS", "isActive": true },
    "scopes": ["portal:read", "contacts:read"],
    …
  }
}
```

## Read a list

Lists are paginated with page and pageSize and include meta.total and meta.totalPages. Contacts need contacts:read.

```bash
curl -G https://api.bydomu.com/v1/contacts \
  -H "X-API-Key: $BYDOMU_API_KEY" \
  -d page=1 -d pageSize=20
```

## If something fails

- **401** The X-API-Key header is missing or the key is invalid (the API doesn’t accept Authorization: Bearer).
- **403** The key lacks the permission, is a secret key used from a browser, or the account’s level doesn’t allow it.
- **429** You went over the per-minute limit. Wait the seconds in Retry-After.
