# Requests and responses

The base URL, request format and response format used by every endpoint.

## Base URL

```text
https://backend.estactics.com/api
```

Each endpoint adds its own path, for example `/clients/search`.

## Requests

Most endpoints use `POST` with a JSON body, even the ones that only read data. Lists of fixed values use `GET`. Each page in the [API reference](/reference) shows the method to use.

Send these headers with every request:

```text
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## Successful responses

A successful request returns status `200` and this shape. `data` holds the result, and it can be an object, a list or a number depending on the endpoint.

```json
{
  "success": true,
  "data": { "id": 1042 }
}
```

If something goes wrong, see [Errors](/docs/errors).

## Your organization

Your API key already identifies your organization. You never need to send an organization ID, and every result is limited to your own data.
