---
title: "List custom fields"
method: GET
path: "/custom-fields"
tags: ["Custom Fields"]
---

# List custom fields

`GET /custom-fields`

## Request

- Base URL: `https://api.commonroom.io/api/v2`
- URL: `https://api.commonroom.io/api/v2/custom-fields`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/commonroom/apis/common-room-api-v2/docs/custom-fields/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve all custom field definitions for the community, optionally
filtered by entity type.

## Query parameters

- `entityType` string

## Response `200`

OK

- CustomFieldList
  - `success` true, required
  - `data` ApiCustomField[], required
    - `id` string, required: Prefixed custom field ID (format `cf_<number>`)
    - `name` string, required: The custom field's display name
    - `entityTypes` string[], required: Entity types this field applies to
    - `keyField` boolean, required: Whether this is a key field used for deduplication
    - `valueType` 'string' | 'url' | 'int' | 'number' | 'date' | 'boolean', required: The data type of field values
    - `sampleValues` ApiFieldValue[]: Example values for this field
      - union: A typed custom-field value. The `type` discriminator indicates the value's runtime type.
        - object
          - `type` 'string', required
          - `value` string, required
        - object
          - `type` 'url', required
          - `value` string, uri, required
        - object
          - `type` 'int', required
          - `value` integer, required
        - object
          - `type` 'number', required
          - `value` number, required
        - object
          - `type` 'date', required
          - `value` string, date-time, required
        - object
          - `type` 'boolean', required
          - `value` boolean, required
    - `description` string, nullable: Human-readable description of the field
    - `targetSubTypes` string[]: Sub-types this field targets
    - `providedBy` string, nullable: Name of the provider that owns this field, if any
    - `objectTypeId` string: Prefixed object type ID (format `cot_<number>`), if this field belongs to a specific object type

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `429`: Rate Limited

---

[API](https://skmtc.dev/commonroom/apis/common-room-api-v2.md) - [All operations](https://skmtc.dev/commonroom/apis/common-room-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/commonroom/apis/common-room-api-v2/revisions/865d4d43dadf?raw)
