Skip to navigation

Add subscription to an automation OAuth Scope: automations:write

Add an existing subscription to an automation flow. Requires the automation to have an active Add by API trigger. The specified email or subscription_id will be matched against your existing subscribers. If an existing subscriber is found, they will be enrolled immediately. Looking to enroll new subscribers? Use the Create Subscription endpoint instead and specify the automation_ids param.

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
automationIdstringRequiredformat: "^(aut_[0-9a-fA-F\-]+)$"
The prefixed ID of the automation object

Request

This endpoint expects an object.
emailstringOptional
The email address associated with the subscription.
subscription_idstringOptionalformat: "^(sub_[0-9a-fA-F\-]+)$"
The prefixed ID of the subscription.
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.

Response

Created
dataobject
A subscribers' journey through an automation flow.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error