> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.docs.modulards.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server.

# Includes and sparse fieldsets

## Including related resources

`include` adds related resources to the response, so you do not need a second request for them. Pass a comma-separated list of relationships:

```bash
curl "https://api.modulards.com/api/public/v1/sites?include=team,tags" \
  -H "Authorization: Bearer $MODULAR_DS_TOKEN"
```

Each resource in `data` then lists the related ids under `relationships`, and the related resources themselves appear once each in the top-level `included` array. Each endpoint documents the includes it accepts; any other answers `400` (see [Filtering and sorting](/filtering-and-sorting)).

## Sparse fieldsets

`fields[type]` limits the attributes returned for resources of that type. The key is the resource `type`, and the value a comma-separated list of attributes:

```text
fields[sites]=name,host
```

## Computed attributes

Some attributes cost more to produce, so a plain listing leaves them out and you ask for them through `fields`. On websites, for example, `note` (the private note, decrypted on demand) and `is_favorite` are only returned when you request them:

```text
fields[sites]=name,note,is_favorite
```

Each endpoint documents which of its attributes are computed this way. Sorting by a computed attribute, where the endpoint allows it, computes it too.