lumail.subscribers.create
SDK 2.1.0 · API v2 · POST /api/v2/subscribers
MethodPOST
/api/v2/subscribers[email protected] · lumail.subscribers
subscribers.create(params: CreateSubscriberParams): Promise<LumailResult<CreateSubscriberResponse>>email required. Upserts by email.
skipDoubleOptIn defaults to false. Pass true from a trusted backend (checkout, server-side import) to create the contact as SUBSCRIBED even when the organization has double opt-in enabled. This does not record a native confirmation click (confirmedAt stays empty). Do not use it on public forms.
Body Parameters
| Name | Type | Description |
|---|---|---|
email | string | Required. Contact email. |
name | string or null | Display name. |
phone | string or null | Phone number. |
tags | string[] | Tag names to attach. Created if missing. |
fields | Record | Custom fields. null clears a field. |
replaceTags | boolean | When true, replace the existing tag set with tags. |
resubscribe | boolean | When true, re-subscribe an UNSUBSCRIBED contact. |
triggerWorkflows | boolean | When true, run subscribe workflows. |
skipDoubleOptIn | boolean | When true, create as SUBSCRIBED even if org double opt-in is on. Does not resubscribe UNSUBSCRIBED unless resubscribe is also true. |
ipAddress | string | Optional signup IP. |
country | string | Optional country code. |
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Subscriber id. |
email | string | Email. |
name | string or null | Display name. |
phone | string or null | Phone. |
status | SubscriberStatus | Current status. |
tags | { id, name }[] | Attached tags. |
fields | Record | Custom fields. |
createdAt | string | Optional ISO 8601 timestamp. |
updatedAt | string | Optional ISO 8601 timestamp. |
warnings | string[] | Optional non-fatal notes. |
data is the subscriber. Failures return { data: null, error: { name, message, statusCode } }.