PURESEND AUTOMATION API

Overview

  • This is the Puresend AUTOMATION API that enables clients to send transaction emails via a web service interface.
  • This page provides some basic examples using curl command.

Command format

  • <Instance> is the Purecast server your account is running on.
  • <API Function> is the API function endpoint which can be found in each API function detail page.
  • <API Key> can be found in the bottom of the UI page in Administration > Change password
  • <JSON Input> is the parameter for the API, a sample template is at the bottom of each API function detail page.

curl --request POST 'https://<Your Instance>/PuresendService/automation/v1/send' \
--header 'Authorization: Basic <API Key>' \
--header 'Content-Type: application/json' \
--data-raw '<JSON Input>'


  • The following example shows a request of send one email.

curl --request POST 'https://<Your Instance>/PuresendService/automation/v1/send' \
--header 'Authorization: Basic <Your API Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "example@example.com",
    "automation_id": 16,
    "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"
    }
}'