Skip to main content
The Resend Go SDK does not currently provide an Update method for segments. To modify a segment, you’ll need to delete the existing segment and create a new one with the updated information.

Alternative approach

To update a segment, follow these steps:
  1. Use the Get segment method to retrieve the current segment details
  2. Use the Delete segment method to remove the existing segment
  3. Use the Create segment method to create a new segment with updated information

Example

Note that this approach will change the segment ID. Make sure to update any references to the old segment ID in your application.