Skip to content

Get definitions for a custom object type

GET/v1/objects/{entitySlug}/definitions

Returns field and relationship definitions for the specified custom object type.

Path ParametersExpand Collapse
entitySlug: string

The slug of the custom object type.

ReturnsExpand Collapse
ObjectDefinitionsResponse object { fieldDefinitions, objectType, relationshipDefinitions }
fieldDefinitions: map[object { description, label, typeConfiguration, 3 more } ]

Map of field keys to their definitions, including both system and custom fields.

description: string

Description of the field, or null.

label: string

Human-readable display name of the field.

typeConfiguration: object { currency, handleService, multipleValues, 2 more }

Type-specific configuration (e.g. select options, currency code).

currency: optional string

ISO 4217 3-letter currency code.

handleService: optional "TWITTER" or "LINKEDIN" or "FACEBOOK" or "INSTAGRAM"

Social platform associated with this handle field.

One of the following:
"TWITTER"
"LINKEDIN"
"FACEBOOK"
"INSTAGRAM"
multipleValues: optional boolean

Whether this field accepts multiple values.

options: optional array of object { id, label, description }

Available options for select fields.

id: string

Unique identifier of the select option.

label: string

Human-readable display name of the option.

description: optional string

Description of the option, or null.

unique: optional boolean

Whether values for this field must be unique.

valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 11 more

Data type of the field.

One of the following:
"ADDRESS"
"CHECKBOX"
"CURRENCY"
"DATETIME"
"EMAIL"
"FULL_NAME"
"MARKDOWN"
"MULTI_SELECT"
"NUMBER"
"SINGLE_SELECT"
"SOCIAL_HANDLE"
"TELEPHONE"
"TEXT"
"URL"
id: optional string

Unique identifier of the field definition.

readOnly: optional boolean

true for fields that are not writable via the API (e.g. AI-generated summaries). false or absent for writable fields.

objectType: string

The object type these definitions belong to (e.g. account).

relationshipDefinitions: map[object { cardinality, description, label, 2 more } ]

Map of relationship keys to their definitions.

cardinality: "HAS_ONE" or "HAS_MANY"

Whether this is a has_one or has_many relationship.

One of the following:
"HAS_ONE"
"HAS_MANY"
description: string

Description of the relationship, or null.

label: string

Human-readable display name of the relationship.

objectType: string

The type of the related object (e.g. account, contact).

id: optional string

Unique identifier of the relationship definition.

Get definitions for a custom object type

curl https://api.lightfield.app/v1/objects/$ENTITY_SLUG/definitions \
    -H 'Lightfield-Version: 2026-03-01' \
    -H "Authorization: Bearer $API_KEY"
{
  "fieldDefinitions": {
    "foo": {
      "description": "description",
      "label": "label",
      "typeConfiguration": {
        "currency": "currency",
        "handleService": "TWITTER",
        "multipleValues": true,
        "options": [
          {
            "id": "id",
            "label": "label",
            "description": "description"
          }
        ],
        "unique": true
      },
      "valueType": "ADDRESS",
      "id": "id",
      "readOnly": true
    }
  },
  "objectType": "objectType",
  "relationshipDefinitions": {
    "foo": {
      "cardinality": "HAS_ONE",
      "description": "description",
      "label": "label",
      "objectType": "objectType",
      "id": "id"
    }
  }
}
Returns Examples
{
  "fieldDefinitions": {
    "foo": {
      "description": "description",
      "label": "label",
      "typeConfiguration": {
        "currency": "currency",
        "handleService": "TWITTER",
        "multipleValues": true,
        "options": [
          {
            "id": "id",
            "label": "label",
            "description": "description"
          }
        ],
        "unique": true
      },
      "valueType": "ADDRESS",
      "id": "id",
      "readOnly": true
    }
  },
  "objectType": "objectType",
  "relationshipDefinitions": {
    "foo": {
      "cardinality": "HAS_ONE",
      "description": "description",
      "label": "label",
      "objectType": "objectType",
      "id": "id"
    }
  }
}