# Object

## Create a custom object record

`$ lightfield object create`

**post** `/v1/objects/{entitySlug}/values`

Creates a new record for the specified custom object type.

Read definitions for the object type’s configured `$pipeline` and `$stage` fields and options. See <u>[Pipelines and stages](/using-the-api/fields-and-relationships/#pipelines-and-stages)</u> for write rules.

### Parameters

- `--entity-slug: string`

  The slug of the custom object type.

- `--fields: map[string or number or boolean or 3 more]`

  Field names to values for the new record.

- `--relationships: optional map[string or array of string]`

  Relationship names to entity ID(s) to associate.

### Returns

- `object_create_response: object { id, createdAt, fields, 4 more }`

  - `id: string`

    Unique identifier for the entity.

  - `createdAt: string`

    ISO 8601 timestamp of when the entity was created.

  - `fields: map[object { value, valueType } ]`

    Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `httpLink: string`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: map[object { cardinality, objectType, values, directions } ]`

    Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

    - `cardinality: string`

      Whether the relationship is `has_one` or `has_many`.

    - `objectType: string`

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

    - `values: array of string`

      IDs of the related entities.

    - `directions: optional object { asDestination, asSource }`

      Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, values }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

      - `asSource: object { cardinality, values }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

  - `updatedAt: string`

    ISO 8601 timestamp of when the entity was last updated, or null.

  - `externalId: optional string`

    External identifier for the entity, or null if unset.

### Example

```cli
lightfield object create \
  --api-key 'My API Key' \
  --entity-slug entitySlug \
  --fields '{foo: string}'
```

#### Response

```json
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ],
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        }
      }
    }
  },
  "updatedAt": "updatedAt",
  "externalId": "externalId"
}
```

## Get a custom object record

`$ lightfield object retrieve`

**get** `/v1/objects/{entitySlug}/values/{id}`

Retrieves a single record by ID for the specified custom object type.

### Parameters

- `--entity-slug: string`

  The slug of the custom object type.

- `--id: string`

  The ID of the record to retrieve.

### Returns

- `object_retrieve_response: object { id, createdAt, fields, 4 more }`

  - `id: string`

    Unique identifier for the entity.

  - `createdAt: string`

    ISO 8601 timestamp of when the entity was created.

  - `fields: map[object { value, valueType } ]`

    Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `httpLink: string`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: map[object { cardinality, objectType, values, directions } ]`

    Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

    - `cardinality: string`

      Whether the relationship is `has_one` or `has_many`.

    - `objectType: string`

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

    - `values: array of string`

      IDs of the related entities.

    - `directions: optional object { asDestination, asSource }`

      Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, values }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

      - `asSource: object { cardinality, values }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

  - `updatedAt: string`

    ISO 8601 timestamp of when the entity was last updated, or null.

  - `externalId: optional string`

    External identifier for the entity, or null if unset.

### Example

```cli
lightfield object retrieve \
  --api-key 'My API Key' \
  --entity-slug entitySlug \
  --id id
```

#### Response

```json
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ],
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        }
      }
    }
  },
  "updatedAt": "updatedAt",
  "externalId": "externalId"
}
```

## Update a custom object record

`$ lightfield object update`

**post** `/v1/objects/{entitySlug}/values/{id}`

Updates an existing record by ID for the specified custom object type. Only included fields and relationships are modified.

Read definitions for the object type’s configured `$pipeline` and `$stage` fields and options. See <u>[Pipelines and stages](/using-the-api/fields-and-relationships/#pipelines-and-stages)</u> for write rules.

### Parameters

- `--entity-slug: string`

  Path param: The slug of the custom object type.

- `--id: string`

  Path param: The ID of the record to update.

- `--fields: optional map[string or number or boolean or 3 more]`

  Body param: Field names to values. Only provided fields are modified.

- `--relationships: optional map[object { add, remove, replace } ]`

  Body param: Relationship names to operations (`add`, `remove`, or `replace`).

### Returns

- `object_update_response: object { id, createdAt, fields, 4 more }`

  - `id: string`

    Unique identifier for the entity.

  - `createdAt: string`

    ISO 8601 timestamp of when the entity was created.

  - `fields: map[object { value, valueType } ]`

    Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `httpLink: string`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: map[object { cardinality, objectType, values, directions } ]`

    Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

    - `cardinality: string`

      Whether the relationship is `has_one` or `has_many`.

    - `objectType: string`

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

    - `values: array of string`

      IDs of the related entities.

    - `directions: optional object { asDestination, asSource }`

      Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, values }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

      - `asSource: object { cardinality, values }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

  - `updatedAt: string`

    ISO 8601 timestamp of when the entity was last updated, or null.

  - `externalId: optional string`

    External identifier for the entity, or null if unset.

### Example

```cli
lightfield object update \
  --api-key 'My API Key' \
  --entity-slug entitySlug \
  --id id
```

#### Response

```json
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ],
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        }
      }
    }
  },
  "updatedAt": "updatedAt",
  "externalId": "externalId"
}
```

## Delete a custom object record

`$ lightfield object delete`

**delete** `/v1/objects/{entitySlug}/values/{id}`

Moves a custom object record to the trash. The record is soft-deleted and may be restored with `POST /v1/objects/{entitySlug}/values/{id}/restore`.

Calling delete on an already-trashed record is a no-op and returns the existing record.

**[Required scope](/using-the-api/scopes/):** `custom_objects:delete`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Parameters

- `--entity-slug: string`

  Path param: The slug of the custom object type.

- `--id: string`

  Path param: The ID of the record to delete.

- `--body: optional object {  }`

  Body param

### Returns

- `object_delete_response: object { id, createdAt, fields, 4 more }`

  - `id: string`

    Unique identifier for the entity.

  - `createdAt: string`

    ISO 8601 timestamp of when the entity was created.

  - `fields: map[object { value, valueType } ]`

    Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `httpLink: string`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: map[object { cardinality, objectType, values, directions } ]`

    Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

    - `cardinality: string`

      Whether the relationship is `has_one` or `has_many`.

    - `objectType: string`

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

    - `values: array of string`

      IDs of the related entities.

    - `directions: optional object { asDestination, asSource }`

      Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, values }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

      - `asSource: object { cardinality, values }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

  - `updatedAt: string`

    ISO 8601 timestamp of when the entity was last updated, or null.

  - `externalId: optional string`

    External identifier for the entity, or null if unset.

### Example

```cli
lightfield object delete \
  --api-key 'My API Key' \
  --entity-slug entitySlug \
  --id id
```

#### Response

```json
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ],
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        }
      }
    }
  },
  "updatedAt": "updatedAt",
  "externalId": "externalId"
}
```

## Restore a custom object record

`$ lightfield object restore`

**post** `/v1/objects/{entitySlug}/values/{id}/restore`

Restores a trashed custom object record, bringing it back to active.

Calling restore on a record that is not trashed is a no-op and returns the existing record. A record of a different custom object type than `entitySlug` is reported as not found.

**[Required scope](/using-the-api/scopes/):** `custom_objects:restore`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Parameters

- `--entity-slug: string`

  Path param: The slug of the custom object type.

- `--id: string`

  Path param: The ID of the record to restore.

- `--body: optional object {  }`

  Body param

### Returns

- `object_restore_response: object { id, createdAt, fields, 4 more }`

  - `id: string`

    Unique identifier for the entity.

  - `createdAt: string`

    ISO 8601 timestamp of when the entity was created.

  - `fields: map[object { value, valueType } ]`

    Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `httpLink: string`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: map[object { cardinality, objectType, values, directions } ]`

    Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

    - `cardinality: string`

      Whether the relationship is `has_one` or `has_many`.

    - `objectType: string`

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

    - `values: array of string`

      IDs of the related entities.

    - `directions: optional object { asDestination, asSource }`

      Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, values }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

      - `asSource: object { cardinality, values }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

  - `updatedAt: string`

    ISO 8601 timestamp of when the entity was last updated, or null.

  - `externalId: optional string`

    External identifier for the entity, or null if unset.

### Example

```cli
lightfield object restore \
  --api-key 'My API Key' \
  --entity-slug entitySlug \
  --id id
```

#### Response

```json
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ],
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        }
      }
    }
  },
  "updatedAt": "updatedAt",
  "externalId": "externalId"
}
```

## List custom object records

`$ lightfield object list`

**get** `/v1/objects/{entitySlug}`

Returns a paginated list of records for the specified custom object type. Results are sorted by when the record was created in Lightfield (`createdAt`), newest first. Use `offset` and `limit` to paginate through results, and `$field` query parameters to filter. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about <u>[pagination](/using-the-api/list-endpoints/#pagination)</u> and <u>[filtering](/using-the-api/list-endpoints/#filtering)</u>.

### Parameters

- `--entity-slug: string`

  The slug of the custom object type.

- `--limit: optional number`

  Maximum number of records to return. Defaults to 25, maximum 25.

- `--offset: optional number`

  Number of records to skip for pagination. Defaults to 0.

### Returns

- `object_list_response: object { data, object, totalCount }`

  - `data: array of object { id, createdAt, fields, 4 more }`

    Array of entity objects for the current page.

    - `id: string`

      Unique identifier for the entity.

    - `createdAt: string`

      ISO 8601 timestamp of when the entity was created.

    - `fields: map[object { value, valueType } ]`

      Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

      - `value: string or number or boolean or 3 more`

        The field value, or null if unset.

        - `union_member_0: string`

        - `union_member_1: number`

        - `union_member_2: boolean`

        - `union_member_3: array of string`

        - `Address: object { city, country, latitude, 5 more }`

          - `city: optional string`

            City name.

          - `country: optional string`

            2-letter ISO 3166-1 alpha-2 country code.

          - `latitude: optional number`

            Latitude coordinate.

          - `longitude: optional number`

            Longitude coordinate.

          - `postalCode: optional string`

            Postal or ZIP code.

          - `state: optional string`

            State or province.

          - `street: optional string`

            Street address line 1.

          - `street2: optional string`

            Street address line 2.

        - `FullName: object { firstName, lastName }`

          - `firstName: optional string`

            The contact's first name.

          - `lastName: optional string`

            The contact's last name.

      - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

        The data type of the field.

        - `"ADDRESS"`

        - `"CHECKBOX"`

        - `"CURRENCY"`

        - `"DATETIME"`

        - `"EMAIL"`

        - `"FULL_NAME"`

        - `"MARKDOWN"`

        - `"MULTI_SELECT"`

        - `"NUMBER"`

        - `"SINGLE_SELECT"`

        - `"SOCIAL_HANDLE"`

        - `"TELEPHONE"`

        - `"TEXT"`

        - `"URL"`

        - `"HTML"`

    - `httpLink: string`

      URL to view the entity in the Lightfield web app, or null.

    - `relationships: map[object { cardinality, objectType, values, directions } ]`

      Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

      - `cardinality: string`

        Whether the relationship is `has_one` or `has_many`.

      - `objectType: string`

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

      - `values: array of string`

        IDs of the related entities.

      - `directions: optional object { asDestination, asSource }`

        Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

        - `asDestination: object { cardinality, values }`

          The current record is the destination (incoming) endpoint.

          - `cardinality: "HAS_ONE" or "HAS_MANY"`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: array of string`

            IDs of the related entities in this direction.

        - `asSource: object { cardinality, values }`

          The current record is the source (outgoing) endpoint.

          - `cardinality: "HAS_ONE" or "HAS_MANY"`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: array of string`

            IDs of the related entities in this direction.

    - `updatedAt: string`

      ISO 8601 timestamp of when the entity was last updated, or null.

    - `externalId: optional string`

      External identifier for the entity, or null if unset.

  - `object: string`

    The object type, always `"list"`.

  - `totalCount: number`

    Total number of entities matching the query.

### Example

```cli
lightfield object list \
  --api-key 'My API Key' \
  --entity-slug entitySlug
```

#### Response

```json
{
  "data": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "fields": {
        "foo": {
          "value": "string",
          "valueType": "ADDRESS"
        }
      },
      "httpLink": "httpLink",
      "relationships": {
        "foo": {
          "cardinality": "cardinality",
          "objectType": "objectType",
          "values": [
            "string"
          ],
          "directions": {
            "asDestination": {
              "cardinality": "HAS_ONE",
              "values": [
                "string"
              ]
            },
            "asSource": {
              "cardinality": "HAS_ONE",
              "values": [
                "string"
              ]
            }
          }
        }
      },
      "updatedAt": "updatedAt",
      "externalId": "externalId"
    }
  ],
  "object": "object",
  "totalCount": 0
}
```

## Get definitions for a custom object type

`$ lightfield object definitions`

**get** `/v1/objects/{entitySlug}/definitions`

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

### Parameters

- `--entity-slug: string`

  The slug of the custom object type.

### Returns

- `object_definitions_response: 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, 3 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.

        - `"TWITTER"`

        - `"LINKEDIN"`

        - `"FACEBOOK"`

        - `"INSTAGRAM"`

      - `multipleValues: optional boolean`

        Whether this field accepts multiple values.

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

        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.

        - `parentId: optional string`

          For a dependent select, the ID of the option in the parent field named by `typeConfiguration.parentFieldKey` that owns this option. Absent for ordinary selects.

      - `parentFieldKey: optional string`

        For a dependent select, the field key whose selected option determines which of this field's options apply. Absent for ordinary selects.

      - `unique: optional boolean`

        Whether values for this field must be unique.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      Data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

    - `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, 3 more } ]`

    Map of relationship keys to their definitions. Self-referential relationships include optional directional metadata on the bare definition.

    - `cardinality: "HAS_ONE" or "HAS_MANY"`

      Whether this is a `has_one` or `has_many` relationship.

      - `"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.

    - `directions: optional object { asDestination, asSource }`

      Directional metadata for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, label }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `label: string`

          Human-readable display name for this endpoint direction.

      - `asSource: object { cardinality, label }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `label: string`

          Human-readable display name for this endpoint direction.

### Example

```cli
lightfield object definitions \
  --api-key 'My API Key' \
  --entity-slug entitySlug
```

#### Response

```json
{
  "fieldDefinitions": {
    "foo": {
      "description": "description",
      "label": "label",
      "typeConfiguration": {
        "currency": "currency",
        "handleService": "TWITTER",
        "multipleValues": true,
        "options": [
          {
            "id": "id",
            "label": "label",
            "description": "description",
            "parentId": "parentId"
          }
        ],
        "parentFieldKey": "parentFieldKey",
        "unique": true
      },
      "valueType": "ADDRESS",
      "id": "id",
      "readOnly": true
    }
  },
  "objectType": "objectType",
  "relationshipDefinitions": {
    "foo": {
      "cardinality": "HAS_ONE",
      "description": "description",
      "label": "label",
      "objectType": "objectType",
      "id": "id",
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "label": "label"
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "label": "label"
        }
      }
    }
  }
}
```

## List custom object types

`$ lightfield object list-definitions`

**get** `/v1/objects`

Returns all custom object types available to the caller, sorted alphabetically by `objectType`.

### Returns

- `object_list_definitions_response: object { data }`

  - `data: array of object { label, objectType }`

    All object types available to the caller.

    - `label: string`

      Human-readable display name.

    - `objectType: string`

      The slug used to reference this object type in the API.

### Example

```cli
lightfield object list-definitions \
  --api-key 'My API Key'
```

#### Response

```json
{
  "data": [
    {
      "label": "label",
      "objectType": "objectType"
    }
  ]
}
```

## Get field value history for a custom object record

`$ lightfield object field-history`

**get** `/v1/objects/{entitySlug}/values/{id}/fields/{fieldKey}/history`

Returns the value-change history for a single field on a record, newest first. Consecutive identical values are collapsed. History is cursor-paginated: pass `nextCursor` from the previous response as `after` to page through older values. Only attribute-backed fields (custom attributes and attribute-backed system fields) have history — column-backed system fields return an error.

**[Required scope](/using-the-api/scopes/):** `custom_objects:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

### Parameters

- `--entity-slug: string`

  Path param: The slug of the custom object type.

- `--id: string`

  Path param: Unique identifier of the record.

- `--field-key: string`

  Path param: Field key whose value history to return. System fields use a `$` prefix (e.g. `$status`); custom attributes use their bare slug.

- `--after: optional string`

  Query param: Cursor from a previous response’s `nextCursor` to fetch the next page.

- `--limit: optional number`

  Query param: Maximum number of history entries to return. Defaults to 20, maximum 100.

### Returns

- `object_field_history_response: object { data, hasMore, nextCursor }`

  - `data: array of object { displayValue, isCreate, recordedAt, 2 more }`

    Recorded values for the field, newest first.

    - `displayValue: string`

      Human-readable rendering of the value (e.g. a select option label), suitable for display.

    - `isCreate: boolean`

      True for the record’s original value. Only set when the full history fits in the response (never on a truncated/paginated page).

    - `recordedAt: string`

      ISO 8601 timestamp of when this value was recorded.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `hasMore: boolean`

    Whether more history exists beyond this page.

  - `nextCursor: string`

    Cursor to pass as `after` to fetch the next page, or null when there are no more entries.

### Example

```cli
lightfield object field-history \
  --api-key 'My API Key' \
  --entity-slug entitySlug \
  --id id \
  --field-key fieldKey
```

#### Response

```json
{
  "data": [
    {
      "displayValue": "displayValue",
      "isCreate": true,
      "recordedAt": "recordedAt",
      "value": "string",
      "valueType": "ADDRESS"
    }
  ],
  "hasMore": true,
  "nextCursor": "nextCursor"
}
```

## Domain Types

### Object Create Response

- `object_create_response: object { id, createdAt, fields, 4 more }`

  - `id: string`

    Unique identifier for the entity.

  - `createdAt: string`

    ISO 8601 timestamp of when the entity was created.

  - `fields: map[object { value, valueType } ]`

    Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `httpLink: string`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: map[object { cardinality, objectType, values, directions } ]`

    Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

    - `cardinality: string`

      Whether the relationship is `has_one` or `has_many`.

    - `objectType: string`

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

    - `values: array of string`

      IDs of the related entities.

    - `directions: optional object { asDestination, asSource }`

      Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, values }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

      - `asSource: object { cardinality, values }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

  - `updatedAt: string`

    ISO 8601 timestamp of when the entity was last updated, or null.

  - `externalId: optional string`

    External identifier for the entity, or null if unset.

### Object Definitions Response

- `object_definitions_response: 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, 3 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.

        - `"TWITTER"`

        - `"LINKEDIN"`

        - `"FACEBOOK"`

        - `"INSTAGRAM"`

      - `multipleValues: optional boolean`

        Whether this field accepts multiple values.

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

        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.

        - `parentId: optional string`

          For a dependent select, the ID of the option in the parent field named by `typeConfiguration.parentFieldKey` that owns this option. Absent for ordinary selects.

      - `parentFieldKey: optional string`

        For a dependent select, the field key whose selected option determines which of this field's options apply. Absent for ordinary selects.

      - `unique: optional boolean`

        Whether values for this field must be unique.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      Data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

    - `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, 3 more } ]`

    Map of relationship keys to their definitions. Self-referential relationships include optional directional metadata on the bare definition.

    - `cardinality: "HAS_ONE" or "HAS_MANY"`

      Whether this is a `has_one` or `has_many` relationship.

      - `"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.

    - `directions: optional object { asDestination, asSource }`

      Directional metadata for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, label }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `label: string`

          Human-readable display name for this endpoint direction.

      - `asSource: object { cardinality, label }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `label: string`

          Human-readable display name for this endpoint direction.

### Object Delete Response

- `object_delete_response: object { id, createdAt, fields, 4 more }`

  - `id: string`

    Unique identifier for the entity.

  - `createdAt: string`

    ISO 8601 timestamp of when the entity was created.

  - `fields: map[object { value, valueType } ]`

    Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `httpLink: string`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: map[object { cardinality, objectType, values, directions } ]`

    Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

    - `cardinality: string`

      Whether the relationship is `has_one` or `has_many`.

    - `objectType: string`

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

    - `values: array of string`

      IDs of the related entities.

    - `directions: optional object { asDestination, asSource }`

      Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, values }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

      - `asSource: object { cardinality, values }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

  - `updatedAt: string`

    ISO 8601 timestamp of when the entity was last updated, or null.

  - `externalId: optional string`

    External identifier for the entity, or null if unset.

### Object Field History Response

- `object_field_history_response: object { data, hasMore, nextCursor }`

  - `data: array of object { displayValue, isCreate, recordedAt, 2 more }`

    Recorded values for the field, newest first.

    - `displayValue: string`

      Human-readable rendering of the value (e.g. a select option label), suitable for display.

    - `isCreate: boolean`

      True for the record’s original value. Only set when the full history fits in the response (never on a truncated/paginated page).

    - `recordedAt: string`

      ISO 8601 timestamp of when this value was recorded.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `hasMore: boolean`

    Whether more history exists beyond this page.

  - `nextCursor: string`

    Cursor to pass as `after` to fetch the next page, or null when there are no more entries.

### Object List Definitions Response

- `object_list_definitions_response: object { data }`

  - `data: array of object { label, objectType }`

    All object types available to the caller.

    - `label: string`

      Human-readable display name.

    - `objectType: string`

      The slug used to reference this object type in the API.

### Object List Response

- `object_list_response: object { data, object, totalCount }`

  - `data: array of object { id, createdAt, fields, 4 more }`

    Array of entity objects for the current page.

    - `id: string`

      Unique identifier for the entity.

    - `createdAt: string`

      ISO 8601 timestamp of when the entity was created.

    - `fields: map[object { value, valueType } ]`

      Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

      - `value: string or number or boolean or 3 more`

        The field value, or null if unset.

        - `union_member_0: string`

        - `union_member_1: number`

        - `union_member_2: boolean`

        - `union_member_3: array of string`

        - `Address: object { city, country, latitude, 5 more }`

          - `city: optional string`

            City name.

          - `country: optional string`

            2-letter ISO 3166-1 alpha-2 country code.

          - `latitude: optional number`

            Latitude coordinate.

          - `longitude: optional number`

            Longitude coordinate.

          - `postalCode: optional string`

            Postal or ZIP code.

          - `state: optional string`

            State or province.

          - `street: optional string`

            Street address line 1.

          - `street2: optional string`

            Street address line 2.

        - `FullName: object { firstName, lastName }`

          - `firstName: optional string`

            The contact's first name.

          - `lastName: optional string`

            The contact's last name.

      - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

        The data type of the field.

        - `"ADDRESS"`

        - `"CHECKBOX"`

        - `"CURRENCY"`

        - `"DATETIME"`

        - `"EMAIL"`

        - `"FULL_NAME"`

        - `"MARKDOWN"`

        - `"MULTI_SELECT"`

        - `"NUMBER"`

        - `"SINGLE_SELECT"`

        - `"SOCIAL_HANDLE"`

        - `"TELEPHONE"`

        - `"TEXT"`

        - `"URL"`

        - `"HTML"`

    - `httpLink: string`

      URL to view the entity in the Lightfield web app, or null.

    - `relationships: map[object { cardinality, objectType, values, directions } ]`

      Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

      - `cardinality: string`

        Whether the relationship is `has_one` or `has_many`.

      - `objectType: string`

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

      - `values: array of string`

        IDs of the related entities.

      - `directions: optional object { asDestination, asSource }`

        Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

        - `asDestination: object { cardinality, values }`

          The current record is the destination (incoming) endpoint.

          - `cardinality: "HAS_ONE" or "HAS_MANY"`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: array of string`

            IDs of the related entities in this direction.

        - `asSource: object { cardinality, values }`

          The current record is the source (outgoing) endpoint.

          - `cardinality: "HAS_ONE" or "HAS_MANY"`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: array of string`

            IDs of the related entities in this direction.

    - `updatedAt: string`

      ISO 8601 timestamp of when the entity was last updated, or null.

    - `externalId: optional string`

      External identifier for the entity, or null if unset.

  - `object: string`

    The object type, always `"list"`.

  - `totalCount: number`

    Total number of entities matching the query.

### Object Restore Response

- `object_restore_response: object { id, createdAt, fields, 4 more }`

  - `id: string`

    Unique identifier for the entity.

  - `createdAt: string`

    ISO 8601 timestamp of when the entity was created.

  - `fields: map[object { value, valueType } ]`

    Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `httpLink: string`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: map[object { cardinality, objectType, values, directions } ]`

    Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

    - `cardinality: string`

      Whether the relationship is `has_one` or `has_many`.

    - `objectType: string`

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

    - `values: array of string`

      IDs of the related entities.

    - `directions: optional object { asDestination, asSource }`

      Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, values }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

      - `asSource: object { cardinality, values }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

  - `updatedAt: string`

    ISO 8601 timestamp of when the entity was last updated, or null.

  - `externalId: optional string`

    External identifier for the entity, or null if unset.

### Object Retrieve Response

- `object_retrieve_response: object { id, createdAt, fields, 4 more }`

  - `id: string`

    Unique identifier for the entity.

  - `createdAt: string`

    ISO 8601 timestamp of when the entity was created.

  - `fields: map[object { value, valueType } ]`

    Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `httpLink: string`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: map[object { cardinality, objectType, values, directions } ]`

    Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

    - `cardinality: string`

      Whether the relationship is `has_one` or `has_many`.

    - `objectType: string`

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

    - `values: array of string`

      IDs of the related entities.

    - `directions: optional object { asDestination, asSource }`

      Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, values }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

      - `asSource: object { cardinality, values }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

  - `updatedAt: string`

    ISO 8601 timestamp of when the entity was last updated, or null.

  - `externalId: optional string`

    External identifier for the entity, or null if unset.

### Object Update Response

- `object_update_response: object { id, createdAt, fields, 4 more }`

  - `id: string`

    Unique identifier for the entity.

  - `createdAt: string`

    ISO 8601 timestamp of when the entity was created.

  - `fields: map[object { value, valueType } ]`

    Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug.

    - `value: string or number or boolean or 3 more`

      The field value, or null if unset.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: boolean`

      - `union_member_3: array of string`

      - `Address: object { city, country, latitude, 5 more }`

        - `city: optional string`

          City name.

        - `country: optional string`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: optional number`

          Latitude coordinate.

        - `longitude: optional number`

          Longitude coordinate.

        - `postalCode: optional string`

          Postal or ZIP code.

        - `state: optional string`

          State or province.

        - `street: optional string`

          Street address line 1.

        - `street2: optional string`

          Street address line 2.

      - `FullName: object { firstName, lastName }`

        - `firstName: optional string`

          The contact's first name.

        - `lastName: optional string`

          The contact's last name.

    - `valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `httpLink: string`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: map[object { cardinality, objectType, values, directions } ]`

    Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record's role with `:asSource` or `:asDestination`, for example `?parent:asSource[contains]=account_id`.

    - `cardinality: string`

      Whether the relationship is `has_one` or `has_many`.

    - `objectType: string`

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

    - `values: array of string`

      IDs of the related entities.

    - `directions: optional object { asDestination, asSource }`

      Directional values for a self-referential relationship. List filters use the relationship key with `:asSource` or `:asDestination`; writes continue to use the bare key.

      - `asDestination: object { cardinality, values }`

        The current record is the destination (incoming) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

      - `asSource: object { cardinality, values }`

        The current record is the source (outgoing) endpoint.

        - `cardinality: "HAS_ONE" or "HAS_MANY"`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: array of string`

          IDs of the related entities in this direction.

  - `updatedAt: string`

    ISO 8601 timestamp of when the entity was last updated, or null.

  - `externalId: optional string`

    External identifier for the entity, or null if unset.
