v93

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

Update subscriber by external ID

Updates a subscriber's email, external ID, first name, last name, status, tags, or custom attributes.

patch/subscribers/external

Query parameters

externalIdstring required

External ID. Query form supports IDs containing slashes.

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 US national format. Stored normalized to E.164. Invalid values fail with a 400 validation error. Does not affect SMS consent. null or "" clears the phone, except on a phone-only (SMS) contact, where clearing its only identity 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"
}

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