Send a Email.

Send a a transaction email via this AUTOMATION API.


Function

  • send()

Url

  • POST: /PuresendService/automation/v1/send

Parameters

  • email: String
    • The email defines the recipient's email address.
  • automation_id: Integer
    • The automation_id is the automation id which created in the https://<Instance>/automation/index.jsp.
  • custom_fields: JSON Object
    • The custom_fields is the replacements which we want to replace in the message content

Return

  • Status Code:
    • SUCCESS
    • ERROR
  • Message:
    • Unknown error
    • Fail
    • Success
    • Opt-out
    • Automation Not Found

Examples

{
    "email": "example@example.com",
    "automation_id": 1,
    "custom_fields": {
        "$FIRST$" : "FirstName",
        "$LAST$" : "LastName",
        "$CUSTOM2$": "EXAMPLE CUSTOM2",
        "$CUSTOM3$": "EXAMPLE CUSTOM3",
        "$CUSTOM4$": "www.example.com",
        "$CUSTOM5$": "EXAMPLE CUSTOM5",
        "$CUSTOM7$": "EXAMPLE CUSTOM7",
        "$CUSTOM8$": "EXAMPLE CUSTOM8",
        "$CUSTOM9$": "EXAMPLE CUSTOM9",
        "$CUSTOM10$": "EXAMPLE CUSTOM10",
        "$CUSTOM11$": "EXAMPLE CUSTOM11",
        "$CUSTOM12$": "EXAMPLE CUSTOM12",
        "$CUSTOM13$": "EXAMPLE CUSTOM13",
        "$CUSTOM14$": "EXAMPLE CUSTOM14",
        "$CUSTOM15$": "EXAMPLE CUSTOM15"
    }
}
{
    "status": "SUCCESS",
    "message": "Success"
}