Skip to content
Letterhead Letterhead Letterhead Help Center
Admin Tools

Update a segment

PUT
/api/v3/contacts/segments/{segmentId}
curl --request PUT \
--url 'https://api.tryletterhead.com/api/v3/contacts/segments/1?api=true' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Engaged opens - last 60 days", "description": "Updated window", "criteria": { "matchMode": "all", "conditions": [ { "type": "tag", "value": "engaged" } ], "suppressionSegmentIds": [] }, "channelSlugs": [] }'

Updates a company-level contact segment. This is a partial update — every field is optional; only the fields you send are changed, and omitted fields keep their existing values.

This is a company-level (v3) write. Authenticate with a company API key as a Bearer token.

Response

The updated segment is returned under items. An unknown ID returns 404; a duplicate name returns 409.

segmentId
required
integer

The segment’s identifier. This is the numeric id returned by List segments — not a UUID.

api
required
boolean

Required. Set to true.

Media type application/json
object
name

Segment name. Max 255 chars. Unique within the company.

string
description

Free-text description. Max 500 chars.

string
criteria

The saved query — same shape as Create a segment.

object
matchMode
string
conditions
Array<object>
object
type
string
value
string
suppressionSegmentIds
Array<object>
object
channelSlugs

Channels to scope the segment to. An empty array means available on every channel.

Array<object>
object
Example
{
"name": "Engaged opens - last 60 days",
"description": "Updated window",
"criteria": {
"matchMode": "all",
"conditions": [
{
"type": "tag",
"value": "engaged"
}
],
"suppressionSegmentIds": []
},
"channelSlugs": []
}

Successful response

Still can’t find what you need? Contact support.