Cakemail icon

Cakemail

Interact with Cakemail API

Segment → Update

AI-generated

Summary

Update a segment's details based on provided parameters.

Inputs

  • accountId — Optional: Specify an account ID for multi-tenant operations. If not provided, uses the authenticated account.
  • listId (required) — The ID of the list.
  • segmentId (required) — The ID of the segment.
  • segmentConditions (required) — Segment conditions as JSON object. Example: {"operator": "AND", "rules": [{"field": "email", "operator": "contains", "value": "@example.com"}]}.
  • segmentAdditionalFields — Additional fields for the segment.

Output shape

no body — success/failure only

Returns a success status if the update is successful. If segment ID or conditions are invalid, appropriate error messages will be provided.

Examples

Example 1: Update segment conditions for a specific list and segment.

Use segmentId and segmentConditions to modify the segment belonging to listId.

Discussion