# Your first REST request

Start with a read. It verifies authentication without changing workspace data.

## cURL

```bash
curl --request GET \
  --url https://api.viralmaxing.com/api/analytics/accounts/ \
  --header "X-API-Key: $VIRALMAXING_API_KEY" \
  --header "Accept: application/json"
```

## Server-side JavaScript

```js
const response = await fetch('https://api.viralmaxing.com/api/analytics/accounts/', {
  headers: {
    Accept: 'application/json',
    'X-API-Key': process.env.VIRALMAXING_API_KEY,
  },
});

if (!response.ok) {
  throw new Error(`Viralmaxing API returned ${response.status}`);
}

const accounts = await response.json();
```

## Interpret the response

- `200` means the request succeeded;
- `400` points to invalid parameters or a business constraint;
- `401` requires a valid key;
- `403` points to an insufficient workspace role;
- `429` requires a delay before retrying.

Do not retry an unchanged request after `400`. Read the error body and correct the parameters. Use increasing backoff for `429`.

All available paths and response schemas are in [API Reference](https://docs.viralmaxing.com).
