v97

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-04231129815.9 KB
Subscribers

Update subscriber

Updates a subscriber's first name, last name, status, tags, or custom attributes. Setting status to unsubscribed performs the full unsubscribe workflow, including list unsubscription and sequence cancellation.

patch/subscribers/{email}

Path parameters

emailstring required

URL-encoded email address

Request body

emailstring email

New delivery email. Fails with 409 if another subscriber owns it.

externalIdstring

New customer-owned external ID. Fails with 409 if another subscriber owns it.

firstNamestring
lastNamestring
phonestring nullable

Phone number in E.164 format or national format. Stored normalized to E.164. Invalid values fail with a 400 validation error. Does not affect SMS consent. Changing it resets SMS consent unless smsConsent is sent in the same request. null or "" clears the phone, except on a phone-only (SMS) contact, where clearing its only identity fails with a 400 validation error.

phoneCountrystring nullable

ISO 3166-1 alpha-2 country used to read a national-format phone, defaulting to US. A parsing hint only - the stored phoneCountry always comes from the parsed number. Sending it without phone fails with a 400 validation error.

smsConsentboolean

SMS marketing consent. true sets smsStatus to subscribed with consent source api, false sets unsubscribed, omitted leaves SMS status unchanged. Never inferred from phone presence.

status'active' | 'unsubscribed' | 'bounced'

Setting unsubscribed performs a full global unsubscribe.

tagsstring[]
customAttributesobject

Custom attributes to update. Defaults to replacing the existing public custom-attribute map.

customAttributesStrategy'replace' | 'merge'

How to apply customAttributes. replace replaces the existing public custom-attribute map. merge overwrites only provided keys and retains unspecified existing keys.

Example request

{
  "firstName": "Jane",
  "lastName": "Smith",
  "phone": "+15551234567",
  "phoneCountry": "IT",
  "tags": [
    "premium",
    "vip"
  ]
}

Response

Subscriber updated

successboolean

Example response

{
  "success": true,
  "subscriber": {
    "id": "sub_abc123",
    "email": "user@example.com",
    "externalId": "user_123",
    "firstName": "John",
    "lastName": "Doe",
    "phone": "+15551234567",
    "smsStatus": "subscribed",
    "status": "active",
    "emailProvider": "gmail",
    "tags": [
      "premium",
      "newsletter"
    ],
    "customAttributes": {
      "plan": "pro",
      "signupSource": "website"
    }
  }
}