# list_reference_options

Source: https://modulify.ai/docs/api/database/list-reference-options

Lists the rows another collection offers as targets for a reference column.

- Title: List the values a reference column can point at
- Scope: `data:read`
- Access: Read only
- Endpoint: `POST /v1/list_reference_options`

Use it so a value written by `create_row` or `update_row` points at something real, since without it a reference value is a guess. Pass the collection being referenced and the column holding the value to store, usually its primary key.

Each option comes back as a `value` and a `label`, read from the collection's first `title`, `name`, `slug`, `label` or `email` column, which the response names in `labelColumn`. `search` narrows by that label, and `ids` fetches specific rows back so an existing value can be shown as a name rather than a bare id. It returns 20 rows per call and caps `limit` at 200, with `hasMore` telling you whether to page. See [Relationship fields](https://modulify.ai/docs/data/column-types#relationship-fields).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/list_reference_options`, sending the inputs below as a JSON object. The token needs the `data:read` scope.

It only reads and changes nothing, so retrying it is safe.

```bash
curl -X POST https://api.modulify.ai/v1/list_reference_options \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID","name":"NAME","valueColumn":"VALUE_COLUMN"}'
```

Over MCP, the same method is the [list_reference_options tool](https://modulify.ai/docs/mcp/database/list-reference-options).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `schema` | string | No | The schema the collection lives in, exactly as `list_collections` reports it. Leave it out to use the site database's own default, which is right unless `list_collections` showed something else. A site on the newer database always uses its default. |
| `name` | string | Yes | The collection being referenced, exactly as `list_collections` reports it. |
| `valueColumn` | string | Yes | The column whose value the reference stores, usually the primary key. |
| `search` | string | No | Narrows the options by label. |
| `ids` | array of strings | No | Fetches these specific rows, to turn stored values back into readable labels. At most 200 are read, and `search`, `offset` and `limit` are ignored while it is set. |
| `offset` | integer | No | Rows to skip. Defaults to 0. |
| `limit` | integer | No | How many rows to return. Defaults to 20 and is capped at 200. |

## Response

Every call answers with the [JSON envelope](https://modulify.ai/docs/api/requests-and-responses#the-response) of `success`, `message`, `data`, `code` and `version`. `data` holds the result described above, and on a method that returns a total, `count` carries it. The [response headers](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) carry the call's `X-Request-Id` and what is left of your per-minute budget in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. [Errors](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.