# GET /api/v1/me

Профиль кабинета, тариф, участие, анкета, готовность плана, доступные функции и лимиты.

| Поле | Значение |
| --- | --- |
| URL | `GET https://aos.edgelab.space/api/v1/me` |
| Доступ | Cookie кабинета · Mini App (TMA) · API-ключ / OAuth |
| Scope для ключей | `course:read` |
| operationId | `me` |

## Описание

Профиль кабинета, тариф, с кем сопровождение (`mentoring`), купленное предложение (`offer`), участие, анкета, готовность плана, доступные функции и лимиты. **Для API-ключа/OAuth ответ сокращён до AgentWhoami**, без student id, Telegram id, username, avatar и лимитов тьютора.

**Auth:** сессия кабинета (cookie) / TMA bearer / API-ключ или OAuth access token. **Scope:** `course:read` (для ключей).

**Path:** параметров нет.

**Query:** нет объявленных полей.

**Body:** не требуется.

**Ответ · статус и структура**

**Ответ:** 200 `application/json`, [Me](/docs/schemas#me).

Краткая форма: `{ student: Student, flow: "agentos3", tier: Tier, mentoring?: MentoringKind | null, offer?: Offer | null, access: { state: "active" | "grace", checkedAt: string }, onboarding: { status: OnboardingStatus, done: boolean }, planReady: boolean, authKind: "cookie" | "tma", features: { tutor: boolean, agentKeys: boolean, dictation: boolean }, limits: { tutorMessagesPerDay: integer, tutorUsdPerDay: number } }`.

При agentKey / OAuth вместо Me: [AgentWhoami](/docs/schemas); краткая форма `{ name: string, flow: "agentos3", tier: "group" | "personal", mentoring?: "curator" | "dashi" | null, offer?: "tutoring" | null, onboarding: { status: "draft" | "in_review" | "plan_ready", done: boolean }, planReady: boolean, authKind: "agentKey", keyScopes: ("course:read" | "profile:read" | "progress:write" | "tutor:read" | "mentoring:read")[], keyExpiresAt: string }`.

Пример JSON; значения демонстрационные.

```json
{
  "student": {
    "id": "0b9a6f2e-4c1d-4f7e-9a51-3c2d8e7f6a10",
    "tgId": 100000001,
    "name": "Александр Петров",
    "username": "alex_petrov",
    "avatarUrl": "/api/v1/me/avatar?v=3f9a1c0e7b2d4e6f8a0b1c2d3e4f5a6b"
  },
  "flow": "agentos3",
  "tier": "personal",
  "access": {
    "state": "active",
    "checkedAt": "2026-11-04T09:00:00Z"
  },
  "onboarding": {
    "status": "draft",
    "done": false
  },
  "planReady": false,
  "authKind": "cookie",
  "features": {
    "tutor": false,
    "agentKeys": false,
    "dictation": true
  },
  "limits": {
    "tutorMessagesPerDay": 100,
    "tutorUsdPerDay": 2.5
  }
}
```

**Ошибки:** `401 UNAUTHENTICATED`, `403 NO_ENTITLEMENT`, `503 ENTITLEMENT_UNAVAILABLE`, `429 RATE_LIMITED`, `403 CREDENTIAL_NOT_ALLOWED`, `403 INSUFFICIENT_SCOPE`; [общие ошибки](/docs/errors).

**Лимиты:** Agent-key/OAuth: 60/min/key, 2000/UTC day/key, 3000/UTC day/student.

```bash
curl -sS -i https://aos.edgelab.space/api/v1/me \
  -H 'Authorization: Bearer aos_live_...'
```

## Ответы по контракту

| Статус | Тип | Схема | Описание |
| --- | --- | --- | --- |
| 200 | application/json | [Me](/docs/schemas#me) | Успех |
| ошибка | application/json | [ErrorBody](/docs/schemas#errorbody) | Ошибка; коды: UNAUTHENTICATED, NO_ENTITLEMENT, ENTITLEMENT_UNAVAILABLE, RATE_LIMITED |

Машиночитаемый контракт: [openapi.json](/docs/openapi.json), операция `me`.
