> Documentation index: https://docs.dev.repp.co.il/llms.txt - fetch it to find every page of these docs.

# Quickstart

## With your coding agent

Claude Code, Cursor, Codex or any agent that can read a web page: paste this prompt into it. It points the agent at the docs written for agents, and tells it where the key lives. You still make the key yourself (step 1 below): an agent never should.

```text
Connect this project to Repp's API.

- Start with the docs' index for agents: https://docs.dev.repp.co.il/llms.txt (every page is Markdown: add .md to its address).
- The OpenAPI 3.1 description is at https://api.dev.repp.co.il/v1/openapi.json.
- Read the API key from the environment variable REPP_API_KEY. Never write the key into code or commit it.
- Send it as "Authorization: Bearer <key>", and check it first with GET https://api.dev.repp.co.il/v1/me.
- An action needs a key made as "read and actions" and a new Idempotency-Key header for each action.
```

Want the agent to read Repp itself while it works - your calendar, the index? Add the [MCP server](https://docs.dev.repp.co.il/mcp.md) too; it asks you to sign in with your phone the first time.

```bash
claude mcp add --transport http repp https://api.dev.repp.co.il/mcp
```

## By hand

**1. Make a key.** Sign in to Repp - the [business site](https://studio.dev.repp.co.il/account?api=1) or the [trainer site](https://coach.dev.repp.co.il/account?api=1) - and open **החשבון שלי → מפתחות API**. Name the key, keep **קריאה בלבד** (read only) for now, and create it. It is shown once: copy it.

**2. Put it in the environment**, where your code reads it - never in the code itself.

```bash
export REPP_API_KEY="repp_…"
```

**3. Check the key.** [Status](https://docs.dev.repp.co.il/me.md) answers whose key it is: the account's business, its trainer, or both.

**cURL**

```bash
curl "https://api.dev.repp.co.il/v1/me" \
  -H "Authorization: Bearer $REPP_API_KEY"
```

**JavaScript**

```js
const response = await fetch("https://api.dev.repp.co.il/v1/me", {
  headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}` },
});
if (!response.ok) throw new Error((await response.json()).error.message);
const data = await response.json();
```

**TypeScript**

```ts
/** Whose key this is. */
interface Me {
  business: {
    id: string;
    name: string;
  } | null;
  trainer: {
    id: string;
    name: string;
    listed: boolean;
    looking_for_work: boolean;
    verified: boolean;
  } | null;
}

interface ApiError {
  error: { code: string; message: string; reason?: string };
}

const response = await fetch("https://api.dev.repp.co.il/v1/me", {
  headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}` },
});
if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message);
const data = (await response.json()) as Me;
```

**Python**

```python
import os

import requests

response = requests.get(
    "https://api.dev.repp.co.il/v1/me",
    headers={"Authorization": f"Bearer {os.environ['REPP_API_KEY']}"},
    timeout=30,
)
if not response.ok:
    raise RuntimeError(response.json()["error"]["message"])
data = response.json()
```

**PHP**

```php
<?php
$ch = curl_init("https://api.dev.repp.co.il/v1/me");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("REPP_API_KEY"),
    ],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($data["error"]["message"]);
}
```

```json
{
  "business": {
    "id": "7c1f6a52-3b8e-4d1a-9f0e-2a6b8c4d5e10",
    "name": "סטודיו נועה"
  },
  "trainer": null
}
```

**4. Read something real.** [What waits for me](https://docs.dev.repp.co.il/waiting.md) lists what waits for the account's own action - offers to choose from, space requests to answer, classes to rate - as the site's calendar page does.

**cURL**

```bash
curl "https://api.dev.repp.co.il/v1/waiting" \
  -H "Authorization: Bearer $REPP_API_KEY"
```

**JavaScript**

```js
const response = await fetch("https://api.dev.repp.co.il/v1/waiting", {
  headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}` },
});
if (!response.ok) throw new Error((await response.json()).error.message);
const data = await response.json();
```

**TypeScript**

```ts
/** What waits for the account's own action, as the site's "יומן" lists it. */
interface Waiting {
  business: {
    choose_offers: {
      class_id: string;
      style: Style;
      date: string;
      time: string;
      offers_waiting: number;
    }[];
    send_again: {
      class_id: string;
      style: Style;
      date: string;
      time: string;
    }[];
    bookings_to_answer: {
      booking_id: string;
      space: {
        id: string;
        name: string;
      };
      trainer_name: string | null;
      date: string;
      start_time: string;
      end_time: string;
      weekly: boolean;
    }[];
    classes_to_rate: {
      class_id: string;
      style: Style;
      date: string;
    }[];
  } | null;
  trainer: {
    classes_to_rate: {
      class_id: string;
      style: Style;
      date: string;
    }[];
    reports_to_answer: {
      class_id: string;
      reported_at: string;
    }[];
    offers_waiting: number;
    upcoming_classes: number;
  } | null;
}

/** A training style: one of the keys in Catalog. */
type Style =
  | "pilates"
  | "barre"
  | "strength"
  | "crossfit"
  | "trx"
  | "calisthenics"
  | "cardio"
  | "hiit"
  | "spinning"
  | "running"
  | "aqua"
  | "yoga"
  | "mobility"
  | "meditation"
  | "personal"
  | "martial_arts"
  | "boxing"
  | "krav_maga"
  | "dance"
  | "zumba"
  | "kids"
  | "seniors"
  | "other";

interface ApiError {
  error: { code: string; message: string; reason?: string };
}

const response = await fetch("https://api.dev.repp.co.il/v1/waiting", {
  headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}` },
});
if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message);
const data = (await response.json()) as Waiting;
```

**Python**

```python
import os

import requests

response = requests.get(
    "https://api.dev.repp.co.il/v1/waiting",
    headers={"Authorization": f"Bearer {os.environ['REPP_API_KEY']}"},
    timeout=30,
)
if not response.ok:
    raise RuntimeError(response.json()["error"]["message"])
data = response.json()
```

**PHP**

```php
<?php
$ch = curl_init("https://api.dev.repp.co.il/v1/waiting");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("REPP_API_KEY"),
    ],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($data["error"]["message"]);
}
```

> **Note:** A `401` means the key is missing or mistyped; a `429` means slow down for a minute. Every error has the same body: see [Errors](https://docs.dev.repp.co.il/errors.md).

## Next steps

- [Authentication](https://docs.dev.repp.co.il/authentication.md): The two kinds of key, and keeping one safe.
- [API reference](https://docs.dev.repp.co.il/trainers.md): Every endpoint, with its parameters, answer and errors.
- [Actions](https://docs.dev.repp.co.il/actions.md): Post a request, offer on a class, answer a space request.
- [MCP](https://docs.dev.repp.co.il/mcp.md): Connect Claude, ChatGPT or Cursor to Repp, with no code.
