Create subscription

Create new subscriptions for a publication.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

publicationIdstringRequiredformat: "^(pub_[0-9a-fA-F\-]+)$"
The prefixed ID of the publication object

Request

This endpoint expects an object.
emailstringRequired
The email address of the subscription.
reactivate_existingbooleanOptionalDefaults to false
Whether or not to reactivate the subscription if they have already unsubscribed. This option should be used only if the subscriber is knowingly resubscribing.
send_welcome_emailbooleanOptionalDefaults to false
utm_sourcestringOptional
The source of the subscription.
utm_mediumstringOptional
The medium of the subscription
utm_campaignstringOptional
The acquisition campaign of the subscription
utm_termstringOptional

The acquisition term; typically the keyword or search term

utm_contentstringOptional

The acquisition content; typically used for A/B testing or ad variations

referring_sitestringOptional
The website that the subscriber was referred from
referral_codestringOptional

This should be a subscribers referral_code. This gives referral credit for the new subscription.

custom_fieldslist of objectsOptional
The custom fields must already exist for the publication. Any new custom fields here will be discarded.
double_opt_overridestringOptional
Override the publication's default double opt-in settings for this subscription. Possible values are: - "on" — The subscriber will receive a double opt-in confirmation email and will need to confirm their subscription prior to being marked as active. - "off" — The subscriber will be marked as active immediately and will not receive a double opt-in confirmation email. - "not_set" — The publication's default double opt-in settings will be applied to this subscription.
tierenumOptional
The tier for this subscription.
Allowed values:
premium_tierslist of stringsOptional

An array of premium tier names to assign to this subscription. When provided, the subscription will be assigned to premium tiers matching these names. Can be combined with premium_tier_ids to include tiers from both (duplicates are removed). Takes precedence over the tier parameter.

premium_tier_idslist of stringsOptional

An array of premium tier IDs to assign to this subscription. When provided, the subscription will be assigned to these specific premium tiers. Can be combined with premium_tiers to include tiers from both (duplicates are removed). Takes precedence over the tier parameter.

stripe_customer_idstringOptionalformat: "^(cus_[0-9a-zA-Z]+)?$"
The Stripe customer ID for this subscription.
automation_idslist of stringsOptional

Enroll the subscriber into automations after their subscription has been created. Requires the automations to have an active Add by API trigger.

Response

Subscription created
dataobject
The subscription object

Errors