patch https://api.cakemail.dev/lists//segments/
Using the SDK
from cakemail.models import UpdateSegment
segment = api.segment.update(
list_id=<list ID>,
segment_id=<segment ID>,
update_segment=UpdateSegment(name='<new segment name>')
)
<?php
$segment = $api->segment->update([
'list_id' => <list ID>,
'segment_id' => <segment ID>,
'update_segment' => new \Cakemail\Lib\Model\UpdateSegment([
'name' => '<new segment name>'
])
]);