# Requests & responses

URL: https://api-docs.vestta.io/requests

Base URL, formats and conventions shared by every endpoint of the Vestta API.

## Base URL

All endpoints live under one base URL:

```text
https://api.vestta.io/v1
```

The former host, `https://api.vestta.app/v1`, keeps answering the same requests, so existing integrations do not need to change at once.

Paths in this documentation are shown in full — for example `GET /v1/properties` — so they can be pasted after the host. The `v1` segment is the API version; breaking changes would ship under a new version and be announced in the [changelog](/changelog).

## Requests

- Use HTTPS. Request and response bodies are JSON encoded as UTF-8.
- Send `Content-Type: application/json` with every `POST` body.
- Query parameters are case-sensitive. Unknown query parameters are ignored.
- Authenticate every request with your key — see [Authentication](/authentication).

## Responses

Successful responses have status `200` and carry `"status": "ok"`. Responses that read data put it in `data`:

```json
{
  "status": "ok",
  "data": [ … ],
  "count": 78,
  "limit": 20,
  "offset": 0,
  "authenticated_as": "Inmobiliaria Ejemplo"
}
```

`authenticated_as` is the name of the workspace that owns the key — useful in logs when one service talks to several workspaces.

Errors use a different shape, with a `detail` field. See [Errors](/errors).

## Data conventions

| Kind | Convention |
| --- | --- |
| IDs | Integers, unique per resource: `"id": 1355`. |
| Timestamps | ISO 8601 with UTC offset: `"2026-09-26T19:38:41.390976+02:00"`. |
| Money | Numbers in euros, without currency symbols. |
| Phone numbers | E.164: `"+34600111222"`. |
| Missing values | Fields without a value are usually **omitted** rather than returned as `null`. Treat a missing field as `null`. |
| Vocabulary | Business values are stored in Spanish, as in the Vestta app: `venta`, `alquiler`, `disponible`, `demandante`. Each field's values are listed in the reference. |

Build integrations that **ignore fields they do not know**. New fields can be added to responses without a new API version.

## Caching

Responses are sent with `Cache-Control: no-store`: they always reflect the current state of the workspace and must not be cached by proxies. If you cache on your side — for example to render a listings page — keep the cache per workspace and refresh it periodically.

## Rate limits

The default quota is **300 requests per API key per 60-second window**. The window starts with the first request that counts toward the quota. Requests made with the same key share that quota across all endpoints and calling IPs. Requests that fail API key authentication do not consume it.

If the quota is exhausted, the API returns `429 Too Many Requests`. `Retry-After` gives the seconds until the quota resets. Wait that long before retrying. Cache listings on your server and avoid polling in tight loops. See [Errors](/errors#retry-rules) for retry guidance.

## OpenAPI

The full contract is published as OpenAPI 3.1 at [`/openapi.json`](/openapi.json). It is the same schema the reference pages of this site are generated from, so you can import it into Postman, Insomnia or a client generator and get exactly what is documented here.
