Skip to content
API Reference
Data model

Property options

Property options in Prism / Properties — Micro TypeScript reference.

Reference for TypeScript SDK 0.14.0.

Release source · Setup and client configuration

create

POST /v2/prism/{teamId}/{objectType}/properties/{propertyId}/options

client.prism.properties.options.create(propertyID, { ...params }) -> PropertyOption

Adds a single option to a select_str or multiselect_str property definition. Body must include type so the server knows which per-type option table to write.

const propertyOption =
  await client.prism.properties.options.create(
    '2fdcD1Dc-bbDb-2BBD-0Afa-1A3C33cFaADc',
    {
      objectType: 'comment',
      type: 'num',
      value: 'value',
    },
  );

update

PATCH /v2/prism/{teamId}/{objectType}/properties/{propertyId}/options/{optionId}

client.prism.properties.options.update(optionID, { ...params }) -> PropertyOption

Update a property option

const propertyOption =
  await client.prism.properties.options.update(
    '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
    {
      objectType: 'comment',
      propertyId: '2fdcD1Dc-bbDb-2BBD-0Afa-1A3C33cFaADc',
      type: 'num',
    },
  );

delete

DELETE /v2/prism/{teamId}/{objectType}/properties/{propertyId}/options/{optionId}

client.prism.properties.options.delete(optionID, { ...params }) -> void

Delete a property option

await client.prism.properties.options.delete(
  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  {
    objectType: 'comment',
    propertyId: '2fdcD1Dc-bbDb-2BBD-0Afa-1A3C33cFaADc',
    type: 'num',
  },
);

Parameter and response types

These declarations show the request parameters and response shapes used by the methods above.

PropertyOption

Source

/**
 * An enabled option for a select_str or multiselect_str property definition.
 */
export interface PropertyOption {
  id: string;

  slug: string;

  color_scheme?: string | null;

  /**
   * @deprecated
   */
  crm_id?: string | null;

  description?: string | null;

  icon?: string | null;

  list_id?: string | null;

  option_group?: string | null;

  sort_index?: number | null;

  /**
   * Display value for the option.
   */
  value?: string | null;
}

PropertyOptionCreate

Source

/**
 * New option for a `select_str` or `multiselect_str` property. `type` identifies
 * the per-type option table to write.
 */
export interface PropertyOptionCreate {
  /**
   * Storage type for a property definition. Determines which per-type table holds
   * the values, and which display formats the property can take.
   */
  type:
    | 'num'
    | 'str'
    | 'bool'
    | 'date'
    | 'text'
    | 'byte'
    | 'select_str'
    | 'multi_str'
    | 'multiselect_str'
    | 'jsonb'
    | 'ref_identity'
    | 'ref_user'
    | 'ref_organization'
    | 'ref_contact'
    | 'ref_thread'
    | 'ref_message'
    | 'ref_event'
    | 'ref_account'
    | 'ref_ai_chat_thread'
    | 'ref_ai_chat_message'
    | 'multiref_ai_chat_message'
    | 'multiref_agent_site'
    | 'multiref_action'
    | 'multiref_comment'
    | 'multiref_contact'
    | 'multiref_label'
    | 'multiref_thread'
    | 'multiref_messages'
    | 'multiref_document'
    | 'multiref_identity'
    | 'multiref_organization'
    | 'multiref_engagement'
    | 'multiref_attendee'
    | 'multiref_meeting_entry'
    | 'multiref_read_receipt'
    | 'multiref_account'
    | 'multiref_source';

  /**
   * Display value for the option.
   */
  value: string;

  color_scheme?: string | null;

  description?: string | null;

  icon?: string | null;

  /**
   * Scope the option to a specific list/app.
   */
  list_id?: string | null;

  option_group?: string | null;

  /**
   * URL-safe identifier. Defaults to a slugified `value`.
   */
  slug?: string;

  sort_index?: number | null;
}

PropertyOptionPatch

Source

/**
 * Partial update of a property option. `type` identifies the per-type option table
 * to write.
 */
export interface PropertyOptionPatch {
  /**
   * Storage type for a property definition. Determines which per-type table holds
   * the values, and which display formats the property can take.
   */
  type:
    | 'num'
    | 'str'
    | 'bool'
    | 'date'
    | 'text'
    | 'byte'
    | 'select_str'
    | 'multi_str'
    | 'multiselect_str'
    | 'jsonb'
    | 'ref_identity'
    | 'ref_user'
    | 'ref_organization'
    | 'ref_contact'
    | 'ref_thread'
    | 'ref_message'
    | 'ref_event'
    | 'ref_account'
    | 'ref_ai_chat_thread'
    | 'ref_ai_chat_message'
    | 'multiref_ai_chat_message'
    | 'multiref_agent_site'
    | 'multiref_action'
    | 'multiref_comment'
    | 'multiref_contact'
    | 'multiref_label'
    | 'multiref_thread'
    | 'multiref_messages'
    | 'multiref_document'
    | 'multiref_identity'
    | 'multiref_organization'
    | 'multiref_engagement'
    | 'multiref_attendee'
    | 'multiref_meeting_entry'
    | 'multiref_read_receipt'
    | 'multiref_account'
    | 'multiref_source';

  color_scheme?: string | null;

  description?: string | null;

  enabled?: boolean;

  icon?: string | null;

  list_id?: string | null;

  option_group?: string | null;

  slug?: string;

  sort_index?: number | null;

  value?: string;
}

OptionCreateParams

Source

export interface OptionCreateParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Path param: Object types that support CRUD, query, list, and per-type property
   * metadata. `GET /v2/prism/{teamId}/properties` (list-all) also returns
   * definitions for pipeline-owned types that are not in this set — including
   * `message`, `thread`, and `linkedin_thread`. Those types are not queryable.
   * Contacts expose `last_email` as a `ref_message`; you cannot query `message` to
   * follow it.
   */
  objectType:
    | 'comment'
    | 'deal'
    | 'engagement'
    | 'identity'
    | 'ai_chat_thread'
    | 'ai_chat_message'
    | 'agent_site'
    | 'document'
    | 'action'
    | 'event'
    | 'organization'
    | 'contact';

  /**
   * Body param: Storage type for a property definition. Determines which per-type
   * table holds the values, and which display formats the property can take.
   */
  type:
    | 'num'
    | 'str'
    | 'bool'
    | 'date'
    | 'text'
    | 'byte'
    | 'select_str'
    | 'multi_str'
    | 'multiselect_str'
    | 'jsonb'
    | 'ref_identity'
    | 'ref_user'
    | 'ref_organization'
    | 'ref_contact'
    | 'ref_thread'
    | 'ref_message'
    | 'ref_event'
    | 'ref_account'
    | 'ref_ai_chat_thread'
    | 'ref_ai_chat_message'
    | 'multiref_ai_chat_message'
    | 'multiref_agent_site'
    | 'multiref_action'
    | 'multiref_comment'
    | 'multiref_contact'
    | 'multiref_label'
    | 'multiref_thread'
    | 'multiref_messages'
    | 'multiref_document'
    | 'multiref_identity'
    | 'multiref_organization'
    | 'multiref_engagement'
    | 'multiref_attendee'
    | 'multiref_meeting_entry'
    | 'multiref_read_receipt'
    | 'multiref_account'
    | 'multiref_source';

  /**
   * Body param: Display value for the option.
   */
  value: string;

  /**
   * Body param
   */
  color_scheme?: string | null;

  /**
   * Body param
   */
  description?: string | null;

  /**
   * Body param
   */
  icon?: string | null;

  /**
   * Body param: Scope the option to a specific list/app.
   */
  list_id?: string | null;

  /**
   * Body param
   */
  option_group?: string | null;

  /**
   * Body param: URL-safe identifier. Defaults to a slugified `value`.
   */
  slug?: string;

  /**
   * Body param
   */
  sort_index?: number | null;

  /**
   * Header param: A unique key (UUID or any opaque string up to 255 chars) for an
   * authenticated POST, PUT, or PATCH request. The server retains the initial claim
   * for 24 hours and replays a completed non-5xx response only when the method,
   * path, and request body all match. Reusing a non-expired key with a different
   * method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after
   * expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include
   * the `idempotent-replay: true` response header.
   */
  'Idempotency-Key'?: string;
}

OptionUpdateParams

Source

export interface OptionUpdateParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Path param: Object types that support CRUD, query, list, and per-type property
   * metadata. `GET /v2/prism/{teamId}/properties` (list-all) also returns
   * definitions for pipeline-owned types that are not in this set — including
   * `message`, `thread`, and `linkedin_thread`. Those types are not queryable.
   * Contacts expose `last_email` as a `ref_message`; you cannot query `message` to
   * follow it.
   */
  objectType:
    | 'comment'
    | 'deal'
    | 'engagement'
    | 'identity'
    | 'ai_chat_thread'
    | 'ai_chat_message'
    | 'agent_site'
    | 'document'
    | 'action'
    | 'event'
    | 'organization'
    | 'contact';

  /**
   * Path param: Property definition uuid, or the reserved alias `app_stage` for the
   * list pipeline stage definition (requires `list_id`). The alias exists because a
   * superseded native `status` definition can coexist with the pipeline one and the
   * two are indistinguishable in a metadata read; the definition carrying
   * `alias: app_stage` is the pipeline one.
   */
  propertyId: string;

  /**
   * Body param: Storage type for a property definition. Determines which per-type
   * table holds the values, and which display formats the property can take.
   */
  type:
    | 'num'
    | 'str'
    | 'bool'
    | 'date'
    | 'text'
    | 'byte'
    | 'select_str'
    | 'multi_str'
    | 'multiselect_str'
    | 'jsonb'
    | 'ref_identity'
    | 'ref_user'
    | 'ref_organization'
    | 'ref_contact'
    | 'ref_thread'
    | 'ref_message'
    | 'ref_event'
    | 'ref_account'
    | 'ref_ai_chat_thread'
    | 'ref_ai_chat_message'
    | 'multiref_ai_chat_message'
    | 'multiref_agent_site'
    | 'multiref_action'
    | 'multiref_comment'
    | 'multiref_contact'
    | 'multiref_label'
    | 'multiref_thread'
    | 'multiref_messages'
    | 'multiref_document'
    | 'multiref_identity'
    | 'multiref_organization'
    | 'multiref_engagement'
    | 'multiref_attendee'
    | 'multiref_meeting_entry'
    | 'multiref_read_receipt'
    | 'multiref_account'
    | 'multiref_source';

  /**
   * Body param
   */
  color_scheme?: string | null;

  /**
   * Body param
   */
  description?: string | null;

  /**
   * Body param
   */
  enabled?: boolean;

  /**
   * Body param
   */
  icon?: string | null;

  /**
   * Body param
   */
  list_id?: string | null;

  /**
   * Body param
   */
  option_group?: string | null;

  /**
   * Body param
   */
  slug?: string;

  /**
   * Body param
   */
  sort_index?: number | null;

  /**
   * Body param
   */
  value?: string;

  /**
   * Header param: A unique key (UUID or any opaque string up to 255 chars) for an
   * authenticated POST, PUT, or PATCH request. The server retains the initial claim
   * for 24 hours and replays a completed non-5xx response only when the method,
   * path, and request body all match. Reusing a non-expired key with a different
   * method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after
   * expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include
   * the `idempotent-replay: true` response header.
   */
  'Idempotency-Key'?: string;
}

OptionDeleteParams

Source

export interface OptionDeleteParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Path param: Object types that support CRUD, query, list, and per-type property
   * metadata. `GET /v2/prism/{teamId}/properties` (list-all) also returns
   * definitions for pipeline-owned types that are not in this set — including
   * `message`, `thread`, and `linkedin_thread`. Those types are not queryable.
   * Contacts expose `last_email` as a `ref_message`; you cannot query `message` to
   * follow it.
   */
  objectType:
    | 'comment'
    | 'deal'
    | 'engagement'
    | 'identity'
    | 'ai_chat_thread'
    | 'ai_chat_message'
    | 'agent_site'
    | 'document'
    | 'action'
    | 'event'
    | 'organization'
    | 'contact';

  /**
   * Path param: Property definition uuid, or the reserved alias `app_stage` for the
   * list pipeline stage definition (requires `list_id`). The alias exists because a
   * superseded native `status` definition can coexist with the pipeline one and the
   * two are indistinguishable in a metadata read; the definition carrying
   * `alias: app_stage` is the pipeline one.
   */
  propertyId: string;

  /**
   * Query param: Storage type for a property definition. Determines which per-type
   * table holds the values, and which display formats the property can take.
   */
  type:
    | 'num'
    | 'str'
    | 'bool'
    | 'date'
    | 'text'
    | 'byte'
    | 'select_str'
    | 'multi_str'
    | 'multiselect_str'
    | 'jsonb'
    | 'ref_identity'
    | 'ref_user'
    | 'ref_organization'
    | 'ref_contact'
    | 'ref_thread'
    | 'ref_message'
    | 'ref_event'
    | 'ref_account'
    | 'ref_ai_chat_thread'
    | 'ref_ai_chat_message'
    | 'multiref_ai_chat_message'
    | 'multiref_agent_site'
    | 'multiref_action'
    | 'multiref_comment'
    | 'multiref_contact'
    | 'multiref_label'
    | 'multiref_thread'
    | 'multiref_messages'
    | 'multiref_document'
    | 'multiref_identity'
    | 'multiref_organization'
    | 'multiref_engagement'
    | 'multiref_attendee'
    | 'multiref_meeting_entry'
    | 'multiref_read_receipt'
    | 'multiref_account'
    | 'multiref_source';

  /**
   * Query param
   */
  list_id?: string;
}

Options

Source

export declare namespace Options {
  export {
    type PropertyOption as PropertyOption,
    type PropertyOptionCreate as PropertyOptionCreate,
    type PropertyOptionPatch as PropertyOptionPatch,
    type OptionCreateParams as OptionCreateParams,
    type OptionUpdateParams as OptionUpdateParams,
    type OptionDeleteParams as OptionDeleteParams,
  };
}
micro.so