# Repp API Reference --- > REST reference · v2. --- # Introduction Repp is the arena of the fitness world: businesses find substitute trainers and rent out their empty spaces, and trainers find work and a place to train. This API reads the same index anyone can browse on the site, and an account's own [Calendar](https://docs.dev.repp.co.il/calendar.md) and [Requests](https://docs.dev.repp.co.il/requests.md). Most endpoints read (`GET`). A few [Actions](https://docs.dev.repp.co.il/actions.md) change something, as the same step on the site would: post a request, offer on a class, answer a space request, rate, switch "looking for work". **No endpoint moves money, with one exception**: none pays, books, chooses an offer, cancels or charges a card, and only declining a space request refunds the trainer by the site's rules, as declining it on the site does. > **Note:** New here? The [Quickstart](https://docs.dev.repp.co.il/quickstart.md) makes your first call in a few minutes. The public index needs no key; an account's endpoints need one, and actions need a key that may act (see [Authentication](https://docs.dev.repp.co.il/authentication.md)). Using an AI assistant - Claude, ChatGPT, Cursor? Connect it to Repp's [MCP server](https://docs.dev.repp.co.il/mcp.md) and it reads the same things, with no code, and acts only if you allow it. Building software that fitness businesses run on? [Repp Embed](https://docs.dev.repp.co.il/partners.md) puts Repp inside your product: a floating button and a panel where a business finds substitute trainers and rents out its rooms. Reading this with an agent? Every page is also published as Markdown: append `.md` to its address - https://docs.dev.repp.co.il/trainers.md - or read everything at once at https://docs.dev.repp.co.il/llms-full.txt. Start at https://docs.dev.repp.co.il/llms.txt. The OpenAPI 3.1 file is at https://api.dev.repp.co.il/v1/openapi.json. --- # 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 ", 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 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 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. --- # Authentication Send the key **in the `Authorization` header only**, as a bearer token. A key sent any other way is ignored, and the request is treated as if it had none. **Headers** | Header | Required | Meaning | | --- | --- | --- | | `Authorization` | For account endpoints | `Bearer repp_…` - your personal key. The public index ignores it, and counts the call against the limit without a key. | | `Content-Type` | For actions with a body | `application/json`. | | `Idempotency-Key` | For actions, recommended | Any text up to 200 characters, one per action: a repeat gets the first answer. See [Actions](https://docs.dev.repp.co.il/actions.md). | ## Two kinds of key **Kinds of key** | Kind | On the site | What it may do | | --- | --- | --- | | Read only (the default) | קריאה בלבד | Every `GET`. An action answers `403 read_only_key`. | | Read and actions | קריאה ופעולות | Every `GET`, and the [Actions](https://docs.dev.repp.co.il/actions.md). Still never moves money. | You pick the kind when you make the key, and it stays that kind: to change it, make a new key and revoke the old one. Keys made before actions existed are read only. ```bash curl "https://api.dev.repp.co.il/v1/me" \ -H "Authorization: Bearer $REPP_API_KEY" ``` ## Getting 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 after the system that will use it, choose **קריאה בלבד** (read only) or **קריאה ופעולות** (read and actions), and create it. **The key is shown once**: we keep only its fingerprint (SHA-256), so neither you nor we can see it again. - Up to 5 live keys per account, and 10 new ones a day. Use one key per system, so you can revoke one without stopping the rest. - Revoke a key on the same page; it stops working at once. The keys of a closed or blocked account stop working too. > **Warning:** A key opens what its account sees: names, addresses and amounts, and a read-and-actions key can act as the account. Keep it on a server - never in a web page, a mobile app or a Git repository - and make it read only unless the system really acts. ## Apps that sign in (OAuth) An AI app that connects to the [MCP server](https://docs.dev.repp.co.il/mcp.md) signs in instead of holding a key. It asks for the scope `repp.read` to read, and `repp.write` beside it to act; the consent screen lists what it will be able to do apart from what it reads, with a tick for actions that is off by default, and the app may act only when it asked for `repp.write` and you ticked it. --- # Conventions Every endpoint is under `https://api.dev.repp.co.il/v1`. Every answer is JSON in UTF-8. - Field names are `snake_case`. Ids are UUIDs. - Amounts are **whole shekels** (ILS). - Dates are `YYYY-MM-DD` and times `HH:MM` (24 hours), both in Israel (Asia/Jerusalem). Exact moments are ISO 8601 with their offset (`starts_at`). - Names and the catalog's labels are Hebrew, as they are stored. A success answers `200` with the resource itself (`201` when an action makes something): an object, or a page `{ items, more }`. A failure answers with its status (see [Errors](https://docs.dev.repp.co.il/errors.md)) and this body: ```json { "error": { "code": "bad_key", "message": "המפתח לא תקין, בוטל, או שהחשבון נסגר." } } ``` An action's body is one JSON object sent with `Content-Type: application/json`. A field the endpoint does not know is refused (`400 bad_body`), so a typo is never a silent default. CORS is open to every origin: the API never uses cookies. Answers of the public index may be cached for 30 seconds; an account's answers are `private, no-store`. The version is in the path. A new field may appear in an answer, and a new key in a fixed list of the catalog (a training style), without notice; a change that breaks code comes only with a new version. --- # Pagination The index's lists ([Trainers](https://docs.dev.repp.co.il/trainers.md), [Open classes](https://docs.dev.repp.co.il/open-classes.md), [Spaces](https://docs.dev.repp.co.il/spaces.md)) come in pages of **60**. Ask for up to **100** with `limit`, and for the next page with `offset` (up to 5000). `more: true` means there is another page. ```text GET /v1/trainers?limit=20&offset=20 ``` The account's endpoints are not paginated: the calendar is bounded by its date range (124 days at most), and the requests by time (from 30 days ago on). --- # Actions An action does exactly what the same step does on the site, under the site's own rules: the account sees it there, and the other side is notified as if it was done on the site. Each one is marked **Changes something** in its section. **Actions** | Endpoint | What it does | MCP tool | | --- | --- | --- | | [`PUT /v1/me/looking-for-work`](https://docs.dev.repp.co.il/looking-for-work.md) | Looking for work | `set_looking_for_work` | | [`POST /v1/open-classes/{id}/offer`](https://docs.dev.repp.co.il/offer.md) | Offer on a class | `offer_on_class` | | [`DELETE /v1/open-classes/{id}/offer`](https://docs.dev.repp.co.il/withdraw-offer.md) | Take an offer back | `withdraw_offer` | | [`POST /v1/requests`](https://docs.dev.repp.co.il/post-request.md) | Post a request | `post_request` | | [`POST /v1/bookings/{id}/decision`](https://docs.dev.repp.co.il/booking-decision.md) | Answer a space request | `decide_booking` | | [`POST /v1/ratings`](https://docs.dev.repp.co.il/rate.md) | Rate | `rate` | > **Note:** **No action moves money, with one exception.** No key can pay, book a space, choose an offer, cancel or charge a card: those stay on the site. The exception: declining a space request refunds the trainer by the site's rules, as declining it on the site does. ## Who may act Only a **read-and-actions** key (see [Authentication](https://docs.dev.repp.co.il/authentication.md)), or an app signed in with `repp.write`. Any other key gets `403 read_only_key` (over [MCP](https://docs.dev.repp.co.il/mcp.md), the spec's `403 insufficient_scope`). An action for a business with a key whose account has no business gets `403 not_a_business`, and one for a trainer `403 not_a_trainer`. ## Sending it once: Idempotency-Key - Send an `Idempotency-Key` header with every action: any text up to 200 characters, a new one per action (a UUID is good). - **A repeat gets the first answer**: if the network drops and you send the same action with the same key again, it is done once and you get what the first one answered. - The same key with a **different** action (another endpoint) answers `409 idempotency_conflict`, and nothing is done. - On the same endpoint the first answer comes back **whatever the body**: never reuse a key for a new action. - A key is remembered per API key. Without the header every request is a new action. ```bash IDEMPOTENCY_KEY=$(uuidgen) # send the same one again to retry this action curl -X PUT "https://api.dev.repp.co.il/v1/me/looking-for-work" \ -H "Authorization: Bearer $REPP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ -d '{ "on": true }' ``` ## Limits **30 actions a minute** per key (`429 too_many_requests`, `Retry-After: 60`) and **200 a day** (`429 too_many_actions`; reads go on). Actions count toward the key's 120 requests a minute too. See [Rate limits](https://docs.dev.repp.co.il/rate-limits.md). ## When the site says no An action the site's rules refuse answers `409 action_refused`, with the site's own refusal in `reason` - a fixed `snake_case` word such as `class_not_available`, `already_offered` or `booking_not_available`. Branch on `reason`; the `message` is for people. ```json { "error": { "code": "action_refused", "message": "האתר לא אישר את הפעולה. הסיבה כתובה ב-reason.", "reason": "class_not_available" } } ``` **Errors of actions** | Status | Code | Meaning | | --- | --- | --- | | 403 | `read_only_key` | The key only reads. Actions need a key made with "read and actions" (or an app signed in with the scope repp.write). | | 400 | `bad_body` | The request body is not a JSON object (or a field in it is missing or malformed). The message names it. | | 409 | `action_refused` | The site's own rules refused the action; `reason` says which (for example class_not_available, already_offered, booking_not_available). | | 409 | `idempotency_conflict` | The Idempotency-Key was already used by this key for a different action. | | 429 | `too_many_actions` | The key ran 200 actions in the last 24 hours. Reads still work. | --- # Rate limits **Limits** | Caller | Limit | | --- | --- | | An account's endpoints, with a key | 120 requests a minute per key | | Actions, on top of that | 30 actions a minute per key | | Actions in a day | 200 actions in 24 hours per key (`429 too_many_actions`; reads go on) | | The public index, with or without a key | 60 requests a minute per address | | Any caller | 600 requests a minute per address, keys included | Over a minute's limit the answer is `429 too_many_requests` with `Retry-After: 60`. Wait a minute and go on. Over the day's actions the answer is `429 too_many_actions`: actions wait for tomorrow, reads go on. --- # Errors **Errors** | Status | Code | Meaning | | --- | --- | --- | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 403 | `not_a_business` | The endpoint is for businesses and the key's account has none. | | 400 | `bad_parameter` | A parameter is not one the endpoint accepts. The message names it. | | 400 | `bad_range` | `to` is before `from`, or the range is longer than 124 days. | | 404 | `not_found` | No such endpoint, or no such item for this caller. | | 405 | `method_not_allowed` | The address does not take this method. The Allow header lists the ones it takes. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | | 403 | `read_only_key` | The key only reads. Actions need a key made with "read and actions" (or an app signed in with the scope repp.write). | | 403 | `not_a_trainer` | The endpoint is for trainers and the key's account has no trainer profile. | | 400 | `bad_body` | The request body is not a JSON object (or a field in it is missing or malformed). The message names it. | | 409 | `action_refused` | The site's own rules refused the action; `reason` says which (for example class_not_available, already_offered, booking_not_available). | | 409 | `no_place` | The business has no saved place yet: it is set once on the site ("העסק שלי"). | | 409 | `idempotency_conflict` | The Idempotency-Key was already used by this key for a different action. | | 429 | `too_many_actions` | The key ran 200 actions in the last 24 hours. Reads still work. | `message` is a short line in Hebrew for people. Branch on `code`, never on `message`. --- # MCP Repp runs an [MCP](https://modelcontextprotocol.io) server at `https://api.dev.repp.co.il/mcp` (Streamable HTTP). Connect it to Claude, ChatGPT, Cursor or any MCP client, and the assistant can answer "who is free to teach yoga in Gush Dan on Tuesday?" or "what is on my calendar this week?" by itself. Its tools mirror the API one to one: each takes the endpoint's parameters (and an action's body fields) and answers the same JSON. Most only read. The tools that act change what their endpoint changes, say so in their description and are marked `readOnlyHint: false`, so the app asks you before calling them. **No tool moves money**, with one exception: declining a space request refunds the trainer by the site's rules (`decide_booking`), as declining it on the site does. **Tools** | Tool | Mirrors | Needs | | --- | --- | --- | | `get_status` | [`GET /v1/me`](https://docs.dev.repp.co.il/me.md) | Sign-in | | `get_catalog` | [`GET /v1/catalog`](https://docs.dev.repp.co.il/catalog.md) | Nothing | | `get_waiting` | [`GET /v1/waiting`](https://docs.dev.repp.co.il/waiting.md) | Sign-in | | `set_looking_for_work` | [`PUT /v1/me/looking-for-work`](https://docs.dev.repp.co.il/looking-for-work.md) | Sign-in with actions | | `search_trainers` | [`GET /v1/trainers`](https://docs.dev.repp.co.il/trainers.md) | Nothing | | `get_trainer` | [`GET /v1/trainers/{id}`](https://docs.dev.repp.co.il/trainer.md) | Nothing | | `search_open_classes` | [`GET /v1/open-classes`](https://docs.dev.repp.co.il/open-classes.md) | Nothing | | `get_open_class` | [`GET /v1/open-classes/{id}`](https://docs.dev.repp.co.il/open-class.md) | Nothing | | `offer_on_class` | [`POST /v1/open-classes/{id}/offer`](https://docs.dev.repp.co.il/offer.md) | Sign-in with actions | | `withdraw_offer` | [`DELETE /v1/open-classes/{id}/offer`](https://docs.dev.repp.co.il/withdraw-offer.md) | Sign-in with actions | | `search_spaces` | [`GET /v1/spaces`](https://docs.dev.repp.co.il/spaces.md) | Nothing | | `get_space` | [`GET /v1/spaces/{id}`](https://docs.dev.repp.co.il/space.md) | Nothing | | `find_free_spaces` | [`GET /v1/free-spaces`](https://docs.dev.repp.co.il/free-spaces.md) | Sign-in | | `list_my_spaces` | [`GET /v1/my-spaces`](https://docs.dev.repp.co.il/my-spaces.md) | Sign-in | | `get_calendar` | [`GET /v1/calendar`](https://docs.dev.repp.co.il/calendar.md) | Sign-in | | `list_requests` | [`GET /v1/requests`](https://docs.dev.repp.co.il/requests.md) | Sign-in | | `get_request` | [`GET /v1/requests/{id}`](https://docs.dev.repp.co.il/request.md) | Sign-in | | `post_request` | [`POST /v1/requests`](https://docs.dev.repp.co.il/post-request.md) | Sign-in with actions | | `list_my_bookings` | [`GET /v1/bookings`](https://docs.dev.repp.co.il/bookings.md) | Sign-in | | `decide_booking` | [`POST /v1/bookings/{id}/decision`](https://docs.dev.repp.co.il/booking-decision.md) | Sign-in with actions | | `rate` | [`POST /v1/ratings`](https://docs.dev.repp.co.il/rate.md) | Sign-in with actions | > **Note:** A tool that acts works only when the app's sign-in included actions (`repp.write`) and you approved them, or with a read-and-actions key. The consent screen's tick for actions is **off by default**: you turn it on to allow them. A connection without actions that calls one gets HTTP `403` whose `WWW-Authenticate` header says `error="insufficient_scope"` and `scope="repp.read repp.write"` (the MCP spec's step-up), and the app can ask you to connect again and tick actions. A tool that acts is done once only when the call passes the same `idempotency_key` argument again; the JSON-RPC id is ignored, and without that argument every call is a new action. ## Connect - **claude.ai and Claude Desktop**: Settings → Connectors → **Add custom connector**, paste `https://api.dev.repp.co.il/mcp`, then **Connect**, sign in with your phone and approve. - **ChatGPT**: turn on developer mode (Settings → Apps & Connectors → Advanced), create a connector with the same address and OAuth sign-in, then sign in and approve. - **Claude Code**: add it as below, then run `/mcp` inside Claude Code and choose **Authenticate** to sign in. - **Cursor**: add it to `~/.cursor/mcp.json` (or the project's `.cursor/mcp.json`) as below; Cursor offers to sign in the first time. ```bash claude mcp add --transport http repp https://api.dev.repp.co.il/mcp ``` ```json { "mcpServers": { "repp": { "url": "https://api.dev.repp.co.il/mcp" } } } ``` ## What signing in does - The client opens Repp in your browser. Choose the business or the trainer site, sign in with your phone and the SMS code if you are not signed in yet, and see **one consent screen**: the app's name and address, what it may read, and - only if the app asked for actions - what it will be able to do, listed apart, with a tick that is off by default. Approve, and you are back in the app. - The app gets **a key of its own**, named after it, read only, or read and actions if you ticked them. It shows on **החשבון שלי → מפתחות API** with your other keys, counts toward the same 5 live keys, and works **only for the MCP server**, not for the REST API. - It lasts until you revoke it there; it stops working at once. The keys of a closed or blocked account stop working too. ## With a key instead A client that can send headers can skip the sign-in: create a key on the account page (see [Authentication](https://docs.dev.repp.co.il/authentication.md)) and send it as `Authorization: Bearer repp_…`. A key made on the account page works for both the API and the MCP server; the acting tools need a read-and-actions key. ```bash claude mcp add --transport http repp https://api.dev.repp.co.il/mcp \ --header "Authorization: Bearer $REPP_API_KEY" ``` ```json { "mcpServers": { "repp": { "url": "https://api.dev.repp.co.il/mcp", "headers": { "Authorization": "Bearer ${env:REPP_API_KEY}" } } } } ``` > **Note:** Every MCP request counts toward the key's 120 requests a minute (see [Rate limits](https://docs.dev.repp.co.il/rate-limits.md)); over it the answer is HTTP `429` with `Retry-After: 60`. An address that keeps sending bad tokens waits a minute. --- # Status Confirms your key is valid and tells you whose it is: the account's business and its trainer profile. - `GET https://api.dev.repp.co.il/v1/me` - Needs a key: `Authorization: Bearer repp_…`. Call it first when you connect a new key. Either side may be `null`: an account can be a business, a trainer, or both. ## Request **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 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"]); } ``` ## Response (200) ```json { "business": { "id": "7c1f6a52-3b8e-4d1a-9f0e-2a6b8c4d5e10", "name": "סטודיו נועה" }, "trainer": null } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `business` | object, nullable | The account's business, or null. | | `business.id` | string | Identifier. | | `business.name` | string | The business's name. | | `trainer` | object, nullable | The account's trainer profile, or null. | | `trainer.id` | string | Identifier. | | `trainer.name` | string | The trainer's full name. | | `trainer.listed` | boolean | The profile is complete and shown in the index. | | `trainer.looking_for_work` | boolean | The "looking for work" switch is on. | | `trainer.verified` | boolean | Has the blue check. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # API root The API's name and version, and where its documentation and OpenAPI file are. - `GET https://api.dev.repp.co.il/v1` - Public: no key. ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1"); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** What is here. */ interface ApiIndex { name: string; version: string; docs: string; openapi: string; } interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1"); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as ApiIndex; ``` **Python** ```python import requests response = requests.get( "https://api.dev.repp.co.il/v1", timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "name": "Repp API", "version": "2", "docs": "https://docs.repp.co.il/", "openapi": "https://api.repp.co.il/v1/openapi.json" } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `name` | string | The name. | | `version` | string | The version. | | `docs` | string | Where the documentation is. | | `openapi` | string | Where the OpenAPI file is. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Catalog The fixed lists - training styles, regions and days of the week - with their Hebrew names. - `GET https://api.dev.repp.co.il/v1/catalog` - Public: no key. The keys are what `style` and `region` take everywhere. A key never changes or goes away within a version, but new ones may join a list (15 training styles joined on 2026-11-26, 23 in all): read the list rather than hard-coding it, and treat an unknown key as `other`. ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/catalog" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/catalog"); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** The fixed lists: styles, regions and days. */ interface Catalog { styles: { key: string; label: string; }[]; regions: { key: string; label: string; }[]; days: { key: number; label: string; }[]; } interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/catalog"); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as Catalog; ``` **Python** ```python import requests response = requests.get( "https://api.dev.repp.co.il/v1/catalog", timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "styles": [ { "key": "pilates", "label": "פילאטיס" }, { "key": "yoga", "label": "יוגה ומיינדפולנס" } ], "regions": [ { "key": "gush_dan", "label": "גוש דן" }, { "key": "sharon", "label": "השרון ופתח תקווה" } ], "days": [ { "key": 0, "label": "א׳" }, { "key": 1, "label": "ב׳" } ] } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `styles` | array of object | Training styles. | | `styles[].key` | string | The key, as it is sent in parameters. | | `styles[].label` | string | The name in Hebrew. | | `regions` | array of object | Regions. | | `regions[].key` | string | The key, as it is sent in parameters. | | `regions[].label` | string | The name in Hebrew. | | `days` | array of object | Days of the week. | | `days[].key` | integer | Day number, 0 = Sunday. | | `days[].label` | string | The name in Hebrew. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # What waits for me What waits for the account's own action, as the site's calendar page ("יומן") lists it: offers to choose from, space requests to answer, classes to rate. - `GET https://api.dev.repp.co.il/v1/waiting` - Needs a key: `Authorization: Bearer repp_…`. Either side may be `null`: an account can be a business, a trainer, or both. Some of what waits is done only on the site, because it pays (choosing an offer) or needs a person (answering a no-show report); what an action of this API can do says so in its field. Polling it is not a visit: it never keeps a trainer's "looking for work" switch on. ## Request **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 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"]); } ``` ## Response (200) ```json { "business": { "choose_offers": [ { "class_id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "style": "yoga", "date": "2026-12-01", "time": "18:00", "offers_waiting": 2 } ], "send_again": [], "bookings_to_answer": [ { "booking_id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f", "space": { "id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e", "name": "מתחם הקומה השנייה" }, "trainer_name": "יוסי לוי", "date": "2026-12-02", "start_time": "11:00", "end_time": "13:00", "weekly": true } ], "classes_to_rate": [ { "class_id": "a7b8c9d0-e1f2-4a3b-8c4d-5e6f7a8b9c0d", "style": "pilates", "date": "2026-11-27" } ] }, "trainer": null } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `business` | object, nullable | What waits for the business, or null when the account has none. | | `business.choose_offers` | array of object | Requests ahead with offers to choose from (choosing pays, so it is done on the site). | | `business.choose_offers[].class_id` | string | Identifier. | | `business.choose_offers[].style` | one of: 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 | A training style: one of the keys in Catalog. | | `business.choose_offers[].date` | string | A date in Israel, YYYY-MM-DD. | | `business.choose_offers[].time` | string | A time of day in Israel, HH:MM, 24 hours. | | `business.choose_offers[].offers_waiting` | integer | How many offers wait for your choice. | | `business.send_again` | array of object | Requests whose invitation to one trainer was declined or ran out: open them to everyone or invite another, on the site. | | `business.send_again[].class_id` | string | Identifier. | | `business.send_again[].style` | one of: 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 | A training style: one of the keys in Catalog. | | `business.send_again[].date` | string | A date in Israel, YYYY-MM-DD. | | `business.send_again[].time` | string | A time of day in Israel, HH:MM, 24 hours. | | `business.bookings_to_answer` | array of object | Space requests waiting for your yes: answer with POST /v1/bookings/{id}/decision. | | `business.bookings_to_answer[].booking_id` | string | Identifier. | | `business.bookings_to_answer[].space` | object | The space. | | `business.bookings_to_answer[].trainer_name` | string, nullable | The trainer who asked. | | `business.bookings_to_answer[].date` | string | A date in Israel, YYYY-MM-DD. | | `business.bookings_to_answer[].start_time` | string | A time of day in Israel, HH:MM, 24 hours. | | `business.bookings_to_answer[].end_time` | string | A time of day in Israel, HH:MM, 24 hours. | | `business.bookings_to_answer[].weekly` | boolean | A weekly booking. | | `business.classes_to_rate` | array of object | Classes of the last 7 days waiting for your stars: POST /v1/ratings. | | `business.classes_to_rate[].class_id` | string | Identifier. | | `business.classes_to_rate[].style` | one of: 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 | A training style: one of the keys in Catalog. | | `business.classes_to_rate[].date` | string | A date in Israel, YYYY-MM-DD. | | `trainer` | object, nullable | What waits for the trainer, or null when the account has no trainer profile. | | `trainer.classes_to_rate` | array of object | Classes of the last 7 days waiting for your stars: POST /v1/ratings. | | `trainer.classes_to_rate[].class_id` | string | Identifier. | | `trainer.classes_to_rate[].style` | one of: 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 | A training style: one of the keys in Catalog. | | `trainer.classes_to_rate[].date` | string | A date in Israel, YYYY-MM-DD. | | `trainer.reports_to_answer` | array of object | A business reported you did not come: answer on the site. | | `trainer.reports_to_answer[].class_id` | string | Identifier. | | `trainer.reports_to_answer[].reported_at` | string | An exact moment, ISO 8601 with its offset. | | `trainer.offers_waiting` | integer | Your offers still waiting for a business's choice (nothing to do). | | `trainer.upcoming_classes` | integer | Classes ahead you were chosen for (nothing to do). | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Looking for work Turns the trainer's "looking for work" switch on or off. On, the trainer is first in the index as "available now" and gets word of classes that fit. - `PUT https://api.dev.repp.co.il/v1/me/looking-for-work` - Needs a key: `Authorization: Bearer repp_…`. - **Changes something · needs a read-and-actions key** (or an app signed in with `repp.write`). Send an `Idempotency-Key`: a repeat gets the first answer. Never moves money. See [Actions](https://docs.dev.repp.co.il/actions.md). Only a trainer whose profile is complete (listed) can turn it on; anyone can turn it off. Turning it on tells nobody. A week without a visit to the site turns it off again, with an SMS. Needs a key made as **read and actions** on the site; a read-only key gets `403 read_only_key`. An AI app's sign-in acts through the MCP server only, never here. Send an `Idempotency-Key` header: the same key sent again does nothing and answers the first result. ## Request body A JSON object, sent with `Content-Type: application/json`. | Name | Type | Default | Description | | --- | --- | --- | --- | | `on` **(required)** | boolean | — | `true` to turn it on, `false` to turn it off. | ## Request **cURL** ```bash IDEMPOTENCY_KEY=$(uuidgen) # send the same one again to retry this action curl -X PUT "https://api.dev.repp.co.il/v1/me/looking-for-work" \ -H "Authorization: Bearer $REPP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ -d '{ "on": true }' ``` **JavaScript** ```js // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/me/looking-for-work", { method: "PUT", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": idempotencyKey, }, body: JSON.stringify({ "on": true }), }); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** The trainer's "looking for work" switch. */ interface LookingForWork { looking_for_work: boolean; since: string | null; } interface ApiError { error: { code: string; message: string; reason?: string }; } // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/me/looking-for-work", { method: "PUT", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": idempotencyKey, }, body: JSON.stringify({ "on": true }), }); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as LookingForWork; ``` **Python** ```python import os import uuid import requests # One key per action: send the same one again to retry it, and it is done once. idempotency_key = str(uuid.uuid4()) response = requests.put( "https://api.dev.repp.co.il/v1/me/looking-for-work", headers={ "Authorization": f"Bearer {os.environ['REPP_API_KEY']}", "Idempotency-Key": idempotency_key, }, json={ "on": True, }, timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("REPP_API_KEY"), "Content-Type: application/json", "Idempotency-Key: " . $idempotencyKey, ], CURLOPT_POSTFIELDS => json_encode([ "on" => true, ]), ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "looking_for_work": true, "since": "2026-11-29T08:15:00+00:00" } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `looking_for_work` | boolean | The "looking for work" switch is on. | | `since` | string, nullable | When it was switched on, or null while it is off. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_body` | The request body is not a JSON object (or a field in it is missing or malformed). The message names it. | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 403 | `read_only_key` | The key only reads. Actions need a key made with "read and actions" (or an app signed in with the scope repp.write). | | 403 | `not_a_trainer` | The endpoint is for trainers and the key's account has no trainer profile. | | 409 | `idempotency_conflict` | The Idempotency-Key was already used by this key for a different action. | | 409 | `action_refused` | The site's own rules refused the action; `reason` says which (for example class_not_available, already_offered, booking_not_available). | | 429 | `too_many_actions` | The key ran 200 actions in the last 24 hours. Reads still work. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Trainers The trainers in the public index: available now first, then verified, then those who switched on most recently, then the newest profiles. - `GET https://api.dev.repp.co.il/v1/trainers` - Public: no key. The index never carries a phone number or a trainer's free-text about. A trainer appears once the profile is complete. ## Query parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `style` | one of: 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 | — | Only this style. | | `region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | — | Only this region. | | `available` | boolean | `false` | Only trainers whose "looking for work" switch is on. | | `limit` | integer 1–100 | `60` | How many to return, 1 to 100. | | `offset` | integer 0–5000 | `0` | How many to skip from the start (for the next page), up to 5000. | ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/trainers?style=yoga®ion=gush_dan" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/trainers?style=yoga®ion=gush_dan"); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** One page of a list. */ interface TrainerPage { items: Trainer[]; more: boolean; } /** A trainer in the public index. Never a phone number or the trainer's free-text about. */ interface Trainer { id: string; name: string; photo_url: string | null; styles: Style[]; regions: Region[]; rating: Rating; verified: boolean; available_now: boolean; } /** 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"; /** A region of Israel: one of the keys in Catalog. */ type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria"; /** The rating, or null while nobody has rated yet. */ type Rating = { average: number; count: number; } | null; interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/trainers?style=yoga®ion=gush_dan"); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as TrainerPage; ``` **Python** ```python import requests response = requests.get( "https://api.dev.repp.co.il/v1/trainers?style=yoga®ion=gush_dan", timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "items": [ { "id": "3f2b9c1e-8a7d-4e6f-b5a4-1c2d3e4f5a6b", "name": "דנה כהן", "photo_url": "https://example.supabase.co/storage/v1/object/public/avatars/3f2b9c1e/photo.webp", "styles": [ "yoga", "pilates" ], "regions": [ "gush_dan" ], "rating": { "average": 4.8, "count": 12 }, "verified": true, "available_now": true } ], "more": false } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `items` | array of Trainer | The items of this page. | | `items[].id` | string | Identifier. | | `items[].name` | string | The trainer's name. | | `items[].photo_url` | string, nullable | The trainer's photo, or null. | | `items[].styles` | array of Style | The styles the trainer teaches. | | `items[].regions` | array of Region | The regions the trainer works in. | | `items[].rating` | Rating, nullable | The rating, or null while nobody has rated yet. | | `items[].rating.average` | number | The average stars, 1 to 5, to two decimals. | | `items[].rating.count` | integer | How many ratings. | | `items[].verified` | boolean | We checked the trainer's instructor certificate (the blue check). | | `items[].available_now` | boolean | The trainer's "looking for work" switch is on. | | `more` | boolean | There is another page: ask again with a larger offset. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_parameter` | A parameter is not one the endpoint accepts. The message names it. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # One trainer One trainer from the public index. `404` when the trainer is not (or no longer) in it. - `GET https://api.dev.repp.co.il/v1/trainers/{id}` - Public: no key. ## Path parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `id` **(required)** | uuid | — | The trainer's id. | ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/trainers/3f2b9c1e-8a7d-4e6f-b5a4-1c2d3e4f5a6b" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/trainers/3f2b9c1e-8a7d-4e6f-b5a4-1c2d3e4f5a6b"); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** A trainer in the public index. Never a phone number or the trainer's free-text about. */ interface Trainer { id: string; name: string; photo_url: string | null; styles: Style[]; regions: Region[]; rating: Rating; verified: boolean; available_now: boolean; } /** 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"; /** A region of Israel: one of the keys in Catalog. */ type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria"; /** The rating, or null while nobody has rated yet. */ type Rating = { average: number; count: number; } | null; interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/trainers/3f2b9c1e-8a7d-4e6f-b5a4-1c2d3e4f5a6b"); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as Trainer; ``` **Python** ```python import requests response = requests.get( "https://api.dev.repp.co.il/v1/trainers/3f2b9c1e-8a7d-4e6f-b5a4-1c2d3e4f5a6b", timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "id": "3f2b9c1e-8a7d-4e6f-b5a4-1c2d3e4f5a6b", "name": "דנה כהן", "photo_url": "https://example.supabase.co/storage/v1/object/public/avatars/3f2b9c1e/photo.webp", "styles": [ "yoga", "pilates" ], "regions": [ "gush_dan" ], "rating": { "average": 4.8, "count": 12 }, "verified": true, "available_now": true } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `id` | string | Identifier. | | `name` | string | The trainer's name. | | `photo_url` | string, nullable | The trainer's photo, or null. | | `styles` | array of Style | The styles the trainer teaches. | | `regions` | array of Region | The regions the trainer works in. | | `rating` | Rating, nullable | The rating, or null while nobody has rated yet. | | `rating.average` | number | The average stars, 1 to 5, to two decimals. | | `rating.count` | integer | How many ratings. | | `verified` | boolean | We checked the trainer's instructor certificate (the blue check). | | `available_now` | boolean | The trainer's "looking for work" switch is on. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 404 | `not_found` | No such endpoint, or no such item for this caller. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Open classes Classes still looking for a trainer and open to everyone who fits, soonest first. - `GET https://api.dev.repp.co.il/v1/open-classes` - Public: no key. A direct invitation to one trainer is never listed here. There is no street address: only the region and the town. ## Query parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `style` | one of: 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 | — | Only this style. | | `region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | — | Only this region. | | `limit` | integer 1–100 | `60` | How many to return, 1 to 100. | | `offset` | integer 0–5000 | `0` | How many to skip from the start (for the next page), up to 5000. | ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/open-classes?style=yoga®ion=gush_dan" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/open-classes?style=yoga®ion=gush_dan"); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** One page of a list. */ interface OpenClassPage { items: OpenClass[]; more: boolean; } /** A class still looking for a trainer, open to everyone who fits. No street address. */ interface OpenClass { id: string; style: Style; date: string; time: string; starts_at: string; duration_minutes: number; pay: number; region: Region; city: string | null; business: Business; } /** 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"; /** A region of Israel: one of the keys in Catalog. */ type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria"; /** A business, as the public index shows it. */ interface Business { id: string; name: string; photo_url: string | null; } interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/open-classes?style=yoga®ion=gush_dan"); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as OpenClassPage; ``` **Python** ```python import requests response = requests.get( "https://api.dev.repp.co.il/v1/open-classes?style=yoga®ion=gush_dan", timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "items": [ { "id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "style": "yoga", "date": "2026-12-01", "time": "18:00", "starts_at": "2026-12-01T16:00:00+00:00", "duration_minutes": 60, "pay": 180, "region": "gush_dan", "city": "רמת גן", "business": { "id": "7c1f6a52-3b8e-4d1a-9f0e-2a6b8c4d5e10", "name": "סטודיו נועה", "photo_url": null } } ], "more": true } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `items` | array of OpenClass | The items of this page. | | `items[].id` | string | Identifier. | | `items[].style` | one of: 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 | A training style: one of the keys in Catalog. | | `items[].date` | string | A date in Israel, YYYY-MM-DD. | | `items[].time` | string | A time of day in Israel, HH:MM, 24 hours. | | `items[].starts_at` | string | An exact moment, ISO 8601 with its offset. | | `items[].duration_minutes` | integer | Length of the class in minutes. | | `items[].pay` | integer | What the business pays the trainer, in whole shekels. | | `items[].region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | A region of Israel: one of the keys in Catalog. | | `items[].city` | string, nullable | The town, from our list of towns, or null. | | `items[].business` | Business | A business, as the public index shows it. | | `items[].business.id` | string | Identifier. | | `items[].business.name` | string | The business's name. | | `items[].business.photo_url` | string, nullable | The business's photo, or null. | | `more` | boolean | There is another page: ask again with a larger offset. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_parameter` | A parameter is not one the endpoint accepts. The message names it. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # One open class One class still looking for a trainer. `404` once it has its trainer, was cancelled or has begun. - `GET https://api.dev.repp.co.il/v1/open-classes/{id}` - Public: no key. ## Path parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `id` **(required)** | uuid | — | The class's id. | ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b"); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** A class still looking for a trainer, open to everyone who fits. No street address. */ interface OpenClass { id: string; style: Style; date: string; time: string; starts_at: string; duration_minutes: number; pay: number; region: Region; city: string | null; business: Business; } /** 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"; /** A region of Israel: one of the keys in Catalog. */ type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria"; /** A business, as the public index shows it. */ interface Business { id: string; name: string; photo_url: string | null; } interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b"); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as OpenClass; ``` **Python** ```python import requests response = requests.get( "https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "style": "yoga", "date": "2026-12-01", "time": "18:00", "starts_at": "2026-12-01T16:00:00+00:00", "duration_minutes": 60, "pay": 180, "region": "gush_dan", "city": "רמת גן", "business": { "id": "7c1f6a52-3b8e-4d1a-9f0e-2a6b8c4d5e10", "name": "סטודיו נועה", "photo_url": null } } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `id` | string | Identifier. | | `style` | one of: 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 | A training style: one of the keys in Catalog. | | `date` | string | A date in Israel, YYYY-MM-DD. | | `time` | string | A time of day in Israel, HH:MM, 24 hours. | | `starts_at` | string | An exact moment, ISO 8601 with its offset. | | `duration_minutes` | integer | Length of the class in minutes. | | `pay` | integer | What the business pays the trainer, in whole shekels. | | `region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | A region of Israel: one of the keys in Catalog. | | `city` | string, nullable | The town, from our list of towns, or null. | | `business` | Business | A business, as the public index shows it. | | `business.id` | string | Identifier. | | `business.name` | string | The business's name. | | `business.photo_url` | string, nullable | The business's photo, or null. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 404 | `not_found` | No such endpoint, or no such item for this caller. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Offer on a class Offers you, the key's trainer, for an open class. The business then chooses among the offers on the site, and you are told if you were chosen. - `POST https://api.dev.repp.co.il/v1/open-classes/{id}/offer` - Needs a key: `Authorization: Bearer repp_…`. - **Changes something · needs a read-and-actions key** (or an app signed in with `repp.write`). Send an `Idempotency-Key`: a repeat gets the first answer. Never moves money. See [Actions](https://docs.dev.repp.co.il/actions.md). The site's own rules hold: a listed profile (`action_refused` with `profile_incomplete` otherwise), one offer per class (`already_offered`), and a class still open to you (`class_not_available` once it has its trainer, was cancelled, began, or invited someone else). A class that closes on the first yes ("the first trainer to accept takes it") is taken on the site, not here. Needs a key made as **read and actions** on the site; a read-only key gets `403 read_only_key`. An AI app's sign-in acts through the MCP server only, never here. Send an `Idempotency-Key` header: the same key sent again does nothing and answers the first result. ## Path parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `id` **(required)** | uuid | — | The class's id. | ## Request **cURL** ```bash IDEMPOTENCY_KEY=$(uuidgen) # send the same one again to retry this action curl -X POST "https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b/offer" \ -H "Authorization: Bearer $REPP_API_KEY" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" ``` **JavaScript** ```js // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b/offer", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Idempotency-Key": idempotencyKey, }, }); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** Your offer on an open class, as it now stands. */ interface OfferPlaced { offer_id: string; class_id: string; status: "pending"; offered_at: string; } interface ApiError { error: { code: string; message: string; reason?: string }; } // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b/offer", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Idempotency-Key": idempotencyKey, }, }); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as OfferPlaced; ``` **Python** ```python import os import uuid import requests # One key per action: send the same one again to retry it, and it is done once. idempotency_key = str(uuid.uuid4()) response = requests.post( "https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b/offer", headers={ "Authorization": f"Bearer {os.environ['REPP_API_KEY']}", "Idempotency-Key": idempotency_key, }, timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("REPP_API_KEY"), "Idempotency-Key: " . $idempotencyKey, ], ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "offer_id": "f6a7b8c9-d0e1-4f2a-8b3c-4d5e6f7a8b9c", "class_id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "status": "pending", "offered_at": "2026-11-29T08:02:00+00:00" } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `offer_id` | string | Identifier. | | `class_id` | string | Identifier. | | `status` | one of: pending | pending: waits for the business to choose. | | `offered_at` | string | An exact moment, ISO 8601 with its offset. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_body` | The request body is not a JSON object (or a field in it is missing or malformed). The message names it. | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 403 | `read_only_key` | The key only reads. Actions need a key made with "read and actions" (or an app signed in with the scope repp.write). | | 403 | `not_a_trainer` | The endpoint is for trainers and the key's account has no trainer profile. | | 404 | `not_found` | No such endpoint, or no such item for this caller. | | 409 | `idempotency_conflict` | The Idempotency-Key was already used by this key for a different action. | | 409 | `action_refused` | The site's own rules refused the action; `reason` says which (for example class_not_available, already_offered, booking_not_available). | | 429 | `too_many_actions` | The key ran 200 actions in the last 24 hours. Reads still work. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Take an offer back Takes back your offer on a class while the business has not chosen anyone. It costs nothing, as on the site. - `DELETE https://api.dev.repp.co.il/v1/open-classes/{id}/offer` - Needs a key: `Authorization: Bearer repp_…`. - **Changes something · needs a read-and-actions key** (or an app signed in with `repp.write`). Send an `Idempotency-Key`: a repeat gets the first answer. Never moves money. See [Actions](https://docs.dev.repp.co.il/actions.md). `action_refused` with `no_pending_offer` when you have no offer waiting on that class (none, or a trainer was already chosen). Needs a key made as **read and actions** on the site; a read-only key gets `403 read_only_key`. An AI app's sign-in acts through the MCP server only, never here. Send an `Idempotency-Key` header: the same key sent again does nothing and answers the first result. ## Path parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `id` **(required)** | uuid | — | The class's id. | ## Request **cURL** ```bash IDEMPOTENCY_KEY=$(uuidgen) # send the same one again to retry this action curl -X DELETE "https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b/offer" \ -H "Authorization: Bearer $REPP_API_KEY" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" ``` **JavaScript** ```js // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b/offer", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Idempotency-Key": idempotencyKey, }, }); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** Your offer, taken back before anyone was chosen. */ interface OfferWithdrawn { offer_id: string; class_id: string; status: "withdrawn"; } interface ApiError { error: { code: string; message: string; reason?: string }; } // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b/offer", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Idempotency-Key": idempotencyKey, }, }); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as OfferWithdrawn; ``` **Python** ```python import os import uuid import requests # One key per action: send the same one again to retry it, and it is done once. idempotency_key = str(uuid.uuid4()) response = requests.delete( "https://api.dev.repp.co.il/v1/open-classes/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b/offer", headers={ "Authorization": f"Bearer {os.environ['REPP_API_KEY']}", "Idempotency-Key": idempotency_key, }, timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("REPP_API_KEY"), "Idempotency-Key: " . $idempotencyKey, ], ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "offer_id": "f6a7b8c9-d0e1-4f2a-8b3c-4d5e6f7a8b9c", "class_id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "status": "withdrawn" } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `offer_id` | string | Identifier. | | `class_id` | string | Identifier. | | `status` | one of: withdrawn | withdrawn: taken back. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_body` | The request body is not a JSON object (or a field in it is missing or malformed). The message names it. | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 403 | `read_only_key` | The key only reads. Actions need a key made with "read and actions" (or an app signed in with the scope repp.write). | | 403 | `not_a_trainer` | The endpoint is for trainers and the key's account has no trainer profile. | | 404 | `not_found` | No such endpoint, or no such item for this caller. | | 409 | `idempotency_conflict` | The Idempotency-Key was already used by this key for a different action. | | 409 | `action_refused` | The site's own rules refused the action; `reason` says which (for example class_not_available, already_offered, booking_not_available). | | 429 | `too_many_actions` | The key ran 200 actions in the last 24 hours. Reads still work. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Spaces Spaces for rent by the hour, newest first. - `GET https://api.dev.repp.co.il/v1/spaces` - Public: no key. There is no street address: only the region and the town. ## Query parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | — | Only this region. | | `limit` | integer 1–100 | `60` | How many to return, 1 to 100. | | `offset` | integer 0–5000 | `0` | How many to skip from the start (for the next page), up to 5000. | ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/spaces?region=gush_dan" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/spaces?region=gush_dan"); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** One page of a list. */ interface SpacePage { items: Space[]; more: boolean; } /** A space for rent by the hour. */ interface Space { id: string; name: string; photo_url: string | null; region: Region; city: string | null; price_per_hour: number; capacity: number; days: number[]; open_from: string; open_to: string; business: Business; } /** A region of Israel: one of the keys in Catalog. */ type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria"; /** A business, as the public index shows it. */ interface Business { id: string; name: string; photo_url: string | null; } interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/spaces?region=gush_dan"); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as SpacePage; ``` **Python** ```python import requests response = requests.get( "https://api.dev.repp.co.il/v1/spaces?region=gush_dan", timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "items": [ { "id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e", "name": "מתחם הקומה השנייה", "photo_url": null, "region": "gush_dan", "city": "רמת גן", "price_per_hour": 90, "capacity": 12, "days": [ 0, 1, 2, 3, 4 ], "open_from": "11:00", "open_to": "16:00", "business": { "id": "7c1f6a52-3b8e-4d1a-9f0e-2a6b8c4d5e10", "name": "סטודיו נועה", "photo_url": null } } ], "more": false } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `items` | array of Space | The items of this page. | | `items[].id` | string | Identifier. | | `items[].name` | string | The space's name. | | `items[].photo_url` | string, nullable | The space's photo, or null. | | `items[].region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | A region of Israel: one of the keys in Catalog. | | `items[].city` | string, nullable | The town, from our list of towns, or null. | | `items[].price_per_hour` | integer | Rent for one hour, in whole shekels. | | `items[].capacity` | integer | How many people fit in it. | | `items[].days` | array of integer | The weekdays it can be rented, 0 = Sunday. | | `items[].open_from` | string | Opening time. | | `items[].open_to` | string | Closing time. | | `items[].business` | Business | A business, as the public index shows it. | | `items[].business.id` | string | Identifier. | | `items[].business.name` | string | The business's name. | | `items[].business.photo_url` | string, nullable | The business's photo, or null. | | `more` | boolean | There is another page: ask again with a larger offset. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_parameter` | A parameter is not one the endpoint accepts. The message names it. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # One space One space for rent. `404` once it is no longer rented out. - `GET https://api.dev.repp.co.il/v1/spaces/{id}` - Public: no key. ## Path parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `id` **(required)** | uuid | — | The space's id. | ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/spaces/b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/spaces/b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e"); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** A space for rent by the hour. */ interface Space { id: string; name: string; photo_url: string | null; region: Region; city: string | null; price_per_hour: number; capacity: number; days: number[]; open_from: string; open_to: string; business: Business; } /** A region of Israel: one of the keys in Catalog. */ type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria"; /** A business, as the public index shows it. */ interface Business { id: string; name: string; photo_url: string | null; } interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/spaces/b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e"); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as Space; ``` **Python** ```python import requests response = requests.get( "https://api.dev.repp.co.il/v1/spaces/b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e", timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e", "name": "מתחם הקומה השנייה", "photo_url": null, "region": "gush_dan", "city": "רמת גן", "price_per_hour": 90, "capacity": 12, "days": [ 0, 1, 2, 3, 4 ], "open_from": "11:00", "open_to": "16:00", "business": { "id": "7c1f6a52-3b8e-4d1a-9f0e-2a6b8c4d5e10", "name": "סטודיו נועה", "photo_url": null } } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `id` | string | Identifier. | | `name` | string | The space's name. | | `photo_url` | string, nullable | The space's photo, or null. | | `region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | A region of Israel: one of the keys in Catalog. | | `city` | string, nullable | The town, from our list of towns, or null. | | `price_per_hour` | integer | Rent for one hour, in whole shekels. | | `capacity` | integer | How many people fit in it. | | `days` | array of integer | The weekdays it can be rented, 0 = Sunday. | | `open_from` | string | Opening time. | | `open_to` | string | Closing time. | | `business` | Business | A business, as the public index shows it. | | `business.id` | string | Identifier. | | `business.name` | string | The business's name. | | `business.photo_url` | string, nullable | The business's photo, or null. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 404 | `not_found` | No such endpoint, or no such item for this caller. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Free hours The spaces with an hour still free on a day (at an hour, when you give one), each with its free hours. - `GET https://api.dev.repp.co.il/v1/free-spaces` - Needs a key: `Authorization: Bearer repp_…`. The day is from today to a year ahead. An hour is free when the space is open then and nobody booked it or asked for it; hours that already went by today are not free. Booking stays on the site. ## Query parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `date` **(required)** | YYYY-MM-DD | — | The day, from today to a year ahead. | | `hour` | integer 0–23 | — | Only spaces free at this hour, 0 to 23 (11 = 11:00-12:00). | ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/free-spaces?date=2026-12-02&hour=11" \ -H "Authorization: Bearer $REPP_API_KEY" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/free-spaces?date=2026-12-02&hour=11", { 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 /** Spaces with free hours on one day. */ interface FreeSpaces { items: FreeSpace[]; } /** A space with hours still free on the day you asked for. */ interface FreeSpace { space: Space; free_hours: number[]; } /** A space for rent by the hour. */ interface Space { id: string; name: string; photo_url: string | null; region: Region; city: string | null; price_per_hour: number; capacity: number; days: number[]; open_from: string; open_to: string; business: Business; } /** A region of Israel: one of the keys in Catalog. */ type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria"; /** A business, as the public index shows it. */ interface Business { id: string; name: string; photo_url: string | null; } interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/free-spaces?date=2026-12-02&hour=11", { 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 FreeSpaces; ``` **Python** ```python import os import requests response = requests.get( "https://api.dev.repp.co.il/v1/free-spaces?date=2026-12-02&hour=11", 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 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"]); } ``` ## Response (200) ```json { "items": [ { "space": { "id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e", "name": "מתחם הקומה השנייה", "photo_url": null, "region": "gush_dan", "city": "רמת גן", "price_per_hour": 90, "capacity": 12, "days": [ 0, 1, 2, 3, 4 ], "open_from": "11:00", "open_to": "16:00", "business": { "id": "7c1f6a52-3b8e-4d1a-9f0e-2a6b8c4d5e10", "name": "סטודיו נועה", "photo_url": null } }, "free_hours": [ 11, 12, 14, 15 ] } ] } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `items` | array of FreeSpace | The spaces with an hour still free that day. | | `items[].space` | Space | A space for rent by the hour. | | `items[].space.id` | string | Identifier. | | `items[].space.name` | string | The space's name. | | `items[].space.photo_url` | string, nullable | The space's photo, or null. | | `items[].space.region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | A region of Israel: one of the keys in Catalog. | | `items[].space.city` | string, nullable | The town, from our list of towns, or null. | | `items[].space.price_per_hour` | integer | Rent for one hour, in whole shekels. | | `items[].space.capacity` | integer | How many people fit in it. | | `items[].space.days` | array of integer | The weekdays it can be rented, 0 = Sunday. | | `items[].space.open_from` | string | Opening time. | | `items[].space.open_to` | string | Closing time. | | `items[].space.business` | Business | A business, as the public index shows it. | | `items[].free_hours` | array of integer | The hours still free that day, each the start of one hour (11 = 11:00-12:00), in order. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_parameter` | A parameter is not one the endpoint accepts. The message names it. | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # My spaces The business's own spaces, paused ones too, with their address, hours and how they are booked. - `GET https://api.dev.repp.co.il/v1/my-spaces` - Needs a key: `Authorization: Bearer repp_…`. A key of an account with no business gets `403 not_a_business`. ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/my-spaces" \ -H "Authorization: Bearer $REPP_API_KEY" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/my-spaces", { 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 /** The business's spaces. */ interface MySpaces { items: MySpace[]; } /** One of the business's own spaces. */ interface MySpace { id: string; name: string; active: boolean; price_per_hour: number; capacity: number; days: number[]; open_from: string; open_to: string; region: Region; address: string; booking_mode: "instant" | "approval"; cancel_policy: "flexible" | "regular" | "strict"; } /** A region of Israel: one of the keys in Catalog. */ type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria"; interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/my-spaces", { 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 MySpaces; ``` **Python** ```python import os import requests response = requests.get( "https://api.dev.repp.co.il/v1/my-spaces", 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 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"]); } ``` ## Response (200) ```json { "items": [ { "id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e", "name": "מתחם הקומה השנייה", "active": true, "price_per_hour": 90, "capacity": 12, "days": [ 0, 1, 2, 3, 4 ], "open_from": "11:00", "open_to": "16:00", "region": "gush_dan", "address": "ביאליק 20, רמת גן", "booking_mode": "approval", "cancel_policy": "regular" } ] } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `items` | array of MySpace | Every space of the business, paused ones too, oldest first. | | `items[].id` | string | Identifier. | | `items[].name` | string | The space's name. | | `items[].active` | boolean | Open for rent. A paused space is not in the index. | | `items[].price_per_hour` | integer | Rent for one hour, in whole shekels. | | `items[].capacity` | integer | How many people fit in it. | | `items[].days` | array of integer | The weekdays it can be rented, 0 = Sunday. | | `items[].open_from` | string | Opening time. | | `items[].open_to` | string | Closing time. | | `items[].region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | A region of Israel: one of the keys in Catalog. | | `items[].address` | string | The address. | | `items[].booking_mode` | one of: instant, approval | instant: a booking is confirmed at once. approval: it waits for your yes. | | `items[].cancel_policy` | one of: flexible, regular, strict | Free cancellation until: flexible 2 hours before, regular 6 hours before, strict 24 hours before. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 403 | `not_a_business` | The endpoint is for businesses and the key's account has none. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Calendar What is in the account's calendar, as the site's own calendar shows it. - `GET https://api.dev.repp.co.il/v1/calendar` - Needs a key: `Authorization: Bearer repp_…`. For a business: its classes (with a trainer, and still looking) and its spaces' bookings (confirmed, and waiting for its yes). For a trainer: the classes it was chosen for, the open classes it offered on, and its bookings. Nothing cancelled is listed, and a class still looking leaves the calendar once it has begun. The range is at most **124 days**, both ends counted. ## Query parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `side` **(required)** | one of: business, trainer | — | Which side of the account: `business` or `trainer`. | | `from` | YYYY-MM-DD | — | First day, inclusive. Default: today in Israel. | | `to` | YYYY-MM-DD | — | Last day, inclusive. Default: 30 days after `from`. | ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/calendar?side=business&from=2026-12-01&to=2026-12-31" \ -H "Authorization: Bearer $REPP_API_KEY" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/calendar?side=business&from=2026-12-01&to=2026-12-31", { 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 /** The calendar in the range you asked for. */ interface CalendarEvents { items: CalendarEvent[]; } /** Something in the calendar. */ interface CalendarEvent { kind: "class" | "booking"; id: string; state: "open" | "filled" | "offered" | "pending" | "confirmed"; date: string; start_time: string; end_time: string; starts_at: string; ends_at: string; style: Style | null; space: { id: string; name: string; } | null; business_name: string; other_name: string | null; address: string; amount: number; weekly: boolean; } /** 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/calendar?side=business&from=2026-12-01&to=2026-12-31", { 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 CalendarEvents; ``` **Python** ```python import os import requests response = requests.get( "https://api.dev.repp.co.il/v1/calendar?side=business&from=2026-12-01&to=2026-12-31", 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 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"]); } ``` ## Response (200) ```json { "items": [ { "kind": "class", "id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "state": "filled", "date": "2026-12-01", "start_time": "18:00", "end_time": "19:00", "starts_at": "2026-12-01T16:00:00+00:00", "ends_at": "2026-12-01T17:00:00+00:00", "style": "yoga", "space": null, "business_name": "סטודיו נועה", "other_name": "דנה כהן", "address": "ביאליק 20, רמת גן", "amount": 180, "weekly": false }, { "kind": "booking", "id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f", "state": "pending", "date": "2026-12-02", "start_time": "11:00", "end_time": "13:00", "starts_at": "2026-12-02T09:00:00+00:00", "ends_at": "2026-12-02T11:00:00+00:00", "style": null, "space": { "id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e", "name": "מתחם הקומה השנייה" }, "business_name": "סטודיו נועה", "other_name": "יוסי לוי", "address": "ביאליק 20, רמת גן", "amount": 180, "weekly": true } ] } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `items` | array of CalendarEvent | In order of time. | | `items[].kind` | one of: class, booking | class: a class. booking: a space booking. | | `items[].id` | string | Identifier. | | `items[].state` | one of: open, filled, offered, pending, confirmed | open: still looking for a trainer. filled: has its trainer. offered: you offered and wait to be chosen. pending: waits for the business's yes. confirmed: confirmed. | | `items[].date` | string | A date in Israel, YYYY-MM-DD. | | `items[].start_time` | string | A time of day in Israel, HH:MM, 24 hours. | | `items[].end_time` | string | End time. Past midnight it is a time of the next day; ends_at is exact. | | `items[].starts_at` | string | An exact moment, ISO 8601 with its offset. | | `items[].ends_at` | string | An exact moment, ISO 8601 with its offset. | | `items[].style` | one of: 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, nullable | The class's style, or null for a booking. | | `items[].space` | object, nullable | The space, or null for a class. | | `items[].space.id` | string | Identifier. | | `items[].space.name` | string | The space's name. | | `items[].business_name` | string | The business's name. | | `items[].other_name` | string, nullable | The other side: the trainer (for a business) or the business (for a trainer), or null while there is none. | | `items[].address` | string | The address. | | `items[].amount` | integer | The deal's amount, in whole shekels. | | `items[].weekly` | boolean | Part of a weekly booking. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_parameter` | A parameter is not one the endpoint accepts. The message names it. | | 400 | `bad_range` | `to` is before `from`, or the range is longer than 124 days. | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Requests The business's "need a substitute" requests from 30 days ago on, soonest first, each with where it stands. - `GET https://api.dev.repp.co.il/v1/requests` - Needs a key: `Authorization: Bearer repp_…`. Cancelled requests are left out. A key of an account with no business gets `403 not_a_business`. ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/requests" \ -H "Authorization: Bearer $REPP_API_KEY" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/requests", { 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 /** The business's requests. */ interface Requests { items: ReppRequest[]; } /** One of the business's "need a substitute" requests. */ interface ReppRequest { id: string; style: Style; date: string; time: string; starts_at: string; duration_minutes: number; pay: number; region: Region; address: string; status: "open" | "filled" | "missed"; close_mode: "choose" | "first"; cancel_policy: "flexible" | "regular" | "strict"; offers_waiting: number; trainer: { id: string; name: string; verified: boolean; } | null; invitation: { trainer_id: string; trainer_name: string | null; state: "waiting" | "accepted" | "declined" | "expired"; until: string; } | null; created_at: string; } /** 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"; /** A region of Israel: one of the keys in Catalog. */ type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria"; interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/requests", { 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 Requests; ``` **Python** ```python import os import requests response = requests.get( "https://api.dev.repp.co.il/v1/requests", 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 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"]); } ``` ## Response (200) ```json { "items": [ { "id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "style": "yoga", "date": "2026-12-01", "time": "18:00", "starts_at": "2026-12-01T16:00:00+00:00", "duration_minutes": 60, "pay": 180, "region": "gush_dan", "address": "ביאליק 20, רמת גן", "status": "open", "close_mode": "choose", "cancel_policy": "regular", "offers_waiting": 2, "trainer": null, "invitation": null, "created_at": "2026-11-26T08:12:00+00:00" } ] } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `items` | array of Request | From 30 days ago on, soonest first. | | `items[].id` | string | Identifier. | | `items[].style` | one of: 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 | A training style: one of the keys in Catalog. | | `items[].date` | string | A date in Israel, YYYY-MM-DD. | | `items[].time` | string | A time of day in Israel, HH:MM, 24 hours. | | `items[].starts_at` | string | An exact moment, ISO 8601 with its offset. | | `items[].duration_minutes` | integer | Length of the class in minutes. | | `items[].pay` | integer | What the business pays the trainer. | | `items[].region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | A region of Israel: one of the keys in Catalog. | | `items[].address` | string | The address. | | `items[].status` | one of: open, filled, missed | open: looking for a trainer. filled: a trainer was chosen and paid. missed: it began and no trainer was found. | | `items[].close_mode` | one of: choose, first | choose: the business chooses among offers. first: the first trainer to accept takes it. | | `items[].cancel_policy` | one of: flexible, regular, strict | Free cancellation until: flexible 2 hours before, regular 6 hours before, strict 24 hours before. | | `items[].offers_waiting` | integer | How many offers wait for a choice. | | `items[].trainer` | object, nullable | The chosen trainer, or null. | | `items[].trainer.id` | string | Identifier. | | `items[].trainer.name` | string | The trainer's name. | | `items[].trainer.verified` | boolean | Has the blue check. | | `items[].invitation` | object, nullable | A direct invitation to one trainer, or null when the request is open to everyone. | | `items[].invitation.trainer_id` | string | Identifier. | | `items[].invitation.trainer_name` | string, nullable | The invited trainer's name. | | `items[].invitation.state` | one of: waiting, accepted, declined, expired | waiting: no answer yet. accepted, declined. expired: the window ran out. | | `items[].invitation.until` | string | When the invitation runs out. | | `items[].created_at` | string | An exact moment, ISO 8601 with its offset. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 403 | `not_a_business` | The endpoint is for businesses and the key's account has none. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # One request One of the business's requests, with the trainers who offered: name, blue check and rating. - `GET https://api.dev.repp.co.il/v1/requests/{id}` - Needs a key: `Authorization: Bearer repp_…`. The API never sends a phone number. `404` when the request is not the business's, or was cancelled. ## Path parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `id` **(required)** | uuid | — | The request's id. | ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/requests/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b" \ -H "Authorization: Bearer $REPP_API_KEY" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/requests/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", { 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 /** One request with its offers. */ interface RequestDetail { id: string; style: Style; date: string; time: string; starts_at: string; duration_minutes: number; pay: number; region: Region; address: string; status: "open" | "filled" | "missed"; close_mode: "choose" | "first"; cancel_policy: "flexible" | "regular" | "strict"; offers_waiting: number; trainer: { id: string; name: string; verified: boolean; } | null; invitation: { trainer_id: string; trainer_name: string | null; state: "waiting" | "accepted" | "declined" | "expired"; until: string; } | null; created_at: string; offers: Offer[]; } /** 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"; /** A region of Israel: one of the keys in Catalog. */ type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria"; /** A trainer's offer on a request. */ interface Offer { trainer: { id: string; name: string; verified: boolean; rating: Rating; }; status: "pending" | "chosen"; offered_at: string; } /** The rating, or null while nobody has rated yet. */ type Rating = { average: number; count: number; } | null; interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/requests/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", { 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 RequestDetail; ``` **Python** ```python import os import requests response = requests.get( "https://api.dev.repp.co.il/v1/requests/a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", 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 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"]); } ``` ## Response (200) ```json { "id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "style": "yoga", "date": "2026-12-01", "time": "18:00", "starts_at": "2026-12-01T16:00:00+00:00", "duration_minutes": 60, "pay": 180, "region": "gush_dan", "address": "ביאליק 20, רמת גן", "status": "open", "close_mode": "choose", "cancel_policy": "regular", "offers_waiting": 2, "trainer": null, "invitation": null, "created_at": "2026-11-26T08:12:00+00:00", "offers": [ { "trainer": { "id": "3f2b9c1e-8a7d-4e6f-b5a4-1c2d3e4f5a6b", "name": "דנה כהן", "verified": true, "rating": { "average": 4.8, "count": 12 } }, "status": "pending", "offered_at": "2026-11-26T09:30:00+00:00" }, { "trainer": { "id": "d4e5f6a7-b8c9-4d0e-8f1a-2b3c4d5e6f7a", "name": "עומר ברק", "verified": false, "rating": null }, "status": "pending", "offered_at": "2026-11-26T10:05:00+00:00" } ] } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `id` | string | Identifier. | | `style` | one of: 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 | A training style: one of the keys in Catalog. | | `date` | string | A date in Israel, YYYY-MM-DD. | | `time` | string | A time of day in Israel, HH:MM, 24 hours. | | `starts_at` | string | An exact moment, ISO 8601 with its offset. | | `duration_minutes` | integer | Length of the class in minutes. | | `pay` | integer | What the business pays the trainer. | | `region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | A region of Israel: one of the keys in Catalog. | | `address` | string | The address. | | `status` | one of: open, filled, missed | open: looking for a trainer. filled: a trainer was chosen and paid. missed: it began and no trainer was found. | | `close_mode` | one of: choose, first | choose: the business chooses among offers. first: the first trainer to accept takes it. | | `cancel_policy` | one of: flexible, regular, strict | Free cancellation until: flexible 2 hours before, regular 6 hours before, strict 24 hours before. | | `offers_waiting` | integer | How many offers wait for a choice. | | `trainer` | object, nullable | The chosen trainer, or null. | | `trainer.id` | string | Identifier. | | `trainer.name` | string | The trainer's name. | | `trainer.verified` | boolean | Has the blue check. | | `invitation` | object, nullable | A direct invitation to one trainer, or null when the request is open to everyone. | | `invitation.trainer_id` | string | Identifier. | | `invitation.trainer_name` | string, nullable | The invited trainer's name. | | `invitation.state` | one of: waiting, accepted, declined, expired | waiting: no answer yet. accepted, declined. expired: the window ran out. | | `invitation.until` | string | When the invitation runs out. | | `created_at` | string | An exact moment, ISO 8601 with its offset. | | `offers` | array of Offer | The offers, oldest first. | | `offers[].trainer` | object | The trainer who offered. The API never sends a phone number. | | `offers[].trainer.id` | string | Identifier. | | `offers[].trainer.name` | string | The trainer's name. | | `offers[].trainer.verified` | boolean | Has the blue check. | | `offers[].trainer.rating` | Rating, nullable | The rating, or null while nobody has rated yet. | | `offers[].status` | one of: pending, chosen | pending: waits for a choice. chosen: chosen. | | `offers[].offered_at` | string | An exact moment, ISO 8601 with its offset. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 403 | `not_a_business` | The endpoint is for businesses and the key's account has none. | | 404 | `not_found` | No such endpoint, or no such item for this caller. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Post a request Posts a "need a substitute" request for the business: trainers who fit are told, offer on it, and the business chooses among them on the site. - `POST https://api.dev.repp.co.il/v1/requests` - Needs a key: `Authorization: Bearer repp_…`. - **Changes something · needs a read-and-actions key** (or an app signed in with `repp.write`). Send an `Idempotency-Key`: a repeat gets the first answer. Never moves money. See [Actions](https://docs.dev.repp.co.il/actions.md). The class is at the business's saved address, never sent here: a business with none gets `409 no_place` and saves it once on the site. A request posted here always waits for offers; one that closes on the first yes charges a card, so it is posted on the site. Send `invite_trainer_id` with `invite_hours` (1, 3 or 12) to offer it to one trainer first; when that trainer declines or the window runs out, the business opens it to everyone on the site. The site's own rules hold and come back as `action_refused` with their word (a day that went by, too many invitations today…). Needs a key made as **read and actions** on the site; a read-only key gets `403 read_only_key`. An AI app's sign-in acts through the MCP server only, never here. Send an `Idempotency-Key` header: the same key sent again does nothing and answers the first result. ## Request body A JSON object, sent with `Content-Type: application/json`. | Name | Type | Default | Description | | --- | --- | --- | --- | | `style` **(required)** | one of: 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 | — | The class's style: a key of the catalog. | | `date` **(required)** | YYYY-MM-DD | — | The day, in Israel. | | `time` **(required)** | string | — | The start, HH:MM in Israel, 24 hours, on a quarter hour (:00, :15, :30 or :45). | | `duration_minutes` **(required)** | integer 30–120 | — | Length in minutes, one of 30, 45, 60, 75, 90, 120. | | `pay` **(required)** | integer 1–5000 | — | What the business pays the trainer, in whole shekels, 1 to 5000. | | `notes` | string | — | A note for the trainer, up to 300 characters. | | `cancel_policy` | one of: flexible, regular, strict | `regular` | Free cancellation until: `flexible` 2 hours before, `regular` 6 hours before, `strict` 24 hours before. | | `invite_trainer_id` | uuid | — | Offer it to this trainer first (an id from the index). | | `invite_hours` | integer 1–12 | — | How long the invited trainer has to answer: 1, 3 or 12 hours. Needed with `invite_trainer_id`. | ## Request **cURL** ```bash IDEMPOTENCY_KEY=$(uuidgen) # send the same one again to retry this action curl -X POST "https://api.dev.repp.co.il/v1/requests" \ -H "Authorization: Bearer $REPP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ -d '{ "style": "yoga", "date": "2026-12-03", "time": "18:00", "duration_minutes": 60, "pay": 180, "notes": "מזרנים בארון ליד הכניסה", "cancel_policy": "regular" }' ``` **JavaScript** ```js // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/requests", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": idempotencyKey, }, body: JSON.stringify({ "style": "yoga", "date": "2026-12-03", "time": "18:00", "duration_minutes": 60, "pay": 180, "notes": "מזרנים בארון ליד הכניסה", "cancel_policy": "regular" }), }); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** One of the business's "need a substitute" requests. */ interface ReppRequest { id: string; style: Style; date: string; time: string; starts_at: string; duration_minutes: number; pay: number; region: Region; address: string; status: "open" | "filled" | "missed"; close_mode: "choose" | "first"; cancel_policy: "flexible" | "regular" | "strict"; offers_waiting: number; trainer: { id: string; name: string; verified: boolean; } | null; invitation: { trainer_id: string; trainer_name: string | null; state: "waiting" | "accepted" | "declined" | "expired"; until: string; } | null; created_at: string; } /** 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"; /** A region of Israel: one of the keys in Catalog. */ type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria"; interface ApiError { error: { code: string; message: string; reason?: string }; } // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/requests", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": idempotencyKey, }, body: JSON.stringify({ "style": "yoga", "date": "2026-12-03", "time": "18:00", "duration_minutes": 60, "pay": 180, "notes": "מזרנים בארון ליד הכניסה", "cancel_policy": "regular" }), }); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as ReppRequest; ``` **Python** ```python import os import uuid import requests # One key per action: send the same one again to retry it, and it is done once. idempotency_key = str(uuid.uuid4()) response = requests.post( "https://api.dev.repp.co.il/v1/requests", headers={ "Authorization": f"Bearer {os.environ['REPP_API_KEY']}", "Idempotency-Key": idempotency_key, }, json={ "style": "yoga", "date": "2026-12-03", "time": "18:00", "duration_minutes": 60, "pay": 180, "notes": "מזרנים בארון ליד הכניסה", "cancel_policy": "regular", }, timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("REPP_API_KEY"), "Content-Type: application/json", "Idempotency-Key: " . $idempotencyKey, ], CURLOPT_POSTFIELDS => json_encode([ "style" => "yoga", "date" => "2026-12-03", "time" => "18:00", "duration_minutes" => 60, "pay" => 180, "notes" => "מזרנים בארון ליד הכניסה", "cancel_policy" => "regular", ]), ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (201) ```json { "id": "e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a8b", "style": "yoga", "date": "2026-12-03", "time": "18:00", "starts_at": "2026-12-03T16:00:00+00:00", "duration_minutes": 60, "pay": 180, "region": "gush_dan", "address": "ביאליק 20, רמת גן", "status": "open", "close_mode": "choose", "cancel_policy": "regular", "offers_waiting": 0, "trainer": null, "invitation": null, "created_at": "2026-11-29T07:40:00+00:00" } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `id` | string | Identifier. | | `style` | one of: 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 | A training style: one of the keys in Catalog. | | `date` | string | A date in Israel, YYYY-MM-DD. | | `time` | string | A time of day in Israel, HH:MM, 24 hours. | | `starts_at` | string | An exact moment, ISO 8601 with its offset. | | `duration_minutes` | integer | Length of the class in minutes. | | `pay` | integer | What the business pays the trainer. | | `region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | A region of Israel: one of the keys in Catalog. | | `address` | string | The address. | | `status` | one of: open, filled, missed | open: looking for a trainer. filled: a trainer was chosen and paid. missed: it began and no trainer was found. | | `close_mode` | one of: choose, first | choose: the business chooses among offers. first: the first trainer to accept takes it. | | `cancel_policy` | one of: flexible, regular, strict | Free cancellation until: flexible 2 hours before, regular 6 hours before, strict 24 hours before. | | `offers_waiting` | integer | How many offers wait for a choice. | | `trainer` | object, nullable | The chosen trainer, or null. | | `trainer.id` | string | Identifier. | | `trainer.name` | string | The trainer's name. | | `trainer.verified` | boolean | Has the blue check. | | `invitation` | object, nullable | A direct invitation to one trainer, or null when the request is open to everyone. | | `invitation.trainer_id` | string | Identifier. | | `invitation.trainer_name` | string, nullable | The invited trainer's name. | | `invitation.state` | one of: waiting, accepted, declined, expired | waiting: no answer yet. accepted, declined. expired: the window ran out. | | `invitation.until` | string | When the invitation runs out. | | `created_at` | string | An exact moment, ISO 8601 with its offset. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_body` | The request body is not a JSON object (or a field in it is missing or malformed). The message names it. | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 403 | `read_only_key` | The key only reads. Actions need a key made with "read and actions" (or an app signed in with the scope repp.write). | | 403 | `not_a_business` | The endpoint is for businesses and the key's account has none. | | 409 | `idempotency_conflict` | The Idempotency-Key was already used by this key for a different action. | | 409 | `no_place` | The business has no saved place yet: it is set once on the site ("העסק שלי"). | | 409 | `action_refused` | The site's own rules refused the action; `reason` says which (for example class_not_available, already_offered, booking_not_available). | | 429 | `too_many_actions` | The key ran 200 actions in the last 24 hours. Reads still work. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Bookings The account's space bookings from 30 days ago on, soonest first: a business's spaces' bookings, or the trainer's own. - `GET https://api.dev.repp.co.il/v1/bookings` - Needs a key: `Authorization: Bearer repp_…`. A business sees who booked; a trainer sees whose space it is. The API never sends a phone number. ## Query parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `side` **(required)** | one of: business, trainer | — | Which side of the account: `business` or `trainer`. | ## Request **cURL** ```bash curl "https://api.dev.repp.co.il/v1/bookings?side=business" \ -H "Authorization: Bearer $REPP_API_KEY" ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/v1/bookings?side=business", { 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 /** The account's space bookings. */ interface Bookings { items: Booking[]; } /** A space booking. */ interface Booking { id: string; space: { id: string; name: string; }; business_name: string; trainer_name: string | null; date: string; start_time: string; end_time: string; weekly: boolean; status: "pending" | "confirmed" | "declined" | "cancelled"; amount: number; created_at: string; } interface ApiError { error: { code: string; message: string; reason?: string }; } const response = await fetch("https://api.dev.repp.co.il/v1/bookings?side=business", { 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 Bookings; ``` **Python** ```python import os import requests response = requests.get( "https://api.dev.repp.co.il/v1/bookings?side=business", 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 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"]); } ``` ## Response (200) ```json { "items": [ { "id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f", "space": { "id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e", "name": "מתחם הקומה השנייה" }, "business_name": "סטודיו נועה", "trainer_name": "יוסי לוי", "date": "2026-12-02", "start_time": "11:00", "end_time": "13:00", "weekly": true, "status": "pending", "amount": 180, "created_at": "2026-11-28T19:20:00+00:00" } ] } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `items` | array of Booking | From 30 days ago on, soonest first. | | `items[].id` | string | Identifier. | | `items[].space` | object | The space. | | `items[].space.id` | string | Identifier. | | `items[].space.name` | string | The space's name. | | `items[].business_name` | string | The business whose space it is. | | `items[].trainer_name` | string, nullable | The trainer who booked (for a business), or null. | | `items[].date` | string | A date in Israel, YYYY-MM-DD. | | `items[].start_time` | string | A time of day in Israel, HH:MM, 24 hours. | | `items[].end_time` | string | A time of day in Israel, HH:MM, 24 hours. | | `items[].weekly` | boolean | Part of a weekly booking: the same hour every week. | | `items[].status` | one of: pending, confirmed, declined, cancelled | pending: waits for the business's yes. confirmed. declined: the business said no or it ran out. cancelled. | | `items[].amount` | integer | The rent for these hours, in whole shekels. | | `items[].created_at` | string | An exact moment, ISO 8601 with its offset. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_parameter` | A parameter is not one the endpoint accepts. The message names it. | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 403 | `not_a_business` | The endpoint is for businesses and the key's account has none. | | 403 | `not_a_trainer` | The endpoint is for trainers and the key's account has no trainer profile. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Answer a space request Approves or declines a trainer's request to book one of the business's spaces. It charges nothing; a decline returns the trainer's payment by the site's own rules. - `POST https://api.dev.repp.co.il/v1/bookings/{id}/decision` - Needs a key: `Authorization: Bearer repp_…`. - **Changes something · needs a read-and-actions key** (or an app signed in with `repp.write`). Send an `Idempotency-Key`: a repeat gets the first answer. Never moves money. See [Actions](https://docs.dev.repp.co.il/actions.md). This is the one action that moves money: a decline refunds the trainer exactly as declining it on the site does. `action_refused` with `booking_not_available` when the request is no longer waiting (answered, ran out after 24 hours, or its hour came). Needs a key made as **read and actions** on the site; a read-only key gets `403 read_only_key`. An AI app's sign-in acts through the MCP server only, never here. Send an `Idempotency-Key` header: the same key sent again does nothing and answers the first result. ## Path parameters | Name | Type | Default | Description | | --- | --- | --- | --- | | `id` **(required)** | uuid | — | The booking's id. | ## Request body A JSON object, sent with `Content-Type: application/json`. | Name | Type | Default | Description | | --- | --- | --- | --- | | `approve` **(required)** | boolean | — | `true` to approve, `false` to decline. | ## Request **cURL** ```bash IDEMPOTENCY_KEY=$(uuidgen) # send the same one again to retry this action curl -X POST "https://api.dev.repp.co.il/v1/bookings/c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f/decision" \ -H "Authorization: Bearer $REPP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ -d '{ "approve": true }' ``` **JavaScript** ```js // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/bookings/c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f/decision", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": idempotencyKey, }, body: JSON.stringify({ "approve": true }), }); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** Your answer to a space request. */ interface BookingDecision { booking_id: string; status: "confirmed" | "declined"; } interface ApiError { error: { code: string; message: string; reason?: string }; } // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/bookings/c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f/decision", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": idempotencyKey, }, body: JSON.stringify({ "approve": true }), }); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as BookingDecision; ``` **Python** ```python import os import uuid import requests # One key per action: send the same one again to retry it, and it is done once. idempotency_key = str(uuid.uuid4()) response = requests.post( "https://api.dev.repp.co.il/v1/bookings/c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f/decision", headers={ "Authorization": f"Bearer {os.environ['REPP_API_KEY']}", "Idempotency-Key": idempotency_key, }, json={ "approve": True, }, timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("REPP_API_KEY"), "Content-Type: application/json", "Idempotency-Key: " . $idempotencyKey, ], CURLOPT_POSTFIELDS => json_encode([ "approve" => true, ]), ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "booking_id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f", "status": "confirmed" } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `booking_id` | string | Identifier. | | `status` | one of: confirmed, declined | confirmed: you approved it. declined: you declined it, and the trainer's money went back by the site's rules. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_body` | The request body is not a JSON object (or a field in it is missing or malformed). The message names it. | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 403 | `read_only_key` | The key only reads. Actions need a key made with "read and actions" (or an app signed in with the scope repp.write). | | 403 | `not_a_business` | The endpoint is for businesses and the key's account has none. | | 404 | `not_found` | No such endpoint, or no such item for this caller. | | 409 | `idempotency_conflict` | The Idempotency-Key was already used by this key for a different action. | | 409 | `action_refused` | The site's own rules refused the action; `reason` says which (for example class_not_available, already_offered, booking_not_available). | | 429 | `too_many_actions` | The key ran 200 actions in the last 24 hours. Reads still work. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Rate Gives stars, 1 to 5, to a class or a space booking that is over: a business rates its trainer, a trainer the business. - `POST https://api.dev.repp.co.il/v1/ratings` - Needs a key: `Authorization: Bearer repp_…`. - **Changes something · needs a read-and-actions key** (or an app signed in with `repp.write`). Send an `Idempotency-Key`: a repeat gets the first answer. Never moves money. See [Actions](https://docs.dev.repp.co.il/actions.md). Send exactly one of `class_id` and `booking_id`. Each side rates a deal once, after it is over: the site's rules come back as `action_refused` with their word (`already_rated`, `not_over_yet`, `nothing_to_rate`). Needs a key made as **read and actions** on the site; a read-only key gets `403 read_only_key`. An AI app's sign-in acts through the MCP server only, never here. Send an `Idempotency-Key` header: the same key sent again does nothing and answers the first result. ## Request body A JSON object, sent with `Content-Type: application/json`. | Name | Type | Default | Description | | --- | --- | --- | --- | | `class_id` | uuid | — | The class to rate. Leave out when rating a booking. | | `booking_id` | uuid | — | The space booking to rate. Leave out when rating a class. | | `stars` **(required)** | integer 1–5 | — | 1 to 5. | ## Request **cURL** ```bash IDEMPOTENCY_KEY=$(uuidgen) # send the same one again to retry this action curl -X POST "https://api.dev.repp.co.il/v1/ratings" \ -H "Authorization: Bearer $REPP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ -d '{ "class_id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "stars": 5 }' ``` **JavaScript** ```js // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/ratings", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": idempotencyKey, }, body: JSON.stringify({ "class_id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "stars": 5 }), }); if (!response.ok) throw new Error((await response.json()).error.message); const data = await response.json(); ``` **TypeScript** ```ts /** The stars you gave a class or a booking that is over. */ interface RatingGiven { class_id: string | null; booking_id: string | null; stars: number; } interface ApiError { error: { code: string; message: string; reason?: string }; } // One key per action: send the same one again to retry it, and it is done once. const idempotencyKey = crypto.randomUUID(); const response = await fetch("https://api.dev.repp.co.il/v1/ratings", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": idempotencyKey, }, body: JSON.stringify({ "class_id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "stars": 5 }), }); if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message); const data = (await response.json()) as RatingGiven; ``` **Python** ```python import os import uuid import requests # One key per action: send the same one again to retry it, and it is done once. idempotency_key = str(uuid.uuid4()) response = requests.post( "https://api.dev.repp.co.il/v1/ratings", headers={ "Authorization": f"Bearer {os.environ['REPP_API_KEY']}", "Idempotency-Key": idempotency_key, }, json={ "class_id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "stars": 5, }, timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["message"]) data = response.json() ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("REPP_API_KEY"), "Content-Type: application/json", "Idempotency-Key: " . $idempotencyKey, ], CURLOPT_POSTFIELDS => json_encode([ "class_id" => "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "stars" => 5, ]), ]); $data = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($data["error"]["message"]); } ``` ## Response (200) ```json { "class_id": "a4e5f6b7-c8d9-4e0f-8a1b-2c3d4e5f6a7b", "booking_id": null, "stars": 5 } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `class_id` | string, nullable | The class you rated, or null. | | `booking_id` | string, nullable | The booking you rated, or null. | | `stars` | integer | The stars you gave, 1 to 5. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_body` | The request body is not a JSON object (or a field in it is missing or malformed). The message names it. | | 401 | `missing_key` | The endpoint needs a key and no Authorization header came. | | 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. | | 403 | `read_only_key` | The key only reads. Actions need a key made with "read and actions" (or an app signed in with the scope repp.write). | | 409 | `idempotency_conflict` | The Idempotency-Key was already used by this key for a different action. | | 409 | `action_refused` | The site's own rules refused the action; `reason` says which (for example class_not_available, already_offered, booking_not_available). | | 429 | `too_many_actions` | The key ran 200 actions in the last 24 hours. Reads still work. | | 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. | | 500 | `server_error` | Something failed on our side. Try again shortly. | --- # Repp Embed for partners > **Warning:** **Early access.** Repp Embed works with test keys only for now: a live partner opens once the partner-side confirmation of connecting ships. [Contact us for live keys](https://dev.repp.co.il/help). Repp is the arena of the fitness world: businesses find substitute trainers and rent out their empty spaces, and trainers find work and a place to train. Repp Embed is for the systems businesses already run on - a booking system, a studio's software - so the business does all of that from inside your product. ## What you get - **The messenger**, in Intercom's way: Repp's round button floats in a bottom corner of your page, with a count of what waits for the business and of what is new since it last looked (a "+1"), and a panel grows out of it. Everything of Repp is in that panel, in three tabs at its foot as in Intercom's (Home, Activity, Account): Home starts something, Activity follows each class and space as a conversation, and Account edits how the business appears in Repp; you write no screens. - **Substitute trainers.** The panel lists the business's coming classes, as your server sends them. For any of them the business asks Repp for a substitute trainer in two short steps, sees the offers, and follows where each request stands. - **Renting out rooms.** The panel lists your rooms; the business opens one for rent as a space on Repp, by the rules of Repp's own form: a name, how many people, a price per hour, the days, whole hours from 6:00 to 22:00, booked at once or after its yes (`instant`, `approval`), a cancellation policy (`flexible`, `regular`, `strict`) and a photo. Trainers then book it on Repp, and the panel shows each room's bookings. - **Events in your page**, so your product follows along while it is open: a request posted, a substitute trainer chosen, a room booked or freed (see [Events](https://docs.dev.repp.co.il/partners-events.md)). - **Webhooks to your server**, signed as Stripe's are, for everything that happens on a class or room that came from your system, also while no page is open. They are the source of truth (see [Webhooks](https://docs.dev.repp.co.il/partners-webhooks.md)). - **A text message to the business.** When something happens on a class or room that came from your system that the business should act on or know - the first offer on a class, the chosen trainer cancelling, a room booked or asked for, a booking cancelled - Repp texts the business itself, so it hears of it even with your system closed. It is on by default; an owner or a manager turns it off or on in the panel's Account tab. You send nothing for this. ## How the pieces fit **From your server to Repp's panel** 1. **Your server**: Makes a session with your secret key, sending the business, the person, the coming classes and the rooms. 2. **The session**: Answers a `client_secret`: one use, 5 minutes. Your server hands it, and nothing else, to your page. 3. **The SDK**: `repp-embed.js` in your page draws the button, loads Repp's frame, and passes the secret to it over a private channel. 4. **The panel**: Repp's own frame on Repp's host trades the secret for a short token kept in its memory, and shows the business everything. ## What never passes - **Your members' data.** Repp asks for the business, the person using the panel (an id, a role and a first name), the coming classes and the rooms. Nothing about the people who train with the business. - **Money.** Nothing is paid inside the panel. Choosing an offer, paying, approving or declining a booking request, and editing or closing a space open Repp's own site in a new tab ([studio.dev.repp.co.il/spaces](https://studio.dev.repp.co.il/spaces) for spaces), where the business is signed in to Repp. - **Repp's data in your page.** Everything is drawn inside Repp's frame; your page gets only [events](https://docs.dev.repp.co.il/partners-events.md) with ids and states (at most a chosen trainer's short name and photo). Never a phone, a full name or an amount. ## Who may do what **Roles** | Role you send | In the panel | | --- | --- | | `owner` | Everything below, and connecting and disconnecting the business's Repp account (the panel's Account tab). | | `manager` | Asks for substitute trainers, opens rooms for rent, edits the business's card in Repp (the Account tab), and turns the business's text messages off or on. | | `staff` | Sees the classes, the requests and the rooms, and where each stands, and reads (never changes) the business's card and the text messages switch. | The business connects once: an owner presses "connect" in the panel, signs in to Repp in a window of Repp's own (a phone and a code by text message), and approves. A Repp account with no address saved yet is sent to [its page on Repp](https://studio.dev.repp.co.il/business) first. **New to Repp?** The first time, the owner signs up to Repp in that same window and walks a short onboarding there - who they are and the business's name, where it is, and a photo (which can wait) - so the business's card is complete in Repp's index and trainers know where they are going. An account that already has these goes straight to approving. It is Repp's own window and Repp's own steps: you build nothing for it, and nothing of it passes through your page. - [Quickstart](https://docs.dev.repp.co.il/partners-quickstart.md): The messenger in your page, in five steps. - [Sessions](https://docs.dev.repp.co.il/partners-sessions.md): The one call your server makes. - [Webhooks](https://docs.dev.repp.co.il/partners-webhooks.md): Signed events to your server. - [Messenger SDK](https://docs.dev.repp.co.il/partners-messenger.md): Every option, method and component. - [Testing](https://docs.dev.repp.co.il/partners-testing.md): The demo, and test keys. --- # Partner quickstart ## 1. Get your keys You get two keys from Repp. The **publishable key** (`rpk_test_…`) goes in your page; it only says who you are. The **secret key** (`rsk_test_…`) stays on your server; it makes sessions. Test keys are all there is in early access. See [Authentication & keys](https://docs.dev.repp.co.il/partners-authentication.md). ```bash export REPP_SECRET_KEY="rsk_test_…" ``` ## 2. Make sessions on your server Add one endpoint to your server that your page calls. It works out the business and the person from your own sign-in, builds the session's body from your own data, calls [Sessions](https://docs.dev.repp.co.il/partners-sessions.md), and answers the `client_secret` alone. ```js // Your server (Node 18+ with Express): a session for the person signed in to your system. const COMPONENTS = ["messenger", "connect", "substitute", "class-status"]; app.post("/repp/session", requireSignedIn, async (req, res) => { const { component, classId } = req.body; // what the SDK asked for if (!COMPONENTS.includes(component)) return res.status(400).end(); const business = req.user.business; // never a business id sent by the browser const body = { partner_business_id: String(business.id), partner_business_name: business.name, partner_user: { id: String(req.user.id), role: roleInRepp(req.user), display_name: req.user.firstName }, component, class: null, }; if (component === "messenger") { // From your own data: the next ~14 days of classes (up to 100) and the rooms (up to 50). body.classes = await comingClasses(business, { days: 14, max: 100 }); body.rooms = await roomsOf(business, { max: 50 }); } else if (component !== "connect") { // One of this business's classes, or nothing. body.class = await classSnapshot(business, classId); if (!body.class) return res.status(404).end(); } const response = await fetch("https://api.dev.repp.co.il/partner/v1/embed-sessions", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify(body), }); if (!response.ok) return res.status(502).end(); const { client_secret } = await response.json(); res.json({ client_secret }); // the secret alone: never your key, never the whole answer }); ``` The call to Repp itself, in every language: **cURL** ```bash curl -X POST "https://api.dev.repp.co.il/partner/v1/embed-sessions" \ -H "Authorization: Bearer $REPP_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "partner_business_id": "4012", "partner_business_name": "סטודיו מרכז", "partner_user": { "id": "51751", "role": "manager", "display_name": "מיכל" }, "component": "messenger", "class": null, "classes": [ { "partner_class_id": "30146899", "date": "2026-12-07", "time": "18:00", "duration_minutes": 60, "style": "pilates", "service_name": "פילאטיס מכשירים", "branch_name": "סניף ראשי" } ], "rooms": [ { "partner_room_id": "room-2", "name": "סטודיו גדול", "branch_name": "סניף ראשי", "capacity": 20 } ] }' ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/partner/v1/embed-sessions", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "partner_business_id": "4012", "partner_business_name": "סטודיו מרכז", "partner_user": { "id": "51751", "role": "manager", "display_name": "מיכל" }, "component": "messenger", "class": null, "classes": [ { "partner_class_id": "30146899", "date": "2026-12-07", "time": "18:00", "duration_minutes": 60, "style": "pilates", "service_name": "פילאטיס מכשירים", "branch_name": "סניף ראשי" } ], "rooms": [ { "partner_room_id": "room-2", "name": "סטודיו גדול", "branch_name": "סניף ראשי", "capacity": 20 } ] }), }); if (!response.ok) throw new Error((await response.json()).error.code); const session = await response.json(); // Hand only session.client_secret to your page. ``` **TypeScript** ```ts interface SessionCreated { id: string; /** Hand it to your page as it is: it works once, for 5 minutes. */ client_secret: string; expires_at: string; component: "connect" | "substitute" | "class-status" | "messenger"; /** Whether this business already connected its Repp account. */ connected: boolean; } interface EmbedError { error: { code: string; message: string }; } const response = await fetch("https://api.dev.repp.co.il/partner/v1/embed-sessions", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "partner_business_id": "4012", "partner_business_name": "סטודיו מרכז", "partner_user": { "id": "51751", "role": "manager", "display_name": "מיכל" }, "component": "messenger", "class": null, "classes": [ { "partner_class_id": "30146899", "date": "2026-12-07", "time": "18:00", "duration_minutes": 60, "style": "pilates", "service_name": "פילאטיס מכשירים", "branch_name": "סניף ראשי" } ], "rooms": [ { "partner_room_id": "room-2", "name": "סטודיו גדול", "branch_name": "סניף ראשי", "capacity": 20 } ] }), }); if (!response.ok) throw new Error(((await response.json()) as EmbedError).error.code); const session = (await response.json()) as SessionCreated; // Hand only session.client_secret to your page. ``` **Python** ```python import os import requests response = requests.post( "https://api.dev.repp.co.il/partner/v1/embed-sessions", headers={"Authorization": f"Bearer {os.environ['REPP_SECRET_KEY']}"}, json={ "partner_business_id": "4012", "partner_business_name": "סטודיו מרכז", "partner_user": { "id": "51751", "role": "manager", "display_name": "מיכל", }, "component": "messenger", "class": None, "classes": [ { "partner_class_id": "30146899", "date": "2026-12-07", "time": "18:00", "duration_minutes": 60, "style": "pilates", "service_name": "פילאטיס מכשירים", "branch_name": "סניף ראשי", }, ], "rooms": [ { "partner_room_id": "room-2", "name": "סטודיו גדול", "branch_name": "סניף ראשי", "capacity": 20, }, ], }, timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["code"]) session = response.json() # Hand only session["client_secret"] to your page. ``` **PHP** ```php true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("REPP_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "partner_business_id" => "4012", "partner_business_name" => "סטודיו מרכז", "partner_user" => [ "id" => "51751", "role" => "manager", "display_name" => "מיכל", ], "component" => "messenger", "class" => null, "classes" => [ [ "partner_class_id" => "30146899", "date" => "2026-12-07", "time" => "18:00", "duration_minutes" => 60, "style" => "pilates", "service_name" => "פילאטיס מכשירים", "branch_name" => "סניף ראשי", ], ], "rooms" => [ [ "partner_room_id" => "room-2", "name" => "סטודיו גדול", "branch_name" => "סניף ראשי", "capacity" => 20, ], ], ]), ]); $session = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($session["error"]["code"]); } // Hand only $session["client_secret"] to your page. ``` ## 3. Load the script and boot the messenger ```html ``` ```js const repp = await ReppEmbed.load({ publishableKey: "rpk_test_…", // Called for every frame Repp loads, and again when a session runs out. fetchClientSecret: async ({ component, classId }) => { const response = await fetch("/repp/session", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ component, classId }), }); if (!response.ok) throw new Error("No Repp session"); return (await response.json()).client_secret; }, }); const messenger = repp.boot({ alignment: "left" }); ``` The button appears in the bottom left corner, and the panel loads hidden behind it, so its count is live and it opens at once. See the [Messenger SDK](https://docs.dev.repp.co.il/partners-messenger.md) for every option. ## 4. Open it from your own buttons (optional) Your calendar and menus can open the panel right where the business needs it: on one class, or on the rooms for rent. ```js // "Find a substitute trainer" on a class in your own calendar: findButton.addEventListener("click", () => messenger.showSubstitute("30146899")); // "Rent out a room" in your own menu: rentButton.addEventListener("click", () => messenger.showSpace("spaces")); ``` ## 5. Block rooms that were booked When a trainer books a room the business opened from the panel, your calendar should hold that room for those hours. **Do it from [Webhooks](https://docs.dev.repp.co.il/partners-webhooks.md) on your server**: `room.booking_requested`, `room.booking_confirmed` and `room.booking_cancelled` reach you whether or not anyone has your page open, signed, and retried until you answer. Set your endpoint once with your secret key. Your page hears the same while the messenger is booted, so an open calendar can update at once: when it boots it first says each room's whole window (`room_bookings`), then each change (`room_booking_changed`). ```js // One block per booking and day (a weekly booking holds the room on several days). const blockId = (room, booking) => `repp:${room}:${booking.repp_booking_id}:${booking.date}`; const block = (room, booking) => calendar.blockRoom(room, blockId(room, booking), { date: booking.date, from: booking.start_hour, to: booking.end_hour, tentative: booking.state === "pending", }); // When the messenger boots, and each new day: the room's whole window. Replace your Repp blocks of that room // in those days, so whatever changed while your page was closed is right too. messenger.on("room_bookings", ({ partner_room_id, from, to, bookings }) => { calendar.removeBlocks(partner_room_id, { prefix: "repp:", from, to }); for (const booking of bookings) block(partner_room_id, booking); }); // Between reads: one booking on one day came, was confirmed or went. messenger.on("room_booking_changed", (booking) => { if (booking.state === "cancelled") calendar.removeBlock(blockId(booking.partner_room_id, booking)); else block(booking.partner_room_id, booking); }); ``` > **Note:** Browser events reach only a page where the messenger is booted. Keep your record of bookings from [Webhooks](https://docs.dev.repp.co.il/partners-webhooks.md): they are the source of truth, and the browser's events only a quicker hint. ```js // When the person signs out of your system: messenger.shutdown(); ``` --- # Authentication & keys **Keys** | Key | Where | What it does | | --- | --- | --- | | `rpk_test_…` / `rpk_live_…` | Your page | Says which partner the page is. Decides which origins may show Repp's frames. Gives no access to anything. | | `rsk_test_…` / `rsk_live_…` | Your server only | Makes [sessions](https://docs.dev.repp.co.il/partners-sessions.md), sent as `Authorization: Bearer rsk_…`. Repp keeps only its SHA-256 fingerprint. | ## Test and live - **Test keys** (`_test_`) also allow your pages on your own machine (`http://localhost`, any port), beside the origins you registered. - **Live keys** (`_live_`) allow only the https origins you registered. They are not issued yet: Repp Embed is in early access. - Repp's own API keys (`repp_…`, see [Authentication](https://docs.dev.repp.co.il/authentication.md)) are another thing: each acts as one Repp account. Partner keys act for your system, and never open the API. ## What the browser gets **Secrets in the browser** | Step | What | Lasts | | --- | --- | --- | | `client_secret` | Your server hands it to your page; the SDK passes it to Repp's frame over a private `MessageChannel`, never in an address. | 5 minutes, one use | | Token | The frame trades the secret for it, keeps it in its own memory only, and sends it to Repp as a bearer token. | 2 hours | | A new session | When a token runs out, or the frame reloads, the SDK calls your `fetchClientSecret` again. | — | > **Warning:** Keep the secret key on your server - never in a page, an app or a Git repository. Keys are issued by Repp over a secure channel; if one may have leaked, [tell us](https://dev.repp.co.il/help) at once and we revoke it and issue a new one. A `client_secret` used twice revokes its session. --- # Sessions Make a session for one Repp frame on your page: the messenger, or one of the single components. Call it from your server with your secret key, and hand only the `client_secret` to the page. - `POST https://api.dev.repp.co.il/partner/v1/embed-sessions` - Needs your secret key: `Authorization: Bearer rsk_…`. From your server only. One session per frame: one for the messenger's whole panel, one for each single component. The SDK asks for each through your `fetchClientSecret`, with `{ component, classId }`, and again when a session runs out. **The `client_secret` works once, for 5 minutes.** The frame trades it for a token that lives only in its own memory, for 2 hours, and is sent as a bearer token to Repp; no cookie is ever set. A secret used twice revokes its session. **Everything about the business comes from your server**, never from the browser: the business, the person and their role, the coming classes (about the next 14 days, up to 100) and the rooms (up to 50). Classes that already began are dropped. Server to server only: no CORS, never from a page. **Try it** is not offered here, since the call needs your secret key; try the whole flow on the [demo](https://docs.dev.repp.co.il/partners-testing.md) instead. ## Request body A JSON object, sent with `Content-Type: application/json`. | Name | Type | Default | Description | | --- | --- | --- | --- | | `partner_business_id` **(required)** | string | — | Your id of the business: letters, digits and `. _ : -`, up to 100. | | `partner_business_name` **(required)** | string | — | Its name in your system, 1 to 120 characters. | | `partner_user` **(required)** | object | — | The person signed in to your system, who will use the frame. | | `partner_user.id` **(required)** | string | — | Your id of the person, up to 100 characters. | | `partner_user.role` **(required)** | one of: owner, manager, staff | — | Only an `owner` connects and disconnects; an `owner` or a `manager` posts requests, opens rooms for rent and turns the business's text messages off or on; `staff` sees where things stand. | | `partner_user.display_name` **(required)** | string | — | Their first name, 1 to 60 characters: the panel greets them by it. | | `component` **(required)** | one of: connect, substitute, class-status, messenger | — | Which frame the session is for: what `fetchClientSecret` was asked. | | `class` **(required)** | object or null | — | One class, with the fields of `classes[]`: required for `substitute` and `class-status`, `null` for `messenger` and `connect`. | | `classes` | array, up to 100 | — | `messenger` only, and required there (may be `[]`): the business's coming classes in your calendar, each `partner_class_id` once. Leave it out for the other components. | | `classes[].partner_class_id` **(required)** | string | — | Your id of the class: letters, digits and `. _ : -`, up to 100. | | `classes[].date` **(required)** | YYYY-MM-DD | — | Its day, in Israel. | | `classes[].time` **(required)** | HH:MM | — | Its start in Israel, on a quarter hour (`18:00`, `18:15`). | | `classes[].duration_minutes` **(required)** | one of: 30, 45, 60, 75, 90, 120 | — | How long it is. | | `classes[].style` **(required)** | string or null | — | The training style it matches, a key of the [Catalog](https://docs.dev.repp.co.il/catalog.md) (`pilates`, `barre`…), or `null`: the panel then asks once. | | `classes[].service_name` **(required)** | string | — | Your name of the class, 1 to 80 characters ("פילאטיס מכשירים"). | | `classes[].branch_name` **(required)** | string or null | — | Its branch, 1 to 80 characters, or `null`. | | `rooms` | array, up to 50 | — | `messenger` only, may be `[]` or left out: the business's rooms in your system, each `partner_room_id` once. The panel offers each for rent as a space on Repp. | | `rooms[].partner_room_id` **(required)** | string | — | Your id of the room: letters, digits and `. _ : -`, up to 100. | | `rooms[].name` **(required)** | string | — | Its name in your system, 1 to 80 characters ("סטודיו גדול"). | | `rooms[].branch_name` **(required)** | string or null | — | Its branch, 1 to 80 characters, or `null`. | | `rooms[].capacity` **(required)** | integer 1–500 or null | — | How many people it holds, when you know. | ## Request **cURL** ```bash curl -X POST "https://api.dev.repp.co.il/partner/v1/embed-sessions" \ -H "Authorization: Bearer $REPP_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "partner_business_id": "4012", "partner_business_name": "סטודיו מרכז", "partner_user": { "id": "51751", "role": "manager", "display_name": "מיכל" }, "component": "messenger", "class": null, "classes": [ { "partner_class_id": "30146899", "date": "2026-12-07", "time": "18:00", "duration_minutes": 60, "style": "pilates", "service_name": "פילאטיס מכשירים", "branch_name": "סניף ראשי" } ], "rooms": [ { "partner_room_id": "room-2", "name": "סטודיו גדול", "branch_name": "סניף ראשי", "capacity": 20 } ] }' ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/partner/v1/embed-sessions", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "partner_business_id": "4012", "partner_business_name": "סטודיו מרכז", "partner_user": { "id": "51751", "role": "manager", "display_name": "מיכל" }, "component": "messenger", "class": null, "classes": [ { "partner_class_id": "30146899", "date": "2026-12-07", "time": "18:00", "duration_minutes": 60, "style": "pilates", "service_name": "פילאטיס מכשירים", "branch_name": "סניף ראשי" } ], "rooms": [ { "partner_room_id": "room-2", "name": "סטודיו גדול", "branch_name": "סניף ראשי", "capacity": 20 } ] }), }); if (!response.ok) throw new Error((await response.json()).error.code); const session = await response.json(); // Hand only session.client_secret to your page. ``` **TypeScript** ```ts interface SessionCreated { id: string; /** Hand it to your page as it is: it works once, for 5 minutes. */ client_secret: string; expires_at: string; component: "connect" | "substitute" | "class-status" | "messenger"; /** Whether this business already connected its Repp account. */ connected: boolean; } interface EmbedError { error: { code: string; message: string }; } const response = await fetch("https://api.dev.repp.co.il/partner/v1/embed-sessions", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "partner_business_id": "4012", "partner_business_name": "סטודיו מרכז", "partner_user": { "id": "51751", "role": "manager", "display_name": "מיכל" }, "component": "messenger", "class": null, "classes": [ { "partner_class_id": "30146899", "date": "2026-12-07", "time": "18:00", "duration_minutes": 60, "style": "pilates", "service_name": "פילאטיס מכשירים", "branch_name": "סניף ראשי" } ], "rooms": [ { "partner_room_id": "room-2", "name": "סטודיו גדול", "branch_name": "סניף ראשי", "capacity": 20 } ] }), }); if (!response.ok) throw new Error(((await response.json()) as EmbedError).error.code); const session = (await response.json()) as SessionCreated; // Hand only session.client_secret to your page. ``` **Python** ```python import os import requests response = requests.post( "https://api.dev.repp.co.il/partner/v1/embed-sessions", headers={"Authorization": f"Bearer {os.environ['REPP_SECRET_KEY']}"}, json={ "partner_business_id": "4012", "partner_business_name": "סטודיו מרכז", "partner_user": { "id": "51751", "role": "manager", "display_name": "מיכל", }, "component": "messenger", "class": None, "classes": [ { "partner_class_id": "30146899", "date": "2026-12-07", "time": "18:00", "duration_minutes": 60, "style": "pilates", "service_name": "פילאטיס מכשירים", "branch_name": "סניף ראשי", }, ], "rooms": [ { "partner_room_id": "room-2", "name": "סטודיו גדול", "branch_name": "סניף ראשי", "capacity": 20, }, ], }, timeout=30, ) if not response.ok: raise RuntimeError(response.json()["error"]["code"]) session = response.json() # Hand only session["client_secret"] to your page. ``` **PHP** ```php true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("REPP_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "partner_business_id" => "4012", "partner_business_name" => "סטודיו מרכז", "partner_user" => [ "id" => "51751", "role" => "manager", "display_name" => "מיכל", ], "component" => "messenger", "class" => null, "classes" => [ [ "partner_class_id" => "30146899", "date" => "2026-12-07", "time" => "18:00", "duration_minutes" => 60, "style" => "pilates", "service_name" => "פילאטיס מכשירים", "branch_name" => "סניף ראשי", ], ], "rooms" => [ [ "partner_room_id" => "room-2", "name" => "סטודיו גדול", "branch_name" => "סניף ראשי", "capacity" => 20, ], ], ]), ]); $session = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($session["error"]["code"]); } // Hand only $session["client_secret"] to your page. ``` ## Response (201) ```json { "id": "7c1e2a90-4b3d-4f5e-8a6b-1c2d3e4f5a6b", "client_secret": "res_5b1c2d3e4f5a6b7c8d9e0f1a_secret_3f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e", "expires_at": "2026-12-07T08:10:00+02:00", "component": "messenger", "connected": true } ``` ## Response fields | Field | Type | Description | | --- | --- | --- | | `id` | uuid | The session's id. | | `client_secret` | string | Hand it to your page, which returns it from `fetchClientSecret`. Once, for 5 minutes. | | `expires_at` | string | When the `client_secret` stops working (ISO 8601). | | `component` | one of: connect, substitute, class-status, messenger | The component it is for. | | `connected` | boolean | Whether this business already connected its Repp account. When not, the panel offers to connect. | ## Errors | Status | Code | Meaning | | --- | --- | --- | | 400 | `bad_request` | The body is not JSON, or a field is missing, too long or of the wrong shape. | | 400 | `bad_session` | The component and its fields do not fit: `class` is needed for `substitute` and `class-status`, `classes` for `messenger` (and only there), neither for `connect`; or two classes share an id. | | 403 | `role_not_allowed` | `partner_user.role` is none of `owner`, `manager`, `staff`. | | 404 | `unknown_partner` | No secret key in `Authorization`, or one Repp does not know (revoked, mistyped, or a publishable key). | | 405 | `not_found` | Any method but `POST`. | | 409 | `not_connected` | `substitute` and `class-status` need a connected business. `messenger` and `connect` do not. | | 429 | `too_many` | Over a limit (see [Security](https://docs.dev.repp.co.il/partners-security.md)). Wait a minute: the answer says `Retry-After: 60`. | | 500 | `failed` | Something failed on Repp's side. Try again in a moment. | --- # Webhooks Webhooks are **the source of truth** for your records. They come whether or not anyone has your page open, and are sent again until your server takes them. The SDK's [Events](https://docs.dev.repp.co.il/partners-events.md) say the same things to an open page, sooner, as a hint for the screen. You hear only about what came from your system - a class whose request was posted from the panel, a room opened for rent from it - of businesses connected through your key. Like everything Repp tells you, an event carries ids, states, a booking's day and hours, and at most a chosen trainer's short name and photo. **Never a phone, a full name, a renter or an amount.** ## Set your endpoint One endpoint per partner, an https address on your server. Set it from your server with your secret key (`Authorization: Bearer rsk_…`), as you make [sessions](https://docs.dev.repp.co.il/partners-sessions.md): **Your endpoint** | Call | Body | What it does | | --- | --- | --- | | `POST /partner/v1/webhook-endpoint` | `{ "url": "https://…" }` | Sets your endpoint, an https address on your server, and answers `201` with its `url`, `created` and signing `secret`, **shown this once**. Setting it again replaces the address and the secret; the old secret stops signing at once. `400 bad_webhook_url` for an address that is not https to a public host, test keys too: Repp sends from its cloud, so reach your own machine through a tunnel such as ngrok. | | `GET /partner/v1/webhook-endpoint` | — | `200` with your endpoint's `url`, when it was set (`created`) and, while deliveries keep failing, since when (`failing_since`, else `null`). Never its secret. `404 not_found` when none is set. | | `DELETE /partner/v1/webhook-endpoint` | — | `200 { "deleted": true }`, or `404 not_found`. Nothing is sent after, and events not delivered yet are dropped. | | `POST /partner/v1/webhook-endpoint/test` | — | `202` with the test event's `id` (`evt_test_…`): one signed test event goes to your endpoint now, with made-up ids and `livemode: false`, so you can see your code verify and answer it. `404 not_found` with no endpoint; at most 30 an hour. | **cURL** ```bash curl -X POST "https://api.dev.repp.co.il/partner/v1/webhook-endpoint" \ -H "Authorization: Bearer $REPP_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://app.example.com/repp/webhooks" }' ``` **JavaScript** ```js const response = await fetch("https://api.dev.repp.co.il/partner/v1/webhook-endpoint", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "url": "https://app.example.com/repp/webhooks" }), }); if (!response.ok) throw new Error(`Repp answered ${response.status}`); const { secret } = await response.json(); // Store secret as REPP_WEBHOOK_SECRET: it is shown only now. ``` **TypeScript** ```ts interface WebhookEndpoint { url: string; /** Shown once: keep it with your secret key. */ secret: string; } const response = await fetch("https://api.dev.repp.co.il/partner/v1/webhook-endpoint", { method: "POST", headers: { Authorization: `Bearer ${process.env.REPP_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "url": "https://app.example.com/repp/webhooks" }), }); if (!response.ok) throw new Error(`Repp answered ${response.status}`); const { secret } = (await response.json()) as WebhookEndpoint; // Store secret as REPP_WEBHOOK_SECRET: it is shown only now. ``` **Python** ```python import os import requests response = requests.post( "https://api.dev.repp.co.il/partner/v1/webhook-endpoint", headers={"Authorization": f"Bearer {os.environ['REPP_SECRET_KEY']}"}, json={ "url": "https://app.example.com/repp/webhooks", }, timeout=30, ) response.raise_for_status() secret = response.json()["secret"] # Store secret as REPP_WEBHOOK_SECRET: it is shown only now. ``` **PHP** ```php true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("REPP_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "url" => "https://app.example.com/repp/webhooks", ]), ]); $endpoint = json_decode(curl_exec($ch), true); if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) { throw new RuntimeException($endpoint["error"]["code"]); } // Store $endpoint["secret"] as REPP_WEBHOOK_SECRET: it is shown only now. ``` > **Warning:** The signing secret is shown once, when you set the endpoint. Keep it on your server beside your secret key, never in a page or a repository. If it may have leaked, set the endpoint again: you get a new secret, and the old one stops at once. ## An event Each event is one `POST` of JSON to your endpoint, with the `Repp-Signature` header: ```json { "id": "0b6e4f1a-9c2d-4e3f-8a7b-5c6d7e8f9a0b", "object": "event", "type": "class.substitute_chosen", "created": 1765123200, "livemode": false, "partner_business_id": "4012", "data": { "partner_class_id": "30146899", "partner_room_id": null, "repp_request_id": "5e2f8a1c-3b4d-4c6e-9f0a-1b2c3d4e5f6a", "repp_space_id": null, "repp_booking_id": null, "repp_series_id": null, "state": "chosen", "offers_count": 2, "trainer": { "display_name": "דנה כ.", "photo_url": null }, "date": null, "start_hour": null, "end_hour": null, "weekly": null } } ``` **Event fields** | Field | Type | Description | | --- | --- | --- | | `id` | string | The event's id. A retry carries the same one: handle each id once. | | `object` | `event` | Always `event`. | | `type` | string | One of the types below. | | `created` | integer | When it happened, in Unix seconds. Use it to order events, since they may arrive out of order. | | `livemode` | boolean | `false` for test keys and test events. | | `partner_business_id` | string | Your id of the business, as your server sent it in its sessions. | | `data` | object | What happened, in the fields below; a field that does not apply is `null`. | **data** | Field | Type | Description | | --- | --- | --- | | `partner_class_id` | string or null | Your id of the class, for a `class.*` event. | | `partner_room_id` | string or null | Your id of the room, for a `room.*` event. | | `repp_request_id` | string or null | Repp's id of the request for a substitute trainer. | | `repp_space_id` | string or null | Repp's id of the space your room was opened as. | | `repp_booking_id` | string or null | Repp's id of the booking. With `date`, the key of one block in your calendar. | | `repp_series_id` | string or null | For one week of a weekly booking: Repp's id of that weekly booking. `null` otherwise. | | `state` | string | A class's state (`none`, `looking`, `offers`, `chosen`, `cancelled`, `no_one`), a booking's (`pending`, `confirmed`, `cancelled`), or `open` for a room just opened for rent. | | `offers_count` | integer or null | How many offers wait on the class. | | `trainer` | object or null | Once chosen: the substitute trainer's short name ("דנה כ.") and photo, never the full name or a phone. | | `date` | YYYY-MM-DD or null | A booking's day, in Israel. | | `start_hour`, `end_hour` | integer or null | A booking's whole hours, in Israel (`18`, `19`). | | `weekly` | boolean or null | For a booking: `true` when it holds the same hours every week from `date` on. `null` for a class or a room just opened. | ## Event types **Event types** | Type | When | data | | --- | --- | --- | | `class.request_posted` | A request for a substitute trainer was posted from the panel for one of your classes. | `partner_class_id`, `repp_request_id`, `state` (`looking`). | | `class.offer_received` | A trainer offered to teach the class. The business chooses on Repp. | `partner_class_id`, `repp_request_id`, `state` (`offers`), `offers_count`. | | `class.substitute_chosen` | The business chose a substitute trainer: the class is covered. Show the trainer on the class in your calendar. | `partner_class_id`, `repp_request_id`, `state` (`chosen`), `trainer` (the short name, "דנה כ.", and photo only). | | `class.trainer_cancelled` | The chosen substitute trainer cancelled coming. The class is not covered any more. | `partner_class_id`, `repp_request_id`, `state` (where the request stands now), `trainer` `null`. | | `class.request_closed` | The request ended with nobody coming: the business cancelled it, or its hour came with nobody chosen. | `partner_class_id`, `repp_request_id`, `state` (`cancelled` or `no_one`). | | `room.space_opened` | One of your rooms was opened for rent as a space on Repp, from the panel. | `partner_room_id`, `repp_space_id`, `state` (`open`). | | `room.booking_requested` | A trainer asked to book the room for a day and hours, and the request waits for the business's yes. Hold the room softly, or warn. | `partner_room_id`, `repp_space_id`, `repp_booking_id`, `state` (`pending`), `date`, `start_hour`, `end_hour`, `weekly`. | | `room.booking_confirmed` | The room is booked for a day and hours: booked at once, the business said yes, or a week of a weekly booking was paid. Block the room. | `partner_room_id`, `repp_space_id`, `repp_booking_id`, `state` (`confirmed`), `date`, `start_hour`, `end_hour`, `weekly`, and for one week of a weekly booking `repp_series_id`. | | `room.booking_cancelled` | A booking of the room went: cancelled by either side, declined, a request that ran out, or a week of a weekly booking that was not paid. Free the room (a weekly one: every week still ahead). | `partner_room_id`, `repp_space_id`, `repp_booking_id`, `state` (`cancelled`), `date`, `start_hour`, `end_hour`, `weekly`, and for one week of a weekly booking `repp_series_id`. | A room's events are about one booking. Key your blocks by `repp_booking_id` and `date`, never by hours. A booking with `weekly: true` holds those hours every week from `date` on, until a `room.booking_cancelled` with the same `repp_booking_id` frees every week still ahead. Each week of it is also told on its own about two days before, as a booking with its own `repp_booking_id` and `repp_series_id` naming the weekly one: `room.booking_confirmed` when that week was paid, `room.booking_cancelled` when it was not (that day is free, the weekly booking goes on) or when it went with its weekly booking. ## Verify the signature Check every event before you trust it. `Repp-Signature` looks like `t=1765123200,v1=5257a869e7…`: `t` is when Repp signed it (Unix seconds), and `v1` is the hex HMAC-SHA256 of `.` with your signing secret. - Take the **raw body**, the exact bytes Repp sent, before any JSON parsing: parsed and written again, it is not the same text. - Read `t` and every `v1` from the header. - Make the HMAC-SHA256 of `t`, a dot and the raw body, with your signing secret, in hex. - Compare it with each `v1` in **constant time**, and refuse when none matches. - Refuse a `t` more than 5 minutes from your clock, so an old event recorded on the way cannot be played again. **JavaScript** ```js import crypto from "node:crypto"; import express from "express"; const TOLERANCE = 300; // seconds /** True when Repp-Signature is Repp's signature of this very body, made in the last 5 minutes. */ function verifyRepp(header, rawBody, secret) { const pairs = (header ?? "").split(",").map((part) => part.trim().split("=")); const t = pairs.find(([key]) => key === "t")?.[1]; const signatures = pairs.filter(([key]) => key === "v1").map(([, value]) => value); if (!t || !/^\d+$/.test(t) || signatures.length === 0) return false; if (Math.abs(Date.now() / 1000 - Number(t)) > TOLERANCE) return false; const expected = crypto.createHmac("sha256", secret).update(`${t}.`).update(rawBody).digest("hex"); return signatures.some( (signature) => signature?.length === expected.length && crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected)), ); } const app = express(); // The raw body: the signature is over the exact bytes Repp sent, never over parsed JSON. app.post("/repp/webhooks", express.raw({ type: "application/json" }), (req, res) => { if (!verifyRepp(req.get("Repp-Signature"), req.body, process.env.REPP_WEBHOOK_SECRET)) { return res.status(400).end(); } const event = JSON.parse(req.body.toString()); res.status(200).end(); // answer at once, queue.add(event.id, event); // then do the work, once per event.id }); ``` **TypeScript** ```ts import crypto from "node:crypto"; import express from "express"; interface ReppWebhookEvent { id: string; // the idempotency key: handle each id once object: "event"; type: "class.request_posted" | "class.offer_received" | "class.substitute_chosen" | "class.trainer_cancelled" | "class.request_closed" | "room.space_opened" | "room.booking_requested" | "room.booking_confirmed" | "room.booking_cancelled"; created: number; // Unix seconds livemode: boolean; partner_business_id: string; data: { partner_class_id: string | null; partner_room_id: string | null; repp_request_id: string | null; repp_space_id: string | null; repp_booking_id: string | null; state: string; offers_count: number | null; trainer: { display_name: string; photo_url: string | null } | null; date: string | null; start_hour: number | null; end_hour: number | null; }; } const TOLERANCE = 300; // seconds /** True when Repp-Signature is Repp's signature of this very body, made in the last 5 minutes. */ function verifyRepp(header: string | undefined, rawBody: Buffer, secret: string): boolean { const pairs = (header ?? "").split(",").map((part) => part.trim().split("=")); const t = pairs.find(([key]) => key === "t")?.[1]; const signatures = pairs.filter(([key]) => key === "v1").map(([, value]) => value); if (!t || !/^\d+$/.test(t) || signatures.length === 0) return false; if (Math.abs(Date.now() / 1000 - Number(t)) > TOLERANCE) return false; const expected = crypto.createHmac("sha256", secret).update(`${t}.`).update(rawBody).digest("hex"); return signatures.some( (signature) => signature?.length === expected.length && crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected)), ); } const app = express(); // The raw body: the signature is over the exact bytes Repp sent, never over parsed JSON. app.post("/repp/webhooks", express.raw({ type: "application/json" }), (req, res) => { if (!verifyRepp(req.get("Repp-Signature"), req.body, process.env.REPP_WEBHOOK_SECRET!)) { return res.status(400).end(); } const event = JSON.parse(req.body.toString()) as ReppWebhookEvent; res.status(200).end(); // answer at once, queue.add(event.id, event); // then do the work, once per event.id }); ``` **Python** ```python import hashlib import hmac import os import time from flask import Flask, abort, request TOLERANCE = 300 # seconds def verify_repp(header, raw_body, secret): """True when Repp-Signature is Repp's signature of this very body, made in the last 5 minutes.""" pairs = [part.strip().split("=", 1) for part in (header or "").split(",") if "=" in part] timestamps = [value for key, value in pairs if key == "t"] signatures = [value for key, value in pairs if key == "v1"] if not timestamps or not timestamps[0].isdigit() or not signatures: return False t = timestamps[0] if abs(time.time() - int(t)) > TOLERANCE: return False expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest() return any(hmac.compare_digest(expected, signature) for signature in signatures) app = Flask(__name__) @app.post("/repp/webhooks") def repp_webhooks(): # The raw body: the signature is over the exact bytes Repp sent, never over parsed JSON. if not verify_repp(request.headers.get("Repp-Signature"), request.get_data(), os.environ["REPP_WEBHOOK_SECRET"]): abort(400) event = request.get_json() queue.enqueue(event["id"], event) # do the work later, once per event["id"] return "", 200 ``` **PHP** ```php $tolerance) { return false; } $expected = hash_hmac("sha256", $t . "." . $rawBody, $secret); foreach ($signatures as $signature) { if (hash_equals($expected, $signature)) return true; } return false; } // The raw body: the signature is over the exact bytes Repp sent, never over parsed JSON. $rawBody = file_get_contents("php://input"); if (!verify_repp($_SERVER["HTTP_REPP_SIGNATURE"] ?? null, $rawBody, getenv("REPP_WEBHOOK_SECRET"))) { http_response_code(400); exit; } $event = json_decode($rawBody, true); enqueue($event["id"], $event); // do the work later, once per $event["id"] http_response_code(200); ``` > **Note:** cURL sends requests and cannot receive one, so verifying is shown in the four languages a server runs. Answer a bad signature with `400` and do nothing else. ## Answer fast, then work - Answer **2xx within a few seconds**, before the work: put the event on your own queue and answer. A slow answer counts as a failure and the event comes again. - Any answer that is not 2xx, a timeout or a connection that fails is a failure. - Answer 2xx to an event type you do not use, so it is not sent again. ## Retries An event that was not answered with a 2xx is sent again, with growing gaps between tries, for 3 days; after that it is dropped. Every try carries the same `id` and is signed again, with a new `t`. When your server was down for a while, a messenger that boots also tells its page each room's whole window, `room_bookings` (see [Events](https://docs.dev.repp.co.il/partners-events.md)). ## Each event once The same event can come more than once: a retry after your answer was lost, or a try that crossed your answer. Keep the `id` of each event you handled, and answer 2xx to one you already have without doing its work again. ## Order is not guaranteed Events can arrive out of order: a retry of an older event can come after a newer one. Keep, for each class and each booking day, the `created` of the last event you applied, and skip an event older than it. `data.state` is where the item stands at that event, so the newest one is always right. ## Test and live - `POST /partner/v1/webhook-endpoint/test` sends one signed test event to your endpoint now, so you can try your verification before any business is connected. - Events of test keys and test events carry `livemode: false`. --- # Messenger SDK ```html ``` Plain JavaScript with no dependencies. It reads nothing of your page but the elements you give it, and draws its button in a shadow root of its own, so your styles and Repp's never meet. ## ReppEmbed.load **Load options** | Option | Type | Description | | --- | --- | --- | | `publishableKey` | string | Your `rpk_…` key. Required. | | `fetchClientSecret` | `({ component, classId }) => Promise` | Required. Called for every frame Repp loads and whenever a session runs out: ask your server for a [session](https://docs.dev.repp.co.il/partners-sessions.md) and return its `client_secret`. | | `embedOrigin` | string | Repp's embed host. Defaults to where the script came from. | It answers an instance: `boot`, `mount`, `open`, `on` and `destroy`. `ReppEmbed.version` is the script's version. ## boot(options) Draws the button and loads the panel, hidden, and answers the messenger. One per instance: a second `boot` answers the same one. **Boot options** | Option | Type | Default | Description | | --- | --- | --- | --- | | `alignment` | `"left"` or `"right"` | `"left"` | Which bottom corner the button floats in. Left is the end side of a Hebrew page. | | `horizontalPadding` | number (px) | `20` | From the page's side edge. | | `verticalPadding` | number (px) | `20` | From the page's bottom edge. | | `hideLauncher` | boolean | `false` | No floating button: you open the panel yourself, with your own button or `show()`. | | `customLauncherSelector` | CSS selector | — | Your own buttons that open and close the panel. Each gets `aria-expanded`, the button's count (what waits and what is new) as `data-repp-waiting`, and of it what is new as `data-repp-unread`, so you can draw a badge. | | `zIndex` | integer | `2147483000` | The button's and the panel's stacking order. | ## The panel Three tabs at the panel's foot, as in Intercom's Messenger (Home, Messages, Help): Home to start something, Activity to follow each class and space as a conversation, Account for the business's card in Repp and the connection. Each tab keeps its own screens: back returns within the tab, switching tabs keeps each one where it was, and pressing the tab already open returns it to its first screen. Until the business is connected the panel is only the connect card, with no tabs. **Tabs** | Tab | showSpace | What it holds | | --- | --- | --- | | Home | `home` | A greeting and two big actions, one under the other: a substitute trainer for one of your classes (pick the class, then its request's steps), and renting out a space (the business's spaces and your rooms, each opening its screen or opening for rent). Under them what waits for the business (offers to choose from, booking requests to approve), at most three, as the same rows as Activity's, each opening its class or space inside this tab. | | Activity | `activity` | Conversations, as Intercom's Messages: one row per item, a class asked for a substitute trainer or a space, never a feed of lines. A row leads with a picture (the faces of the trainers who answered, the chosen trainer's face, the style's object while nobody answered yet, or the space's photo), then its name, one short line of what happened last, its time, a dot on what this person has not seen, and a small red pill when it waits for the business ("to choose", "to approve"). Two chips filter it (substitute trainers, spaces); what waits comes first, then the newest. A row opens the item inside this tab: a short timeline of what happened to it, then its one action. The tab carries the count of what is new, and opening it marks it seen. | | Account | `account` | The business's card in Repp, as trainers see it in Repp's index (its photo, name, rating and town), with what is still missing by name; then the card's parts (name, photo, a few words, styles, what the place has, where it is), each edited in a small screen inside this tab, by the same rules as on Repp's own site. An `owner` or a `manager` edits, `staff` read. Under it the connection: the Repp business and since when, who is here (the person and role you sent), the text messages switch, disconnecting (an owner only) and help. | `showSpace(space)` opens the panel at one of these places. `requests` and `updates`, the names of the panel's earlier tabs, still work and open Activity. **showSpace** | space | Opens | | --- | --- | | `home` | The Home tab, on its first screen. | | `activity` | The Activity tab, on its list. Marks what is new as seen. | | `account` | The Account tab, on the business's card in Repp. | | `spaces` | The spaces screen over Home: the business's spaces on Repp, then your rooms to open for rent. Back returns to Home. | | `requests` | An older name: opens Activity, as `activity` does. | | `updates` | An older name: opens Activity, as `activity` does. | **The business's card.** The Account tab opens on the business as Repp's index shows it to trainers, and edits it in place: the name, the photo, a few words (up to 400 characters, never a phone, an email or a link: Repp refuses them with its own words), the styles held there, what the place has, and where it is (a region and an address). It is the same card the business edits on Repp's own site, saved by the same rules; nothing of it reaches your page or your server, and there is no need to send the business to Repp's site for it. **Text messages.** The Account tab has one switch: a text message to the business when something closes on a class or room that came from your system. It is on by default; an `owner` or a `manager` changes it, `staff` read it. Phone notifications are set in the business's own account on Repp. Nothing of it reaches your page or your server. **Disconnecting.** Only an `owner` sees it, quiet, and confirms it in place. Your system then stops seeing Repp's states (your page hears `disconnected`); nothing in Repp is deleted, and requests already posted stay in Repp. ## The messenger **Methods** | Method or property | What it does | | --- | --- | | `show()` | Opens the panel where it was. | | `hide()` | Closes it. Escape on the page and the button close it too. | | `toggle()` | Opens or closes it. | | `showSpace(space)` | Opens the panel at one of its places (see The panel, above): `home`, `activity`, `account`, `spaces`, `requests`, `updates`. Opening `activity` marks what is new as seen. | | `showSubstitute(classId)` | Opens the panel on one of your classes (`partner_class_id`), over the Activity tab's list (back returns to it): its request, or asking for a substitute trainer for it. A class the session does not hold makes the panel ask `fetchClientSecret` once for a new session, so your server sends the class. | | `isOpen` | Whether the panel is open (read only). | | `waitingCount` | The count on the button (read only): what waits for the business (classes with offers to choose from, booking requests of its spaces waiting for its yes) and what happened on its classes and rooms that this person has not seen yet. Opening the panel's Activity tab clears what is new. | | `on(name, listener)` | Listens to an [event](https://docs.dev.repp.co.il/partners-events.md). Returns a function that stops listening. | | `shutdown()` | Removes the button and the panel, for a person who signs out. `boot()` brings them back. | ## As markup `` boots the messenger once `ReppEmbed.load` ran, and shuts it down when it leaves the page. Its attributes: `alignment` (`left` or `right`) and `hide-launcher`. ```html ``` ## Components Before the messenger, Repp Embed had three single components. They still work, each with a [session](https://docs.dev.repp.co.il/partners-sessions.md) of its own: **Components** | Component | In code | As markup | What it is | | --- | --- | --- | --- | | `connect` | `repp.mount("connect", element)` | `` | The card of your system's connected apps: connect, and a quiet disconnect. | | `class-status` | `repp.mount("class-status", element, { classId })` | `` | A chip on a class in your calendar, saying where its request stands. A click opens `substitute`. | | `substitute` | `repp.open("substitute", { classId, returnFocus })` | `` | A window over the page to ask for a substitute trainer for one class. With the messenger booted, the button opens the panel on that class instead. | `mount` and `open` answer a handle with `on` and `unmount`; `repp.destroy()` removes everything, for a single-page app. --- # Events ## Browser events or webhooks **Two ways Repp tells you** | What | Browser events | Webhooks | | --- | --- | --- | | Reach | Your page, through the SDK | Your server, signed | | When | Only while a page with the messenger booted is open | Always, retried until your server answers 2xx | | Use them for | Updating what the person sees at once | Your records: a class covered, a room blocked or freed | | Source of truth | No: a hint | Yes | Write nothing lasting from a browser event: a person can close the page a moment before it comes, and events are never sent again. Keep your records from [Webhooks](https://docs.dev.repp.co.il/partners-webhooks.md), and use the events below to update an open screen without waiting for your server. ## Listening Listen on the messenger, an instance or a component's handle. Each `on` returns a function that stops listening. ```js const stop = messenger.on("substitute_chosen", ({ partner_class_id, trainer }) => { calendar.markCovered(partner_class_id, trainer.display_name); }); // later: stop(); ``` ## Every event **Events** | Event | From | Payload | When | | --- | --- | --- | --- | | `ready` | Every frame | `{ component: "connect" \| "substitute" \| "class-status" \| "messenger" }` | A frame loaded and claimed its session. | | `load_error` | Every frame | `{ code: "timeout" \| "session" \| "unknown_partner" \| "origin" }` | A frame could not load: no answer in time, no session, an unknown publishable key, or a page whose origin the key does not allow. | | `close` | Substitute window | `{ reason: "user" \| "done" }` | The substitute window closed. | | `session_expired` | Every frame | `{}` | A session ran out and `fetchClientSecret` could not give a new one. The frame asks the person to refresh the page. | | `connected` | Messenger, connect | `{ connection_id: string }` | The business connected its Repp account. | | `disconnected` | Messenger, connect | `{ connection_id: string }` | An owner disconnected it (the panel's Account tab, or the connect card). | | `connect_failed` | Messenger, connect | `{ reason: "cancelled" \| "already_connected" \| "expired" }` | Connecting did not finish: the person cancelled, the business is already connected to another Repp account, or the 10-minute window ran out. | | `request_posted` | Messenger, substitute | `{ partner_class_id: string; repp_request_id: string }` | A request for a substitute trainer was posted for one of your classes. | | `status_changed` | Messenger, substitute, class-status | `{ partner_class_id: string; state: "none" \| "looking" \| "offers" \| "chosen" \| "cancelled" \| "no_one"; offers_count: number }` | Where a class's request stands changed. | | `substitute_chosen` | Messenger, substitute | `{ partner_class_id: string; repp_request_id: string; trainer: { display_name: string; photo_url: string \| null } }` | A substitute trainer was chosen on Repp. `display_name` is the short name ("דנה כ."), never the full one. | | `badge_click` | class-status | `{ partner_class_id: string }` | A class's status chip was clicked. | | `show` | Messenger | `{}` | The panel opened (its button, or `show`, `showSpace`, `showSubstitute`). | | `hide` | Messenger | `{}` | The panel closed. | | `waiting_changed` | Messenger | `{ count: number }` | The count on the button changed (Intercom's unread count): what waits for the business (classes with offers to choose from, space booking requests waiting for its yes), and what is new since this person last opened the panel's Activity tab (a "+1" each, cleared when that tab opens; never what this person did there, and never an offer or a space request, which already count as waiting). | | `space_opened` | Messenger | `{ partner_room_id: string; repp_space_id: string }` | One of your rooms was opened for rent as a space on Repp. | | `room_booking_changed` | Messenger | `{ partner_room_id: string; repp_space_id: string; repp_booking_id: string; state: "pending" \| "confirmed" \| "cancelled"; date: string; start_hour: number; end_hour: number }` | Between two reads of the panel, one booking day of a room opened from the panel came in (`pending`), was confirmed, or went (`cancelled`). Block or free that room in your calendar. Date and whole hours in Israel's time. Key your blocks by `repp_booking_id` and `date`, never by hours: a weekly booking comes once per week with the same id, and a week once charged becomes a booking of its own, so you hear that day of the weekly booking go and the week's own id come in the same read (cancellations first). Heard only while your page is open (the messenger reads every 15 seconds while shown, every minute while hidden); your server hears the same from [Webhooks](https://docs.dev.repp.co.il/partners-webhooks.md), which are the source of truth. | | `room_bookings` | Messenger | `{ partner_room_id: string; repp_space_id: string; from: string; to: string; bookings: { repp_booking_id: string; state: "pending" \| "confirmed"; date: string; start_hour: number; end_hour: number }[] }` | Everything that holds a room opened from the panel, from `from` to `to` (both included, Israel's days: today and the next 59, or fewer when more than 300 booking days fall in them). Said when the messenger boots, so bookings made or cancelled while your page was closed reach you, and again when the window moves (a new day). Replace all of your Repp blocks of that room within those days with these. | ## What an event never carries Events carry ids and states, the date and hours of a room's booking, and at most a chosen trainer's short name ("דנה כ.") and photo. **Never a phone, a full name, a renter or an amount.** What a request or a booking holds stays inside Repp's frame and on Repp's site. `state` of `status_changed` is one of `none`, `looking`, `offers`, `chosen`, `cancelled`, `no_one`: no request yet, looking for a trainer, offers to choose from, a trainer chosen, cancelled, or the hour came with nobody chosen. --- # Security ## Origins - Register every origin that shows Repp (`https://app.example.com`): https, exact, no paths and no wildcards. Repp's frames send `Content-Security-Policy: frame-ancestors` with exactly those origins, so no other site can frame them. - A test key also allows `http://localhost` on any port. - Each frame says hello to one allowed origin - your page's - and never to `*`. ## Your Content Security Policy If your page sends a Content Security Policy, let Repp's script and frames in. Nothing else: the frames talk to Repp themselves. ```text script-src 'self' https://embed.dev.repp.co.il; frame-src https://embed.dev.repp.co.il; ``` ## The handshake - The SDK accepts a hello only from Repp's origin, from its own frame's window, carrying that frame's id; then it hands the frame one end of a `MessageChannel`. - Everything after - the `client_secret`, sizes, events, open and close - goes over that private channel, never through `window.postMessage` to anyone listening. - The secret is never in an address, and the token never leaves the frame. ## Signed webhooks Every webhook to your server is signed with your endpoint's own secret, which Repp shows once. Your endpoint is https only. Verify `Repp-Signature` on the raw body, in constant time, and refuse a signature more than 5 minutes old (see [Webhooks](https://docs.dev.repp.co.il/partners-webhooks.md)). ## No third-party cookies Repp's frame keeps its token in memory and sends it as a bearer token. It sets no cookie, so Safari's tracking prevention and blocked third-party cookies change nothing. ## Limits **Limits** | Who | Limit | | --- | --- | | Sessions, per secret key | 600 a minute | | Messenger sessions, per person of a business | 60 a minute | | Other sessions, per connected business | 60 a minute | | Calls without a good key, per address | 60 a minute | | A frame's calls, per session | 120 a minute | | Frames claiming sessions, per address | 30 a minute | | All of a frame's calls, per address | 600 a minute | Over a limit the answer is `429 too_many` with `Retry-After: 60`. --- # Testing ## The demo [embed.dev.repp.co.il/demo](https://embed.dev.repp.co.il/demo) is a made-up business system with the real SDK in it: six classes of this week, each with its status chip and a "find a substitute trainer" button, the connect card, and a log of the events it hears. Its partner is `rpk_test_demo`, already connected to Repp's own test business. > **Note:** The demo, the test keys and the test business live on Repp's test site, where payments are pretend. On production the demo answers that it is off. ## Your test keys - Use `rpk_test_…` in your page and `rsk_test_…` on your server, and register the origins of your test environment. - Your pages on `http://localhost` work with a test key without registering. - We give you a test business on Repp's test site to connect to. ## Before you ask for live keys - Your server builds every session from its own data: the business and the person from your sign-in, never from the browser. - Each role of your system maps to `owner`, `manager` or `staff` as it should. - `fetchClientSecret` throws when your server says no, and your page handles `load_error` and `session_expired`. - Your [webhook](https://docs.dev.repp.co.il/partners-webhooks.md) endpoint verifies `Repp-Signature` on the raw body, answers 2xx fast, handles each event `id` once and skips an event older than the last one applied. Try it with `POST /partner/v1/webhook-endpoint/test`. - The `room.booking_*` webhooks block and free rooms in your calendar, keyed by booking and date; `room_bookings` and `room_booking_changed` only refresh an open page. - `shutdown()` runs when a person signs out. - Your Content Security Policy lets Repp's script and frames in (see [Security](https://docs.dev.repp.co.il/partners-security.md)). > **Note:** **Try it** is not offered on [Sessions](https://docs.dev.repp.co.il/partners-sessions.md): it needs your secret key, which belongs on your server only. [Contact us for live keys](https://dev.repp.co.il/help). --- # Changelog What changed in Repp's API, its MCP server and Repp Embed, newest first. A change that breaks code comes only with a new version. ## 2026-11-30: Repp Embed: the panel in three tabs - The messenger's panel has three tabs at its foot, as Intercom's has: Home, Activity and Account (see [The panel](https://docs.dev.repp.co.il/partners-messenger.md)). Home starts something (a substitute trainer for a class, renting out a space) and shows what waits; Activity is conversations, as Intercom's Messages: one row per class or space, with a picture, what happened last and a red pill when it waits, opening a short timeline and its one action. - `showSpace` takes `home`, `activity`, `account` and `spaces` (the spaces screen over Home). `requests` and `updates` still work and open Activity. `showSubstitute` opens the class over Activity's list. - What is new is cleared when the person opens the Activity tab, no longer when the panel opens; `waitingCount` and `waiting_changed` follow. - The Account tab edits the business's card in Repp, as trainers see it (name, photo, a few words, styles, what the place has, where it is; an `owner` or a `manager` edits, `staff` read), and holds the connection, the business's text messages switch (on by default; an `owner` or a `manager` changes it) and disconnecting (an `owner` only). You build nothing for any of it. ## 2026-11-30: Repp Embed: webhooks, what's new on the button, and first-time onboarding - [Webhooks](https://docs.dev.repp.co.il/partners-webhooks.md): Repp tells your server, signed as Stripe does (`Repp-Signature: t=…,v1=…`, HMAC-SHA256), when something happens on a class or room that came from your system: a request posted, an offer, a substitute trainer chosen or cancelling, a request closed, a room opened for rent, booked or freed. Set one endpoint with your secret key, send yourself a test event, and verify in JavaScript, TypeScript, Python or PHP. - Events are retried with backoff for 3 days until your server answers 2xx; handle each event `id` once, and order by `created`, since order is not guaranteed. Webhooks are the source of truth; the browser's [Events](https://docs.dev.repp.co.il/partners-events.md) only update an open page. - The messenger's button now also counts what is new since the person last opened the panel (a "+1"), and the panel lists it; `waitingCount` and `waiting_changed` include it. - A business new to Repp signs up in Repp's own connect window and walks a short onboarding, so its card is complete in Repp's index. When something the business should know of happens on an item from your system (the first offer, a trainer cancelling, a room booked or asked for, a booking cancelled), Repp texts it. You build nothing for either ([Repp Embed for partners](https://docs.dev.repp.co.il/partners.md)). ## 2026-11-30: Repp Embed for partners: the messenger, in early access - A **Partners** tab for systems businesses already work in: [Repp Embed for partners](https://docs.dev.repp.co.il/partners.md), a [quickstart](https://docs.dev.repp.co.il/partners-quickstart.md), and a reference for [Sessions](https://docs.dev.repp.co.il/partners-sessions.md), the [Messenger SDK](https://docs.dev.repp.co.il/partners-messenger.md) and its [Events](https://docs.dev.repp.co.il/partners-events.md). - The messenger: Repp's floating button and panel inside your product, where a business finds substitute trainers for its classes and opens its rooms for rent as spaces on Repp. Nothing is paid inside it. - A session takes the business's coming classes and its rooms from your server; `room_bookings` gives your page each such room's whole window when the messenger boots, and `room_booking_changed` tells it when a room opened from the panel is booked or freed after that. - Early access: test keys only, and the [demo](https://docs.dev.repp.co.il/partners-testing.md). Contact us for live keys. ## 2026-11-29: New docs: a page for everything, and code in five languages - A page per guide and per endpoint, with a search (⌘K), and this changelog. - A [Quickstart](https://docs.dev.repp.co.il/quickstart.md): with your coding agent, or by hand. - Every endpoint's call in cURL, JavaScript, TypeScript (typed from the API's own schemas), Python and PHP; your language is remembered from page to page. - **Copy page** on every page: its Markdown for an AI assistant, or the page opened in Claude or ChatGPT. Every page's `.md` file starts with a line that names `llms.txt`, the index of them all. ## 2026-11-29 (v2): Version 2: actions, and four more reads - Six actions that change something, as the same step on the site would: [Post a request](https://docs.dev.repp.co.il/post-request.md), [Offer on a class](https://docs.dev.repp.co.il/offer.md), [Take an offer back](https://docs.dev.repp.co.il/withdraw-offer.md), [Answer a space request](https://docs.dev.repp.co.il/booking-decision.md), [Rate](https://docs.dev.repp.co.il/rate.md) and [Looking for work](https://docs.dev.repp.co.il/looking-for-work.md). None pays, books, chooses an offer or cancels; only declining a space request refunds the trainer, by the site's rules. See [Actions](https://docs.dev.repp.co.il/actions.md). - Keys come in two kinds, **read only** and **read and actions**; keys made before are read only. See [Authentication](https://docs.dev.repp.co.il/authentication.md). - Actions take an `Idempotency-Key` (a repeat gets the first answer) and are limited to 30 a minute and 200 a day per key. A refusal of the site's rules answers `409 action_refused` with its `reason`. - Four more reads: [What waits for me](https://docs.dev.repp.co.il/waiting.md), [Free hours](https://docs.dev.repp.co.il/free-spaces.md), [My spaces](https://docs.dev.repp.co.il/my-spaces.md) and [Bookings](https://docs.dev.repp.co.il/bookings.md). - The MCP server has a tool for each, and an app may act only when its sign-in asked for `repp.write` and you ticked actions (off by default); otherwise it gets the spec's `403 insufficient_scope`. - Paths stay under `/v1`: version 2 only adds, so code written for version 1 keeps working. ## 2026-11-26: The MCP server, with one-click sign-in - Claude, ChatGPT, Cursor and any MCP client connect to `/mcp` on the API's host, sign in with a phone and approve one consent screen (OAuth 2.1 with PKCE). - Each app gets a key of its own that works for MCP only, shows on **מפתחות API** and is revoked there. See [MCP](https://docs.dev.repp.co.il/mcp.md). - Eleven read-only tools, one per endpoint: the status, the catalog, the index, the calendar and the requests. ## 2026-11-26 (v1): Version 1: the public index and your account, read only - The public index with no key: trainers, open classes and spaces, each list and each item, and the catalog. - With a personal key: the key's account, its calendar (up to 124 days) and a business's requests with their offers. - Personal keys on **החשבון שלי → מפתחות API**: shown once, kept only as a fingerprint, 5 live per account. - Limits of 120 requests a minute per key and 60 per address on the index. These docs, the OpenAPI 3.1 file, `llms.txt` and a Markdown file per page.