API Documentation

You need to add parameter api_token=YOUR_API_TOKEN to each request to the API system. Example: https://portal.expressem.net/api/lists?api_token=YOUR_API_TOKEN

LISTS

HTTP methodEndpointFunction
POST/api/listsNew list
Parameters

$name
– List’s name

$from_email
– Default From email address

$from_name
– Default From name

$default_subject  optional
– Default email subject

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
– contact url 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://portal.expressem.net/api/lists? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ \ -d name=List+1 \ -d [email protected] \ -d from_name=ABC+Corp. \ -d default_subject=Welcome+to+ABC+Corp. \ -d contact[company]=ABC+Corp. \ -d contact[state]=Armagh \ -d contact[address_1]=48+Henry+Smith+Street \ -d contact[address_2]=Suite+7001 \ -d contact[city]=North+Miami+Beach \ -d contact[zip]=33160 \ -d contact[phone]=123+456+889 \ -d contact[country_id]=1 \ -d contact[email][email protected] \ -d contact[url]=http://www.abccorp.net \ -d subscribe_confirmation=1 \ -d send_welcome_email=1 \ -d unsubscribe_notification=1
GET/api/listsGet information about all lists
ReturnsList of all user’s mail lists in jsonExample:curl -X GET -H "accept:application/json" -G \ https://portal.expressem.net/api/lists? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ
GET/api/lists/{uid}Get information about a specific list
ReturnsAll list informations in jsonExample:curl -X GET -H "accept:application/json" -G \ https://portal.expressem.net/api/lists/{uid}? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ

CAMPAIGNS

HTTP methodEndpointFunction
GET/api/v1/campaignsGet information about all campaigns
ReturnsList of all user’s campaigns in jsonExample:curl -X GET -H "accept:application/json" -G \ https://portal.expressem.net/api/campaigns? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ
GET/api/campaigns/{uid}Get information about a specific campaign
ReturnsCampaign’s information in jsonExample:curl -X GET -H "accept:application/json" -G \ https://portal.expressem.net/api/campaigns/{uid}? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ

SUBSCRIBERS

HTTP methodEndpointFunction
GET/api/lists/{list_uid}/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://portal.expressem.net/api/lists/{list_uid}/subscribers? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ \ -d per_page=20 \ -d page=1
GET/api/v1/lists/{list_uid}/subscribers/{uid}Get information about a specific subscriber
Parameters$uidSubsciber’s uid or emailReturnsAll subscriber information in jsonExample:curl -X GET -H "accept:application/json" -G \ https://portal.expressem.net/api/lists/{list_uid}/subscribers/{uid}? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ
GET/api/subscribers/email/{email}Find subscribers with email
Parameters$emailSubsciber’s emailReturnsAll subscribers with the emailExample:curl -X GET -H "accept:application/json" -G \ https://portal.expressem.net/api/subscribers/email/{email}? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ
POST/api/lists/{list_uid}/subscribers/storeCreate subscriber for a mail list
Parameters$EMAILSubscriber’s email$[OTHER_FIELDS…]   optionalAll subscriber’s other fields: FIRST_NAME (?), LAST_NAME (?),… (depending on the list fields configuration)ReturnsCreation messages in jsonExample:curl -X POST -H "accept:application/json" -G \ https://portal.expressem.net/api/v1/lists/{list_uid}/subscribers/store? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ \ -d [email protected] \ -d FIRST_NAME=Marine \ -d LAST_NAME=Joze
PATCH/api/lists/{list_uid}/subscribersUpdate subscriber for a mail list
Parameters$EMAILSubscriber’s email$[OTHER_FIELDS…]   optionalAll subscriber’s other fields: FIRST_NAME (?), LAST_NAME (?),… (depending on the list fields configuration)ReturnsUpdate messages in jsonExample:curl -X PATCH -H "accept:application/json" -G \ https://portal.expressem.net/api/lists/{list_uid}/subscribers/{uid}/update? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ \ -d [email protected] \ -d FIRST_NAME=Marine \ -d LAST_NAME=Joze
PATCH/api/lists/{list_uid}/subscribers/{uid}/subscribeSubscribe a subscriber
Parameters$list_uidList’s uid$uidSubsciber’s uidReturnsResult messages in jsonExample:curl -X PATCH -H "accept:application/json" -G \ https://portal.expressem.net/api/lists/{list_uid}/subscribers/{uid}/subscribe? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ
PATCH/api/lists/{list_uid}/subscribers/{uid}/unsubscribeUnsubscribe a subscriber
Parameters$list_uidList’s uid$uidSubsciber’s uidReturnsResult messages in jsonExample:curl -X PATCH -H "accept:application/json" -G \ https://portal.net/api/lists/{list_uid}/subscribers/{uid}/unsubscribe? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ
DELETE/api/lists/{list_uid}/subscribers/{uid}/deleteDelete a subscriber
Parameters$list_uidList’s uid$uidSubsciber’s uidReturnsResult messages in jsonExample:curl -X DELETE -H "accept:application/json" -G \ https://portal.expressem.net/api/lists/{list_uid}/subscribers/{uid}/delete? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ

FILE

HTTP methodEndpointFunction
POST/api/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://portal.expressem.net/api/file/upload? \ -d api_token=iGXkTRF58HCyHopLJbtGf0ZaZZiEsiSqVrWjb23BdmeYWAnpjubzF79fAequ \ -d files='[{"url":"https://expressem.net/images/logo_big.png","subdirectory":"path/to/file"},{"url":"https://expressem.net/images/logo_big.png","subdirectory":"path/to/file2"}]'

If you have any questions call us at (877) 852-7737 or create a new support ticket.

Was this article helpful?

Related Articles