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

# 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
<?php
$ch = curl_init("https://api.dev.repp.co.il/v1");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => 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. |
