> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onvy.health/llms.txt
> Use this file to discover all available pages before exploring further.

# Resources and pagination

> Understand the main Health API resource families and how opaque pagination works.

## Project model

Your ONVY integration is scoped to a `project_id`. The users, data, and tokens you work with belong to that project. User IDs are supplied by your integration and must be unique within the project.

## Main resource families

| Resource           | What it represents                                                                                                                                        | Example routes                              |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| `users`            | The root record for a person in your ONVY project                                                                                                         | `POST /users`, `GET /users/{user_id}`       |
| `baselines`        | Stable user-specific baselines used for personalization                                                                                                   | `GET /users/{user_id}/baselines`            |
| `daily_records`    | Harmonized daily scores, zones, and logs                                                                                                                  | `GET /users/{user_id}/daily_records/{type}` |
| `facts`            | Long-term profile and context facts used for AI personalization                                                                                           | `GET /users/{user_id}/facts`                |
| `activities`       | Workouts and mindfulness sessions                                                                                                                         | `GET /users/{user_id}/activities`           |
| `ai_summaries`     | Typed AI outputs covering meals, sleep, workouts, daily, weekly, nutrition, trend, and impact analysis. See `/ai-capabilities` for the full type catalog. | `GET /users/{user_id}/ai/summaries`         |
| `custom_records`   | Customer-defined records and record types                                                                                                                 | `GET /users/{user_id}/custom_records`       |
| `meals`            | Nutrition entries with AI meal analysis. The analyzed result is also exposed as a `MealSummary` under `ai_summaries`.                                     | `GET /users/{user_id}/nutrition/meals`      |
| `chat completions` | User-scoped conversational AI with health context injection                                                                                               | `POST /users/{user_id}/chat/completions`    |

<Note>
  Domain-specific insights such as meal nutrition analysis, sleep insights, or weekly trends are delivered through `ai_summaries` rather than as separate top-level resources. See `/ai-capabilities` for the full list of summary types and how each is generated.
</Note>

## Pagination contract

List responses include a `pagination` object:

```json theme={null}
{
  "pagination": {
    "page": "eyJMYXN0RXZhbHVhdGVkS2V5IjogLi4ufQ==",
    "limit": 100,
    "total": 240,
    "next_page": "eyJMYXN0RXZhbHVhdGVkS2V5IjogLi4ufQ=="
  }
}
```

### Rules

* Treat `page` and `next_page` as opaque tokens.
* Pass `page={next_page}` to request the next result window.
* Do not decode or mutate the token client-side.
* `limit` defaults and maximums can vary by route. Check the endpoint reference.

## Naming conventions

* JSON fields use `snake_case`
* Enums use `PascalCase`
* Providers use `CAPITALCASE`
* ONVY-managed IDs are prefixed by type, for example `proj_`, `score_`, or `recmd_`
