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

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

## 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. |
