Email API

API docs

https://email.infopromo.digital/frontend/docs/api/v1 link

API Endpoint

https://email.infopromo.digital/api/v1

Your API token 
{Obtain it from your email portal}

You need to add parameter api_token=YOUR_API_TOKEN to each request to the API system
Example: https://email.infopromo.digital/api/v1/lists?api_token=YOUR_API_TOKEN

AUTHENTICATION

HTTP method

Endpoint

Function

POST

/api/v1/login-token

Generate one time login token

 

Returns

Token string

Example:

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/login-token \ -d api_token=(YOUR API TOKEN)

User can login by visiting the following URL:

https://email.infopromo.digital/login/token/*|token_string|*

 

LISTS

HTTP method

Endpoint

Function

POST

/api/v1/lists

New list

 

Parameters

$name
List’s name
$from_email
Default From email address
$from_name
Default From name
divider
Contact information
$contact[company]
Name
$contact[state]
State / Province / Region
$contact[address_1]
Address 1
$contact[address_2]
Address 2
$contact[city]
City
$contact[zip]
Zip / Postal code
$contact[phone]
Phone
$contact[country_id]
Country id
$contact[email]
Email
$contact[url]   optional
Home page
$subscribe_confirmation
Send subscription confirmation email (Double Opt-In)
$send_welcome_email
Send a final welcome email
$unsubscribe_notification
Send unsubscribe notification to subscribers
$send_welcome_email
Send a final welcome email

Returns

Creation messages in json

Example:

curl -X POST -H “accept: application/json” -G \
https://email.infopromo.digital/api/v1/lists \
-d api_token=(YOUR API TOKEN) \
-d name=“List 1” \
-d from_email=“admin@abccorp.org” \
-d from_name=“ABC Corp.” \
-d contact[company]=“ABC Corp.” \
-d contact[state]=“Armagh” \
-d contact[address_1]=“14 Tottenham Court Road, London, England” \
-d contact[address_2]=“Nairobi, Kenya” \
-d contact[city]=“Noname” \
-d contact[zip]=“80000” \
-d contact[phone]=“123 456 889” \
-d contact[country_id]=1 \
-d contact[email]=“info@abccorp.org” \
-d contact[url]=“http://www.abccorp.org” \
-d subscribe_confirmation=1 \
-d send_welcome_email=1 \
-d unsubscribe_notification=1

GET

/api/v1/lists

Get information about all lists

 

Returns

List of all user’s mail lists in json

Example:

curl -X GET -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/lists \
-d api_token=(YOUR API TOKEN)

GET

/api/v1/lists/{uid}

Get information about a specific list

 

Returns

All list informations in json

Example:

curl -X GET -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/lists/{uid} \
-d api_token=(YOUR API TOKEN)

POST

/api/v1/lists/{uid}/add-field

Add custom field to list

 

Parameters

$type
Choose one of these types: text, number, datetime.
$label
Field’ label
$tag
The tag name may have alpha-numeric characters, as well as dashes and underscores.
$default_value   optional
Default value of the field

Returns

Creation messages in json

Example:

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/lists/{uid}/add-field \
-d api_token=(YOUR API TOKEN) \
-d type=text \
-d label=Custom \
-d tag=CUSTOM_FIELD_1 \
-d default_value=test

DELETE

/api/v1/lists/{uid}

Delete a list

 

Parameters

$uid
List’s uid

Returns

Result messages in json

Example:

curl -X DELETE -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/lists/{uid} \
-d api_token=(YOUR API TOKEN)

CAMPAIGNS

HTTP method

Endpoint

Function

GET

/api/v1/campaigns

Get information about all campaigns

 

Returns

List of all user’s campaigns in json

Example:

curl -X GET -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/campaigns \
-d api_token=(YOUR API TOKEN)

POST

/api/v1/campaigns

Add new campaign

 

Parameters

$list_uid
List’s uid
$name
New campaign name
$subject
Email subject
$from_email
From email
$from_name
From name
$reply_to
Reply-to email
$track_open   optional – default: true
Track open (true|false)
$track_click   optional – default: true
Track click (true|false)
$sign_dkim   optional – default: true
Sign dkim (true|false)
$skip_failed_messages   optional – default: false
Track open (true|false)

Returns

New campaign’s information in json

Example:

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/campaigns \
-d api_token=(YOUR API TOKEN) \
-d mail_list_uid={list_uid} \
-d name=MyCampaign \
-d subject=HelloWorld \
-d from_email=noreply@gmail.com \
-d from_name=NoReply \
-d reply_to=noreply@gmail.com \
-d track_open=true \
-d track_click=true \
-d sign_dkim=false \
-d skip_failed_messages=false

GET

/api/v1/campaigns/{uid}

Get information about a specific campaign

 

Returns

Campaign’s information in json

Example:

curl -X GET -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/campaigns/{uid} \
-d api_token=(YOUR API TOKEN)

PATCH

/api/v1/campaigns/{uid}

Update campaign

 

Parameters

$list_uid
List’s uid
$name
Campaign name
$subject
Email subject
$from_email
From email
$from_name
From name
$reply_to
Reply-to email
$track_open   optional – default: true
Track open (true|false)
$track_click   optional – default: true
Track click (true|false)
$sign_dkim   optional – default: true
Sign dkim (true|false)
$skip_failed_messages   optional – default: false
Track open (true|false)

Returns

New campaign’s information in json

Example:

curl -X PATCH -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/campaigns/{uid} \
-d api_token=(YOUR API TOKEN) \
-d name=MyCampaign2 \
-d subject=HelloWorld2 \
-d sign_dkim=true

POST

/api/v1/campaigns/{uid}/run

Run a specific campaign

 

Returns

Action messages in json

Example:

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/campaigns/{uid}/run \
-d api_token=(YOUR API TOKEN)

POST

/api/v1/campaigns/{uid}/pause

Pause a specific campaign

 

Returns

Action messages in json

Example:

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/campaigns/{uid}/pause \
-d api_token=(YOUR API TOKEN)

POST

/api/v1/campaigns/{uid}/resume

Resume a specific campaign

 

Returns

Action messages in json

Example:

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/campaigns/{uid}/resume \
-d api_token=(YOUR API TOKEN)

DELETE

/api/v1/campaigns/{uid}

Delete a campaign

 

Parameters

$uid
Campaign’s uid

Returns

Result messages in json

Example:

curl -X DELETE -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/campaigns/{uid} \
-d api_token=(YOUR API TOKEN)

SUBSCRIBERS

HTTP methodEndpointFunction
GET/api/v1/subscribersDisplay list’s subscribers
 

Parameters

$list_uid
List’s uid
$open   optional – default: all
yes – opened some campaigns
no – not opened any campaign
$click   optional – default: all
yes – clicked some campaigns
no – not clicked any campaign
$per_page   optional – default: 25
Number of subscribers per page
$page
Page number

Returns

List of all list’s subscribers in json

Example:

curl -X GET -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/subscribers \
-d api_token=(YOUR API TOKEN) \
-d list_uid={list_uid} \
-d per_page=20 \
-d page=1

POST/api/v1/subscribersCreate subscriber for a mail list
 

Parameters

$list_uid
List’s uid
$EMAIL
Subscriber’s email
$tag   optional
Subscriber’s tags, seperated by a comma (,).
$status   optional
Subscriber’s status: subscribed | unsubscribed | unconfirmed
$[OTHER_FIELDS…]   optional
All subscriber’s other fields: FIRST_NAME (?), LAST_NAME (?),… (depending on the list fields configuration)

Returns

Creation messages in json

Example:

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/subscribers \
-d api_token=(YOUR API TOKEN) \
-d list_uid={list_uid} \
-d EMAIL=test@gmail.com \
-d tag=foo,bar,tag+with+space, \
-d FIRST_NAME=Marine \
-d LAST_NAME=Joze \
-d status=subscribed

GET/api/v1/subscribers/{uid}Get information about a specific subscriber
 

Parameters

$uid
Subsciber’s uid or email

Returns

All subscriber information in json

Example:

curl -X GET -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/subscribers/{uid} \
-d api_token=(YOUR API TOKEN)

PATCH/api/v1/subscribers/{uid}Update subscriber for a mail list
 

Parameters

$uid
Subscriber’s uid
$EMAIL
Subscriber’s email
$tag   optional
Subscriber’s tags, seperated by a comma (,).
$[OTHER_FIELDS…]   optional
All subscriber’s other fields: FIRST_NAME (?), LAST_NAME (?),… (depending on the list fields configuration)

Returns

Update messages in json

Example:

curl -X PATCH -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/subscribers/{uid} \
-d api_token=(YOUR API TOKEN) \
-d EMAIL=test@gmail.com \
-d tag=foo,bar,tag+with+space, \
-d FIRST_NAME=Marine \
-d LAST_NAME=Joze \
-d status=unsubscribed

POST/api/v1/subscribers/{uid}/add-tagAdd tag(s) to subscriber
 

Parameters

$tag   optional
Subscriber’s tags, seperated by a comma (,).

Returns

Creation messages in json

Example:

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/subscribers/{uid}/add-tag \
-d api_token=(YOUR API TOKEN) \
-d tag=foo,bar,tag+with+space

GET/api/v1/subscribers/email/{email}Find subscribers with email
 

Parameters

$email
Subsciber’s email

Returns

All subscribers with the email

Example:

curl -X GET -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/subscribers/email/{email} \
-d api_token=(YOUR API TOKEN)

PATCH/api/v1/lists/{list_uid}/subscribers/{uid}/subscribeSubscribe a subscriber
 

Parameters

$list_uid
List’s uid
$uid
Subsciber’s uid

Returns

Result messages in json

Example:

curl -X PATCH -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/lists/{list_uid}/subscribers/{uid}/subscribe \
-d api_token=(YOUR API TOKEN)

PATCH/api/v1/lists/{list_uid}/subscribers/{uid}/unsubscribeUnsubscribe a subscriber
 

Parameters

$list_uid
List’s uid
$uid
Subsciber’s uid

Returns

Result messages in json

Example:

curl -X PATCH -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/lists/{list_uid}/subscribers/{uid}/unsubscribe \
-d api_token=(YOUR API TOKEN)

PATCH/api/v1/lists/{list_uid}/subscribers/email/{email}/unsubscribeUnsubscribe a subscriber by email
 

Parameters

$list_uid
List’s uid
$email
Subsciber’s email

Returns

Result messages in json

Example:

curl -X PATCH -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/lists/{list_uid}/subscribers/email/{email}/unsubscribe \
-d api_token=(YOUR API TOKEN)

DELETE/api/v1/subscribers/{uid}Delete a subscriber
 

Parameters

$list_uid
List’s uid
$uid
Subsciber’s uid

Returns

Result messages in json

Example:

curl -X DELETE -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/subscribers/{uid} \
-d api_token=(YOUR API TOKEN)

NOTIFICATION

HTTP method

Endpoint

Function

POST

/api/v1/notification

Send a delivery or abuse report to the application. It could be a success / bounce / feedback or abuse report

 

Parameters

$message_id
Message’s id
$type
One of 4 types: sent | bounced | reported | failed
$bounce_type
Required if type is bounced
$report_type
Required if type is reported
$description
Notification message

Returns

Action messages in json

Example:

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/notification \
-d api_token=(YOUR API TOKEN) \
-d message_id=201637442604422402.6199642caf7f3@example.com \
-d type=sent

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/notification \
-d api_token=(YOUR API TOKEN) \
-d message_id=201637442604422402.6199642caf7f3@example.com \
-d type=bounced \
-d bounce_type=hard \
-d description=Email+address+does+not+exist

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/notification \
-d api_token=(YOUR API TOKEN) \
-d message_id=201637442604422402.6199642caf7f3@example.com \
-d type=abuse \
-d report_type=hard \
-d description=Email+address+does+not+exist

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/notification \
-d api_token=(YOUR API TOKEN) \
-d message_id=201637442604422402.6199642caf7f3@example.com \
-d type=spam \
-d report_type=hard \
-d description=Email+address+does+not+exist

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/notification \
-d api_token=(YOUR API TOKEN) \
-d message_id=201637442604422402.6199642caf7f3@example.com \
-d type=failed \
-d description=Email+address+does+not+exist

FILE

HTTP methodEndpointFunction
POST/api/v1/file/uploadUpload file(s) to customer’s storage
 

Parameters

$file_url
File url
$subdirectory   optional – default: user root directory
Custom subdirectory

Returns

Upload result message

Example:

curl -X POST -H “accept:application/json” -G \ https://email.infopromo.digital/api/v1/file/upload \
-d api_token=(YOUR API TOKEN) \
-d files=’[
{
“url”:“http://example.com/images/logo_big.svg”,
“subdirectory”:“path/to/file”
},
{
“url”:“http://example.com/images/logo_big.svg”,
“subdirectory”:“path/to/file2”
}
                 ]

 

For better viewing experience, use a large screen!