OptinAutomation v1.2

Automation rules that enable a custom opt-in email to be triggered when a call to emailOptIn is made.

What can I do with optinAutomation?

An optinAutomation rule describes the event in which a custom opt-in email is triggered by an unconfirmed subscription being passed to or created by the emailOptIn endpoint:

Rules will be not be paused if the associated list (or its containing category) or the associated message is deleted. If the message is deleted, the triggered rule will still send the deleted message.

GET /optinAutomation or /optinAutomation/:id

AttributeTypeFilterSortDescription
id
intYesYesUnique ID of the Marketing Automation rule.
list_id
int/nullYesNoUnique ID of the list used in the match comparison.
message_id
intNoNoUnique ID of the message used as the opt-in email.
name
stringYesYesRule name.
paused
boolYesNoWhether the rule is paused.
summary
string/nullNoNoEnglish-language description of the rule.
user_id
intYesNoUnique ID of the user who created this rule.
cdate
decimalNoYesCreation timestamp.
mdate
decimalNoNo

Last modification timestamp.

HEAD /optinAutomation or /optinAutomation/:id

AttributeTypePresenceDescription
id
intOptionalUnique ID of the Marketing Automation rule.
list_id
int/nullOptionalUnique ID of the list used in the match comparison.
name
stringOptionalRule name.
paused
boolOptionalWhether the rule is paused.
user_id
intOptionalUnique ID of the user who created this rule.

POST /optinAutomation

AttributeTypePresenceDescription
list_id
int/nullRequiredUnique ID of the list used in the match comparison.
message_id
intRequiredUnique ID of the message used as the opt-in email.
name
stringRequiredRule name.
paused
boolOptionalWhether the rule is paused.
summary
string/nullRequiredEnglish-language description of the rule.

Users will only be permitted to set message_id to the message ID of a message they have access to.

Once set list_id cannot be modified. Only one optinAutomation rule per list_id can exist; users will not be allowed to create multiple optinAutomation rules for one list. If list_id is set to null, the rule will be treated as a catch-all opt-in rule, however only one catch-all opt-in rule can exist per account.

message_id must point to an emailMessage resource with the customoptin flag set to true.

If an emailMessage is associated to a optinAutomation rule via a POST/PUT, as the message_id, that message will become non-editable.

If enabled for the company, folder restrictions will apply to this endpoint. Users will only be able to create list-related rules for lists in categories that they have access to.

PUT /optinAutomation or /optinAutomation/:id

AttributeTypePresenceDescription
id
intRequiredUnique ID of the Marketing Automation rule.
message_id
intOptionalUnique ID of the message used as the opt-in email.
name
stringOptionalRule name.
paused
boolOptionalWhether the rule is paused.
summary
string/nullOptionalEnglish-language description of the rule.

Users will only be permitted to set message_id to the message ID of a message they have access to.

Once set list_id cannot be modified. Only one optinAutomation rule per list_id can exist; users will not be allowed to create multiple optinAutomation rules for one list. If list_id is set to null, the rule will be treated as a catch-all opt-in rule, however only one catch-all opt-in rule can exist per account.

message_id must point to an emailMessage resource with the customoptin flag set to true.

Only rules created by the user can be modified/deleted by that user, unless the user has admin permissions.

If an emailMessage is associated to a optinAutomation rule via a POST/PUT, as the message_id, that message will become non-editable.

If enabled for the company, folder restrictions will apply to this endpoint. Users will only be able to create list-related rules for lists in categories that they have access to.

If a rule is paused and the resource associated with its message_id is removed or becomes inaccessible, the user will not be permitted to un-pause the rule without changing the message_id to a valid resource.

DELETE /optinAutomation or /optinAutomation/:id

AttributeTypePresenceDescription
id
intRequiredUnique ID of the Marketing Automation rule.

Only rules created by the user can be modified/deleted by that user, unless the user has admin permissions.

Error codes

There are no error codes for this endpoint.

Examples

JSON response

{
    "id":              12345,
    "list_id":         39443,
    "message_id":      15487,
    "name":            "Summer Competition Optin",
    "paused":          false,
    "summary":         "As soon as possible after a subscriber is added to the list 'Summer Competition', send the subscriber the opt-in email campaign 'Summer Competition Confirmation'",
    "user_id":         23456,
    "cdate":           1234966741,
    "mdate":           1234966741
}