Twenty CRM icon

Twenty CRM

Interact with Twenty CRM - Open Source CRM

Custom Object → Update

AI-generated

Summary

Update a record of a specified custom object in Twenty CRM by providing the custom object's API name, the record ID, and a JSON object with fields to change. Optionally include a relationship depth parameter to specify related data to return in the response.

Inputs

  • Object API Name (required) — The API name of the custom object, which is the plural name used in the Twenty CRM API endpoint (e.g., "customLeads", "myCustomObject"). Retrieve this from Twenty CRM Settings > Data Model > Your Object > API Name.
  • Record ID (required) — The unique identifier of the custom object record to update.
  • Update Fields (JSON) (required) — A JSON object specifying field names and their new values to update. Include only fields that should be changed.
  • Options.depth — An integer from 0 to 2 indicating the depth of related objects to include in the response.

Output shape

a JSON object representing the updated custom object record, potentially including related objects up to the specified depth

The response includes the updated record data; the 'depth' option controls inclusion of related object details, with a maximum of 2 levels deep. If omitted, default depth is 1. Errors will be raised if required inputs are missing or invalid.

Examples

Example 1: Update a 'customLeads' record with ID '1234' to change the 'status' field to 'Converted' including related data to depth 1

Object API Name: 'customLeads', Record ID: '1234', Update Fields (JSON): {"status": "Converted"}, Options.depth: 1

Links

Discussion