---
title: "POST /update-crm-config"
method: POST
path: "/update-crm-config"
---

# POST /update-crm-config

`POST /update-crm-config`

## Request

- Base URL: `https://api.retellai.com`
- URL: `https://api.retellai.com/update-crm-config`
- Auth: HTTP bearer

Update the organization's CRM configuration. Omitted fields stay as they are; a field that is sent replaces its stored value in full.

## Request body

- object
  - `app_id` string, nullable: ID of the CRM app to link. Pass null to unlink, which stops syncing. Changing it resets the sync cursor, so the next sync re-reads every contact from the new CRM.
  - `contact_memory_update_prompt` string, nullable: Workspace-shared memory rewrite prompt. Pass null to restore the built-in preset. Supports conversation dynamic variables using {{variable_name}}.
  - `custom_fields` CRMCustomFieldSchema[]: Replaces the stored list. Names must be snake_case and cannot collide with a built-in contact field or start with `contact`/`external`. Removing a field that an analysis data mapping still targets is rejected — send crm_analysis_data_mappings in the same request to retarget or drop those mappings.
    - `name` string, required
    - `label` string: Display label for the field.
    - `description` string
    - `type` 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'enum', required
    - `options` string[]: Allowed values. Required when `type` is `enum`, where a value is rejected unless it appears here; ignored for every other type.
  - `crm_analysis_data_mappings` CRMAnalysisDataMapping[]: Replaces the stored list.
    - `field_name` string, required: Contact field to write to. Must be an existing built-in or custom contact field, and cannot be phone_number, which identifies the contact.
    - `analysis_data_name` string, required: Name of the post-call analysis field to read the value from. A value that does not match the contact field's type is skipped rather than failing the conversation.
    - `update_mode` 'overwrite' | 'fill_if_empty' | 'merge', required: How to reconcile the new value with what the contact already holds. `overwrite` always replaces it, `fill_if_empty` writes only when the field is empty, and `merge` combines the existing text with the new value. `merge` is available on string fields only.
  - `contact_tags` object[], nullable: Replaces the organization's available contact tags. Tag IDs must be unique 32-character hexadecimal strings and labels are trimmed. Omit to leave unchanged, or send null or an empty array to clear the list. Does not change tags already assigned to contacts.
    - `id` string, required: Unique identifier for the tag.
    - `label` string, required: Human-readable label for the tag.
  - `contact_columns_order` string[]: Preferred display order of contact fields, for clients that render contacts as a table. Not used by the API itself.

## Response `200`

Updated CRM config.

- CRMConfig
  - `org_id` string, required
  - `contact_memory_update_prompt` string, nullable, required: Workspace-shared memory rewrite prompt. Null uses the built-in preset. Supports conversation dynamic variables using {{variable_name}}.
  - `default_contact_memory_update_prompt` string, required: Built-in memory rewrite prompt.
  - `app_id` string: The connected CRM integration app ID.
  - `last_sync_timestamp` number: Epoch milliseconds of the last successful sync.
  - `custom_fields` CRMCustomFieldSchema[]
    - `name` string, required
    - `label` string: Display label for the field.
    - `description` string
    - `type` 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'enum', required
    - `options` string[]: Allowed values. Required when `type` is `enum`, where a value is rejected unless it appears here; ignored for every other type.
  - `crm_analysis_data_mappings` CRMAnalysisDataMapping[]
    - `field_name` string, required: Contact field to write to. Must be an existing built-in or custom contact field, and cannot be phone_number, which identifies the contact.
    - `analysis_data_name` string, required: Name of the post-call analysis field to read the value from. A value that does not match the contact field's type is skipped rather than failing the conversation.
    - `update_mode` 'overwrite' | 'fill_if_empty' | 'merge', required: How to reconcile the new value with what the contact already holds. `overwrite` always replaces it, `fill_if_empty` writes only when the field is empty, and `merge` combines the existing text with the new value. `merge` is available on string fields only.
  - `contact_columns_order` string[]: Preferred display order of contact fields, for clients that render contacts as a table. Not used by the API itself.
  - `contact_tags` ContactTag[]: Tags available to contacts in this organization.
    - `id` string, required: Unique identifier for the tag.
    - `label` string, required: Human-readable label for the tag.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found
- `429`: Too Many Requests
- `500`: Internal Server Error

## Changes

- **2026-10-16** `ca41f0dbb297`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/retellai/apis/retell-sdk/changes/update-crm-config/post.md)

---

[API](https://skmtc.dev/retellai/apis/retell-sdk.md) - [All operations](https://skmtc.dev/retellai/apis/retell-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/retellai/apis/retell-sdk/revisions/e482acaa292c?raw)
