Records
Update a CRM Record Relation
Adds or removes record IDs (or organization member IDs for user type attributes) from a relation or user attribute on a CRM record.
Supply add with IDs to link and/or remove with IDs to unlink. At least one of the two arrays must be non-empty, and the same ID cannot appear in both.
Required scope: crm:write
PATCH
Update a CRM record relation
Adds or removes individual IDs from aDocumentation Index
Fetch the complete documentation index at: https://developer.zeeg.me/llms.txt
Use this file to discover all available pages before exploring further.
relation or user attribute on a CRM record. Unlike Patch, which replaces the entire array, this endpoint performs surgical add/remove operations — existing linked IDs not mentioned in the request are untouched.
Path parameters
| Parameter | Type | Description |
|---|---|---|
objectSlug | string | The slug of the custom CRM object the record belongs to. |
recordId | string (UUID) | The UUID of the record whose relation attribute you want to modify. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
attributeSlug | string | Yes | The key of the relation or user attribute to modify. Must exist on the object and be of type relation or user. |
add | string[] | No | IDs to add to the relation. For relation attributes: UUIDs of records in the related object. For user attributes: UUIDs of organization members. |
remove | string[] | No | IDs to remove from the relation. The same ID format as add. |
- At least one of
addorremovemust be present and non-empty. - The same ID cannot appear in both
addandremovein the same request. - Passing an ID in
addthat is already linked is a no-op (not an error). - Passing an ID in
removethat is not linked is a no-op (not an error).
Attribute types that support this endpoint
| Attribute type | What IDs to pass |
|---|---|
relation | UUIDs of records from the related object (obtained from GET /v2/crm/{relatedObjectSlug}) |
user | UUIDs of organization members (obtained from GET /v2/organizations/users) |
text, number, select, or any non-relation attribute returns an error. Use Patch for those.
Example: link products to an order
Yourorders object has a relation attribute called products that links to the products object. To add two products to an order:
Example: swap a linked record
Remove one product and add a replacement in a single request:Example: unlink all products one at a time
To remove products, pass their IDs inremove:
Example: assign a team member to a deal
Yourdeals object has a user attribute called owners. To assign a team member:
Finding the attribute slug
Relation attribute slugs are defined when the attribute is created. You can look them up viaGET /v2/crm/objects/{slug} — look for attributes with type: relation or type: user and use their key field as attributeSlug.
Update Relation vs. PATCH
PATCH /relation | PATCH /{recordId} | |
|---|---|---|
| Operation | Adds/removes individual IDs | Replaces the entire attribute value |
| Existing IDs | Preserved unless explicitly removed | Overwritten |
| Use case | Add or remove one or a few links | Set the complete list in one go |
PATCH /relation when you need additive or subtractive changes. Use PATCH /{recordId} when you want to set the exact final state of a relation (replacing whatever was there before).
When to use this endpoint
- Add a linked record — a user picks a related product, company, or person to attach.
- Remove a linked record — a user detaches a relation without affecting others.
- Assign / unassign owners — add or remove team members from a user-type attribute.
- Incremental sync — when your source system sends delta events (“product X was added to order Y”) rather than full state.
Authorizations
Path Parameters
Slug of the custom CRM object.
UUID of the record to update.
Body
application/json
Last modified on May 7, 2026