Skip to main content
PATCH
/
audience
/
segments
/
{segmentId}
Update a segment
curl --request PATCH \
  --url https://app.lettr.com/api/audience/segments/{segmentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "list_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "message": "Segment retrieved successfully.",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "Engaged subscribers",
    "list_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "list_name": "<string>",
    "condition_groups": [
      {
        "conditions": [
          {
            "field": "email",
            "operator": "equals",
            "value": "@example.com"
          }
        ]
      }
    ],
    "cached_contacts_count": 1,
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.lettr.com/llms.txt

Use this file to discover all available pages before exploring further.

Partially update a segment. Requires the audience:write scope and is blocked for sandbox API keys.

Authorizations

Authorization
string
header
required

API key for authentication

Path Parameters

segmentId
string<uuid>
required

Segment ID

Body

application/json

Update a segment. All fields are optional.

name
string
Maximum string length: 255
list_id
string<uuid> | null
conditions
object

Response

Updated

message
string
required
Example:

"Segment retrieved successfully."

data
object
required