---
title: "Get a custom field by ID"
method: GET
path: "/custom-fields/{id}"
tags: ["Custom Fields"]
---

# Get a custom field by ID

`GET /custom-fields/{id}`

## Request

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

Retrieve a specific custom field definition by its unique identifier.

## Path parameters

- `id` string, required

## Response `200`

OK

- CustomFieldResponse
  - `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 (e.g. invalid custom field ID)
- `403`: Forbidden
- `404`: Custom field not found
- `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)
