# Getting started

## Intended use

The YOGO API is available as an add-on to all customers on the **Studio**
and **Studio+App** plans. Clients without an appropriate plan receive a
`403 Forbidden` response even with a valid API key.

You can use it to extract data into your own systems, or to integrate with
third-party services. Examples include:

- Exporting customer data to your CRM or email marketing platform
- Analyzing booking and attendance data in your BI tools
- Managing teacher schedules by assigning teachers to classes from an external scheduler


## Base URL

The API is available at:


```
https://api.yogobooking.com
```

All endpoints in the API reference (see the sidebar) should be prefixed
with this base URL. For example:


```
GET https://api.yogobooking.com/customers
```

## Quick start

1. Get an API key from your YOGO admin module (Settings → API keys).
2. Authenticate every request with the [`X-API-KEY` header](/guides/authentication).
3. Most list endpoints use [cursor-based pagination](/guides/pagination).
4. Be aware of the [rate limits](/guides/rate-limiting) — 100 requests per minute
per client.


A minimal first call:


```bash
curl https://api.yogobooking.com/customers \
  -H "X-API-KEY: your_api_key_here"
```

## Date and time inputs

Endpoints that take a `from`/`to` date range (`/bookings`, `/classes`,
`/write-logs`) accept three input shapes:

| Format | Example | Interpretation |
|  --- | --- | --- |
| Keyword | `today`, `yesterday`, `tomorrow` | Calendar day in the studio timezone. `from` rounds to start-of-day; `to` to end-of-day. |
| Keyword offset | `+14d`, `-7d`, `+1w`, `-2w`, `+1m`, `-3m` | Calendar offset from today. Bounded to roughly ±2 years; for ranges further out use an explicit ISO date. |
| Date-only | `2026-05-15` | Calendar day in the studio timezone, rounded to start- or end-of-day. |
| Full ISO datetime | `2026-05-15T10:00:00+02:00`, `2026-05-15T08:00:00Z` | Used as-is when an offset is present; interpreted in the studio timezone otherwise. |


A typical "show me classes for the next two weeks" request:


```bash
curl 'https://api.yogobooking.com/classes?from=today&to=%2B14d' \
  -H "X-API-KEY: your_api_key_here"
```

(Note `%2B` is the URL-encoded `+`. In a JSON body, scripted call, or
client SDK you can pass `+14d` literally.)

Offsets are calendar-aware — `+1m` is "the same day-of-month next month",
not 30 days. Daylight-saving transitions in the studio timezone are
handled correctly: a range that crosses a DST boundary doesn't gain or
lose an hour.