Skip to content
Go to Micro

Update a property definition

client.prism.properties.update(stringpropertyID, PropertyUpdateParams { teamId, objectType, type, 6 more } params, RequestOptionsoptions?): PropertyDefinition { id, slug, type, 10 more }
PATCH/v2/prism/{teamId}/{objectType}/properties/{propertyId}

Patches the editable fields (name, icon, enabled) of a property definition. type and scoping fields are immutable; type must be supplied in the body so the server knows which per-type table to write.

ParametersExpand Collapse
propertyID: string
formatuuid
params: PropertyUpdateParams { teamId, objectType, type, 6 more }
teamId?: string

Path param

formatuuid
objectType: "comment" | "deal" | "engagement" | 9 more

Path param

One of the following:
"comment"
"deal"
"engagement"
"identity"
"ai_chat_thread"
"ai_chat_message"
"agent_site"
"document"
"action"
"event"
"organization"
"contact"
type: "num" | "str" | "bool" | 34 more

Body param: Storage type for a property definition. Determines which per-type table holds the values, and which display formats the property can take.

One of the following:
"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"
enabled?: boolean

Body param

icon?: string | null

Body param

list_id?: string | null

Body param

formatuuid
name?: string

Body param

required?: boolean

Body param

idempotencyKey?: 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.

minLength1
maxLength255
ReturnsExpand Collapse
PropertyDefinition { id, slug, type, 10 more }

Definition for a single property on an object type. Definitions with team_id and crm_id null are shared defaults; values may be scoped to a team and/or list (crm).

id: string
formatuuid
slug: string
type: "num" | "str" | "bool" | 34 more

Storage type for a property definition. Determines which per-type table holds the values, and which display formats the property can take.

One of the following:
"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"
alias?: "app_stage" | null

Reserved alias naming this definition, or null. app_stage marks the list pipeline stage definition. Resolve stages by this field rather than by name, slug, or team_id: a superseded native status definition can coexist with the pipeline one and is otherwise identical on the wire.

crm_id?: string | null

Identifier of the list this definition is scoped to, when applicable.

formatuuid
list_id?: string | null

Canonical identifier of the list this definition is scoped to.

formatuuid
locked?: boolean
name?: string | null
native?: boolean
options?: Array<PropertyOption { id, slug, color_scheme, 7 more } >

Present only for select_str and multiselect_str types.

id: string
formatuuid
slug: string
color_scheme?: string | null
Deprecatedcrm_id?: string | null
formatuuid
description?: string | null
icon?: string | null
list_id?: string | null
formatuuid
option_group?: string | null
sort_index?: number | null
value?: string | null

Display value for the option.

required?: boolean

When true, records of this object type must carry a non-empty value for this property on create, and a patch may not clear it.

role_id?: string | null

The property’s display format. Always populated on definitions created through this API; a null here means the definition predates that and will render as an unknown format until it is patched.

formatuuid
team_id?: string | null
formatuuid

Update a property definition

import Micro from '@micro-so/sdk';

const client = new Micro({
  teamID: 'My Team ID',
  apiKey: process.env['MICRO_API_KEY'], // This is the default and can be omitted
});

const propertyDefinition = await client.prism.properties.update(
  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  { objectType: 'comment', type: 'num' },
);

console.log(propertyDefinition.id);
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "slug": "slug",
  "type": "num",
  "alias": "app_stage",
  "crm_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "list_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "locked": true,
  "name": "name",
  "native": true,
  "options": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "slug": "slug",
      "color_scheme": "color_scheme",
      "crm_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "description": "description",
      "icon": "icon",
      "list_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "option_group": "option_group",
      "sort_index": 0,
      "value": "value"
    }
  ],
  "required": true,
  "role_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}
Returns Examples
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "slug": "slug",
  "type": "num",
  "alias": "app_stage",
  "crm_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "list_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "locked": true,
  "name": "name",
  "native": true,
  "options": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "slug": "slug",
      "color_scheme": "color_scheme",
      "crm_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "description": "description",
      "icon": "icon",
      "list_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "option_group": "option_group",
      "sort_index": 0,
      "value": "value"
    }
  ],
  "required": true,
  "role_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}