# list_enum_options

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

Lists every value a database enum type accepts.

- Title: List the values an enum column accepts
- Scope: `data:read`
- Access: Read only
- Endpoint: `POST /v1/list_enum_options`

A column whose type is an enum refuses anything outside this list, so read it before writing that column with `create_row` or `update_row`. `get_collection_schema` names the enum type of each such column in its `udtName`.

Only a site on the older database, which is Postgres, has enum types, so on the newer database this always answers with an empty list. A type name that does not exist is not refused either: the call succeeds with an empty list, so on the older database an empty result usually means the name was mistyped. See [On the older database](https://modulify.ai/docs/data/column-types#on-the-older-database).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/list_enum_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_enum_options \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID","enumType":"ENUM_TYPE"}'
```

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

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `enumType` | string | Yes | The enum type name, from `get_collection_schema`. |

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