v97

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

Update subscriber by external ID path

Compatibility route for external IDs that do not contain path separators. Use /subscribers/external?externalId=... for IDs containing slashes.

patch/subscribers/external/{externalId}

Path parameters

externalIdstring required

URL-encoded external ID without path separators

Request body

emailstring email

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

externalIdstring

New 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 the unsubscribe workflow.

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

{
  "phone": "+15551234567",
  "phoneCountry": "IT"
}

Response

Subscriber updated

successboolean

Example response

{
  "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"
    }
  }
}