NAV
shell

Introduction

Welcome to the MailNode API!

You can view code examples in the dark area to the right.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "http://api.mailnode.io/"
  -H "Authorization: Bearer yourApiKey"

Make sure to replace yourApiKey with your API key.

MailNode uses API keys to allow access to the API. You can register a new MailNode API key at our settings panel.

MailNode expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: Bearer yourApiKey

Campaigns

Get All Campaigns


curl "http://api.mailnode.io/campaigns"
-H "Authorization: Bearer yourApiKey"


The above command returns JSON structured like this:

{
    "data": [
        {
            "name": "CampaignName1",
            "subject": "SubjectCampaign1",
            "from_name": "fromExampleName",
            "from_email": "fromSomeone@example.com",
            "opens": 12,
            "clicks": 10,
            "token": "HNzrB6QmB7Z8I2x0TjzYcC7aSvCiy2r2",
            "sent_emails": 20,
            "created_at": {
                "date": "2016-04-15 09:59:59.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            }
        },
        {
            "name": "CampaignName2",
            "subject": "SubjectCampaign2",
            "from_name": "fromExampleName",
            "from_email": "fromSomeone@example.com",
            "opens": 12,
            "clicks": 10,
            "token": "HNzrB6QmB7Z8I2x0TjzYcC7aSvCiy2r2",
            "sent_emails": 200,
            "created_at": {
                "date": "2016-04-15 09:59:59.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            }
        }
    ],
    "meta": {
        "pagination": {
            "total": 4,
            "count": 2,
            "per_page": 2,
            "current_page": 1,
            "total_pages": 2,
            "links": {
                "next": "http://api.mailnode.app/campaigns?page=2"
            }
        }
    }
}

This endpoint retrieves all campaigns.

HTTP Request

GET http://api.mailnode.io/campaigns

Get a Specific Campaign


curl -H "Authorization: Bearer yourApiKey" "http://api.mailnode.io/campaigns/oRR21ykSBXhMDcZTCZWdEJxZSrBjuTBt"

The above command returns JSON structured like this:

{
    "name": "CampaignName",
    "subject": "SubjectCampaign",
    "from_name": "fromExampleName",
    "from_email": "fromSomeone@example.com",
    "opens": 0,
    "clicks": 0,
    "token": "HNzrB6QmB7Z8I2x0TjzYcC7aSvCiy2r2",
    "sent_emails": 0,
    "created_at": {
        "date": "2016-04-15 09:59:59.000000",
        "timezone_type": 3,
        "timezone": "UTC"
    }
}

This endpoint retrieves a specific campaign.

HTTP Request

GET http://api.mailnode.io/campaigns/<campaignToken>

Request Body Parameters

Parameter Type Description Required
campaignToken string The token of the campaign to retrieve true

Update a Campaign


curl -X PATCH
-d
'name=UpdatedCampaignName&
subject=UpdatedSubjectCampaign&
from_email=UpdatedfromSomeone@example.com&
from_name=exampleFromName'

-H "Authorization: Bearer yourApiKey"
"http://api.mailnode.io/campaigns/oRR21ykSBXhMDcZTCZWdEJxZSrBjuTBt"

The above command returns JSON structured like this:

{
    "name": "UpdatedCampaignName",
    "subject": "UpdatedSubjectCampaign",
    "from_name": "UpdatedfromExampleName",
    "from_email": "UpdatedfromSomeone@example.com",
    "opens": 0,
    "clicks": 0,
    "token": "HNzrB6QmB7Z8I2x0TjzYcC7aSvCiy2r2",
    "sent_emails": 0,
    "created_at": {
        "date": "2016-04-15 09:59:59.000000",
        "timezone_type": 3,
        "timezone": "UTC"
    }
}

This endpoint updates a specific campaign.

HTTP Request

PATCH http://api.mailnode.io/campaigns/<campaignToken>

Request Body Parameters

Parameter Type Description Required
campaignToken string The token of the campaign to update true
name string The name of the campaign true
template string Template token of new campaign false
list string List token of new campaign false
subject string Subject text true
from_email string Sender email true
from_name string Sender name true
send_time_start timestamp Starting time of email sending false
send_time_end timestamp Starting time of email sending false

Create a Campaign


curl -X POST
-d
'name=NewCampaignName&
subject=NewSubjectCampaign&
from_email=fromSomeone@example.com&
from_name=fromExampleName&
template=yourTemplateToken&
list=yourListToken'

-H "Authorization: Bearer yourApiKey"
"http://api.mailnode.io/campaigns/"

The above command returns JSON structured like this:

{
    "name": "NewCampaignName",
    "subject": "NewSubjectCampaign",
    "from_name": "fromExampleName",
    "from_email": "fromSomeone@example.com",
    "opens": 0,
    "clicks": 0,
    "token": "HNzrB6QmB7Z8I2x0TjzYcC7aSvCiy2r2",
    "sent_emails": 0,
    "created_at": {
        "date": "2016-04-15 09:59:59.000000",
        "timezone_type": 3,
        "timezone": "UTC"
    }
}

This endpoint creates new campaign.

HTTP Request

POST http://api.mailnode.io/campaigns

Request Body Parameters

Parameter Type Description Required
campaignToken string The token of the campaign to update true
name string The name of the campaign true
template string Template token of new campaign true
list string List token of new campaign true
subject string Subject text true
from_email string Sender email true
from_name string Sender name true
send_time_start timestamp Starting time of email sending false
send_time_end timestamp Starting time of email sending false

Delete a Campaign


curl -X DELETE
-H "Authorization: Bearer yourApiKey"
"http://api.mailnode.io/campaigns/oRR21ykSBXhMDcZTCZWdEJxZSrBjuTBt"


The above command returns JSON structured like this:

{
  "message": "Campaign deleted successfully!",
  "status_code": 200
}

This endpoint deletes a specific campaign.

HTTP Request

DELETE http://api.mailnode.io/campaigns/<campaignToken>

Request Body Parameters

Parameter Type Description Required
campaignToken string The token of the campaign to delete true

Campaign Errors

The MailNode API uses the following error codes:

Error Code Meaning
401 Unauthorized – Your authorization params are invalid
404 Campaign Not Found – The specified campaign could not be found
405 Method Not Allowed – You tried to access a campaign with an invalid method
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.

Lists

Get All Lists


curl -H "Authorization: Bearer yourApiKey" "http://api.mailnode.io/lists"

The above command returns JSON structured like this:

{
  "data": [
    {
      "token": "aTgmVKNpy7RQRRBtHhXqxeiI2e6wHjIw",
      "name": "exampleList2",
      "default_from_name": "",
      "default_from_email": "",
      "default_list_reminder": "",
      "company": "",
      "address": "",
      "city": "",
      "zip_code": "",
      "phone": ""
    },
    {
      "token": "LQMw8oRB2r6mlDt0DmVmym2nUB1HfK4W",
      "name": "exampleList",
      "default_from_name": "",
      "default_from_email": "",
      "default_list_reminder": "",
      "company": "",
      "address": "",
      "city": "",
      "zip_code": "",
      "phone": ""
    }
  ],
  "meta": {
    "pagination": {
      "total": 2,
      "count": 2,
      "per_page": 25,
      "current_page": 1,
      "total_pages": 1,
      "links": []
    }
  }
}

This endpoint retrieves all lists.

HTTP Request

GET http://api.mailnode.io/lists

Get a Specific List


curl -H "Authorization: Bearer yourApiKey" "http://api.mailnode.io/lists/oRR21ykSBXhMDcZTCZWdEJxZSrBjuTBt"

The above command returns JSON structured like this:

{
  "data": {
    "token": "aTgmVKNpy7RQRRBtHhXqxeiI2e6wHjIw",
    "name": "exampleList",
    "default_from_name": "",
    "default_from_email": "",
    "default_list_reminder": "",
    "company": "",
    "address": "",
    "city": "",
    "zip_code": "",
    "phone": ""
  }
}

This endpoint retrieves a specific list.

HTTP Request

GET http://api.mailnode.io/lists/<listToken>

Request Body Parameters

Parameter Type Description Required
listToken string The token of the list to retrieve true

Update a List


curl -X PATCH
-d
'name=listName&
default_from_name=listFromName&
default_from_email=from@example.com&
default_list_reminder=reminder
company=companyName&
zip_code=exampleZipCode&
phone=examplePhone&
country_id=exampleCountryId'

-H "Authorization: Bearer yourApiKey"
"http://api.mailnode.io/lists/oRR21ykSBXhMDcZTCZWdEJxZSrBjuTBt"

The above command returns JSON structured like this:

{
  "data": {
    "token": "aTgmVKNpy7RQRRBtHhXqxeiI2e6wHjIw",
    "name": "listName",
    "default_from_name": "listFromName",
    "default_from_email": "from@example.com",
    "default_list_reminder": "reminder",
    "company": "companyName",
    "address": "",
    "city": "",
    "zip_code": "exampleZipCode",
    "phone": "examplePhone"
  }
}

This endpoint updates a specific list.

HTTP Request

PATCH http://api.mailnode.io/lists/<listToken>

Request Body Parameters

Parameter Type Description Required
listToken string The token of the list to update true
name string The name of the list false
default_from_name string Default sender name false
default_from_email string Default sender email false
default_list_reminder text List reminder false
company string Company name false
zip_code string Company address zip code false
phone string Company phone false
country_id integer Country id false

Create a List


curl -X POST
-d
'name=listName&
default_from_name=listFromName&
default_from_email=from@example.com&
default_list_reminder=reminder
company=companyName&
zip_code=exampleZipCode&
phone=examplePhone&
country_id=exampleCountryId'

-H "Authorization: Bearer yourApiKey"
"http://api.mailnode.io/lists/"

The above command returns JSON structured like this:

{
  "data": {
    "token": "aTgmVKNpy7RQRRBtHhXqxeiI2e6wHjIw",
    "name": "listName",
    "default_from_name": "listFromName",
    "default_from_email": "from@example.com",
    "default_list_reminder": "reminder",
    "company": "companyName",
    "address": "",
    "city": "",
    "zip_code": "exampleZipCode",
    "phone": "examplePhone"
  }
}

This endpoint creates new list.

HTTP Request

POST http://api.mailnode.io/lists

Request Body Parameters

Parameter Type Description Required
listToken string The token of the list to update true
name string The name of the list true
default_from_name string Default sender name false
default_from_email string Default sender email false
default_list_reminder text List reminder false
company string Company name false
zip_code string Company address zip code false
phone string Company phone false
country_id integer Country id false

List Errors

The MailNode API uses the following error codes:

Error Code Meaning
401 Unauthorized – Your authorization params are invalid
404 List Not Found – The specified list could not be found
405 Method Not Allowed – You tried to access a list with an invalid method
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.

Members

Get All Members


curl -H "Authorization: Bearer yourApiKey" "http://api.mailnode.io/lists/<listToken>/members"

The above command returns JSON structured like this:

{
  "data": [
    {
      "email": "user1@mail.com",
      "first_name": "ExampleFirstName1",
      "last_name": "ExampleSecondName1",
      "token": "g3dpPqTtNdarFoNq17iwpqxZojJI65aW"
    },
    {
      "email": "user2@mail.com",
      "first_name": "ExampleFirstName2",
      "last_name": "ExampleSecondName2",
      "token": "c1hlGSPl2H0eHICfGb40mcEI1yyIQ1w8"
    }
  ],
  "meta": {
    "pagination": {
      "total": 2,
      "count": 2,
      "per_page": 25,
      "current_page": 1,
      "total_pages": 1,
      "links": []
    }
  }
}

This endpoint retrieves all members.

HTTP Request

GET http://api.mailnode.io/lists/<listToken>/members

Request Body Parameters

Parameter Type Description Required
listToken string The token of the list of which members to retrieve true

Get a Specific Member


curl -H "Authorization: Bearer yourApiKey" "http://api.mailnode.io/lists/<listToken>/members/<memberToken>"

The above command returns JSON structured like this:


{
  "data": {
      "email": "user1@mail.com",
      "first_name": "ExampleFirstName1",
      "last_name": "ExampleSecondName1",
      "token": "g3dpPqTtNdarFoNq17iwpqxZojJI65aW"
    }
}

This endpoint retrieves a specific member.

HTTP Request

GET http://api.mailnode.io/lists/<listToken>/members/<memberToken>

Request Body Parameters

Parameter Type Description Required
listToken string The token of the list of which members to retrieve true
memberToken string The token of the member to retrieve true

Update a Member


curl -X PATCH
-d
'email=updateUser@mail.com&
first_name=updateFirstName&
last_name=updateLastName'

-H "Authorization: Bearer yourApiKey"
"http://api.mailnode.io/lists/<listToken>/members/<memberToken>"

The above command returns JSON structured like this:


{
  "data": {
      "email": "updateUser@mail.com",
      "first_name": "updateFirstName",
      "last_name": "updateLastName",
      "token": "g3dpPqTtNdarFoNq17iwpqxZojJI65aW"
    }
}

This endpoint updates a specific member.

HTTP Request

PATCH http://api.mailnode.io/lists/<listToken>/members/<memberToken>

Request Body Parameters

Parameter Type Description Required
listToken string The token of the list of which members to retrieve true
memberToken string The token of the member to retrieve true
first_name string The first name of the member false
last_name string The last name of the member false
email string The email of the member true

Create a Member


curl -X POST
-d
'email=newUser@mail.com&
first_name=FirstName&
last_name=LastName'

-H "Authorization: Bearer yourApiKey"
"http://api.mailnode.io/members/"

The above command returns JSON structured like this:

{
  "data": {
      "email": "newUser@mail.com",
      "first_name": "FirstName",
      "last_name": "LastName",
      "token": "g3dpPqTtNdarFoNq17iwpqxZojJI65aW"
    }
}

This endpoint creates new member.

HTTP Request

POST http://api.mailnode.io/lists/<listToken>/members/<memberToken>

Request Body Parameters

Parameter Type Description Required
listToken string The token of the list of which members to retrieve true
memberToken string The token of the member to retrieve true
first_name string The first name of the member false
last_name string The last name of the member false
email string The email of the member true

Delete a Member


curl -X DELETE
-H "Authorization: Bearer yourApiKey"
"http://api.mailnode.io/lists/<listToken>/members/<memberToken>"


The above command returns JSON structured like this:

{
  "message": "Member deleted successfully!",
  "status_code": 200
}

This endpoint deletes a specific member.

HTTP Request

DELETE http://api.mailnode.io/lists/<listToken>/members/<memberToken>

Request Body Parameters

Parameter Type Description Required
listToken string The token of the list of which members to retrieve true
memberToken string The token of the member to delete true

Member Errors

The MailNode API uses the following error codes:

Error Code Meaning
401 Unauthorized – Your authorization params are invalid
404 Member Not Found – The specified member could not be found
405 Method Not Allowed – You tried to access a member with an invalid method
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.

Templates

Get All Templates


curl -H "Authorization: Bearer yourApiKey" "http://api.mailnode.io/templates"

The above command returns JSON structured like this:

{
  "data": [
    {
      "token": "q1JjBxyE85RTm06coPAslNAvQTlhdbmJ",
      "name": "Dummy template",
      "content": "Qui aliquid harum officiis aliquam. Quidem qui excepturi modi aut. Non ut voluptatum est eos quod.",
      "created_at": "April 18, 2016 12:41 PM"
    },
    {
      "token": "MAoQU8b7QZ3Iyv0XkOmma2MWH4AYVXBx",
      "name": "Dummy template",
      "content": "Dolor iste minus facilis reprehenderit voluptas expedita. Et officia rerum mollitia quasi quam ut. Facilis commodi ut suscipit omnis. Consequuntur labore recusandae odit eos.",
      "created_at": "April 18, 2016 8:48 AM"
    }
  ],
  "meta": {
    "pagination": {
      "total": 2,
      "count": 2,
      "per_page": 25,
      "current_page": 1,
      "total_pages": 1,
      "links": []
    }
  }
}

This endpoint retrieves all templates.

HTTP Request

GET http://api.mailnode.io/templates

Get a Specific Template


curl -H "Authorization: Bearer yourApiKey" "http://api.mailnode.io/templates/oRR21ykSBXhMDcZTCZWdEJxZSrBjuTBt"

The above command returns JSON structured like this:

{
  "data": {
    "token": "MAoQU8b7QZ3Iyv0XkOmma2MWH4AYVXBx",
    "name": "Dummy template",
    "content": "Dolor iste minus facilis reprehenderit voluptas expedita. Et officia rerum mollitia quasi quam ut. Facilis commodi ut suscipit omnis. Consequuntur labore recusandae odit eos.",
    "created_at": "April 18, 2016 8:48 AM"
  }
}

This endpoint retrieves a specific template.

HTTP Request

GET http://api.mailnode.io/templates/<templateToken>

Request Body Parameters

Parameter Type Description Required
templateToken string The token of the template to retrieve true

Update a Template


curl -X PATCH
-d
'name=UpdatedTemplateName&
content=Updated Template Content&
-H "Authorization: Bearer yourApiKey"
"http://api.mailnode.io/templates/oRR21ykSBXhMDcZTCZWdEJxZSrBjuTBt"

The above command returns JSON structured like this:

{
  "data": {
    "token": "MAoQU8b7QZ3Iyv0XkOmma2MWH4AYVXBx",
    "name": "UpdatedTemplateName",
    "content": "Updated Template Content",
    "created_at": "April 18, 2016 8:48 AM"
  }
}

This endpoint updates a specific template.

HTTP Request

PATCH http://api.mailnode.io/templates/<templateToken>

Request Body Parameters

Parameter Type Description Required
templateToken string The token of the template to update true
name string The name of the template true
content longText Template content true

Create a Template


curl -X POST
-d
'name=NewTemplateName&
content=New Template Content&'
-H "Authorization: Bearer yourApiKey"
"http://api.mailnode.io/templates"

The above command returns JSON structured like this:

{
  "data": {
    "token": "MAoQU8b7QZ3Iyv0XkOmma2MWH4AYVXBx",
    "name": "NewTemplateName",
    "content": "New Template Content",
    "created_at": "April 18, 2016 8:48 AM"
  }
}

This endpoint creates new template.

HTTP Request

POST http://api.mailnode.io/templates

Request Body Parameters

Parameter Type Description Required
templateToken string The token of the template to update true
name string The name of the template true
content longText Template content true

Delete a Template


curl -X DELETE
-H "Authorization: Bearer yourApiKey"
"http://api.mailnode.io/templates/oRR21ykSBXhMDcZTCZWdEJxZSrBjuTBt"


The above command returns JSON structured like this:

{
  "message": "Template deleted successfully!",
  "status_code": 200
}

This endpoint deletes a specific template.

HTTP Request

DELETE http://api.mailnode.io/templates/<templateToken>

Request Body Parameters

Parameter Type Description Required
templateToken string The token of the template to delete true

Template Errors

The MailNode API uses the following error codes:

Error Code Meaning
401 Unauthorized – Your authorization params are invalid
404 Template Not Found – The specified template could not be found
405 Method Not Allowed – You tried to access a template with an invalid method
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.

Reports

Get All Reports


curl -H "Authorization: Bearer yourApiKey" "http://api.mailnode.io/reports"

The above command returns JSON structured like this:

{
    "data": [
      {
    "token": "OKB2nP3OpGirhy8QNTn0UBFOrZ0KHHoL",
    "email": "example1@mail.com",
    "sent_on": "2016-04-18 08:48:56",
    "created_at": {
      "date": "2016-04-18 08:48:56.000000",
      "timezone_type": 3,
      "timezone": "UTC"
    }
  },
  {
    "token": "oqxRTSiNX4EUmqLaT2DglX4sZJWK8d0S",
    "email": "example2@mail.com",
    "sent_on": "2016-04-18 08:48:56",
    "created_at": {
      "date": "2016-04-18 08:48:56.000000",
      "timezone_type": 3,
      "timezone": "UTC"
    }
  }
    ],
    "meta": {
        "pagination": {
            "total": 4,
            "count": 2,
            "per_page": 2,
            "current_page": 1,
            "total_pages": 2,
            "links": {
                "next": "http://api.mailnode.io/reports?page=2"
            }
        }
    }
}

This endpoint retrieves all Reports.

HTTP Request

GET http://api.mailnode.io/Reports

Get Reports for specific Campaign


curl -H "Authorization: Bearer yourApiKey" "http://api.mailnode.io/reports/campaign/oRR21ykSBXhMDcZTCZWdEJxZSrBjuTBt"

The above command returns JSON structured like this:

{
    "data": [
      {
    "token": "OKB2nP3OpGirhy8QNTn0UBFOrZ0KHHoL",
    "email": "example1@mail.com",
    "sent_on": "2016-04-18 08:48:56",
    "created_at": {
      "date": "2016-04-18 08:48:56.000000",
      "timezone_type": 3,
      "timezone": "UTC"
    }
  },
  {
    "token": "oqxRTSiNX4EUmqLaT2DglX4sZJWK8d0S",
    "email": "example2@mail.com",
    "sent_on": "2016-04-18 08:48:56",
    "created_at": {
      "date": "2016-04-18 08:48:56.000000",
      "timezone_type": 3,
      "timezone": "UTC"
    }
  }
    ],
    "meta": {
        "pagination": {
            "total": 4,
            "count": 2,
            "per_page": 2,
            "current_page": 1,
            "total_pages": 2,
            "links": {
                "next": "http://api.mailnode.io/reports/campaign/oRR21ykSBXhMDcZTCZWdEJxZSrBjuTBt?page=2"
            }
        }
    }
}

This endpoint retrieves a specific Report.

HTTP Request

GET http://api.mailnode.io/reports/campaign/<campaignToken>

Request Body Parameters

Parameter Type Description Required
campaignToken string The token of the campaign which reports to retrieve true

Report Errors

The MailNode API uses the following error codes:

Error Code Meaning
401 Unauthorized – Your authorization params are invalid
404 Reports Not Found – The specified Reports could not be found
405 Method Not Allowed – You tried to access Reports with an invalid method
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.

PHP SDK

Install MailNode SDK


<?php

require '/vendor/autoload.php';

MailNodeApp::init('yourApiKey');

//now you can use any mailnode sdk functions

You can install mailnode-php-sdk via Composer, just run composer require command from your terminal.

composer require mailnode/mailnode-php-sdk

Composer auto loader

You need to autoload mailnode-php-sdk via Composer.

require 'vendor/autoload.php';

Setup MailNode API key

To use mailnode-php-sdk you need first to initialize it with your api key.

MailNodeApp::init('yourApiKey');

Get All Lists

<?

MailNodeApp::getAllLists();

This function retrieves all lists and returns an array of EmailList objects.

EmailList Properties

Parameter Type Description
token string The token of the list
name string The name of the list
default_from_name string Default sender name
default_from_email string Default sender email

Get All Members of the List

<?

MailNodeApp::getAllMembers($listToken);

This function retrieves all members of the list with token == $listToken and returns an array of Member objects.

Function Parameters

Parameter Type Description Required
listToken string The token of the list which members to retrieve true

Member Properties

Parameter Type Description
first_name string The first name of the member
last_name string The last name of the member
email string The email of the member

Add New Member to the List

<?

MailNodeApp::addMemberToList($listToken, new Member('newUser@email.com', "userFirstName", "userLastName"));

This function adds a new member to the list with token == $listToken and returns a Member object.

Function Parameters

Parameter Type Description Required
listToken string The token of the list where to add new member true
email string The email of the member true
first_name string The first name of the member true
last_name string The last name of the member true

Member Properties

Parameter Type Description
first_name string The first name of the member
last_name string The last name of the member
email string The email of the member

Create New Campaign

<?

$campaign = new Campaign('yourCampaignName', 'campaignSubject', 'senderName', 'sender@mail.com');
$campaign->setList($listToken);
$campaign->setTemplate($templateToken);

MailNodeApp::createCampaign($campaign);

This function creates a new campaign with list and template which tokens you have provided and returns a Campaign object.

Function Parameters

Parameter Type Description Required
name string The name of the campaign true
listToken string The token of the list for which is campaign created true
templateToken string The token of the template for which is campaign created true
subject string Campaign subject true
from_email string Sender email true
from_name string Sender name true

Campaign Properties

Parameter Type Description
token string The token of the campaign
name string The name of the campaign
template string Template token of new campaign
list string List token of new campaign
subject string Subject text
from_email string Sender email
from_name string Sender name

Create New Template

<?

MailNodeApp::createTemplate(new Template('templateName', 'templateContent'));

This function creates a new template and returns a Template object.

Function Parameters

Parameter Type Description Required
templateName string name of the template true
templateContent string template content true

Template Properties

Parameter Type Description
token string The token of the template
name string The name of the template
content string Template content