Sendmail.Solutions offers a robust Campaign API that allows users to perform a variety of tasks seamlessly. Whether you’re a developer or a non-developer, understanding the capabilities of this API can help you maximize your email marketing efforts. Let’s dive into the details.
API Documentation Link: https://dash.sendmail.solutions/account/api
Getting Started with Sendmail.Solutions Campaign API
Once you log into your Sendmail.Solutions dashboard, you’ll find the Campaign API tab. Here’s what you’ll encounter:
- API Documentation: A comprehensive guide on how to use the API.
- Endpoint: The URL you’ll use to make API calls.
- Campaign API Token: Your unique identifier for API requests. Remember, you can renew this token anytime.
Overview:
To make a request to the Sendmail.Solutions API, you need to append the api_token
parameter to the URL. This token is used for authentication.
Example: https://dash.sendmail.solutions/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://dash.sendmail.solutions/api/v1/login-token \
-d api_token=YOUR_API_TOKEN
Users can log in by visiting the URL: https://dash.sendmail.solutions/login/token/*|token_string|*
LISTS:
HTTP method | Endpoint | Function |
---|---|---|
POST | /api/v1/lists | Create a new list |
GET | /api/v1/lists | Get information about all lists |
GET | /api/v1/lists/{uid} | Get information about a specific list |
POST | /api/v1/lists/{uid}/add-field | Add custom field to list |
DELETE | /api/v1/lists/{uid} | Delete a list |
Parameters:
- For POST /api/v1/lists:
$name
: List’s name$from_email
: Default From email address$from_name
: Default From name$contact[company]
: 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
Example:
curl -X POST -H “accept:application/json” -G \
https://dash.sendmail.solutions/api/v1/lists \
-d api_token=YOUR_API_TOKEN
\
-d name=List+1 \
-d [email protected] \
-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]=44-46+Morningside+Road+Edinburgh+Scotland+EH10+4BF \
-d contact[city]=Noname \
-d contact[zip]=80000 \
-d contact[phone]=123+456+889 \
-d contact[country_id]=1 \
-d contact[email][email protected] \
-d contact[url]=http://www.abccorp.org \
-d subscribe_confirmation=1 \
-d send_welcome_email=1 \
-d unsubscribe_notification=1
- For POST /api/v1/lists/{uid}/add-field:
$type
: Choose from these types: text, number, datetime.$label
: Field label$tag
: The tag name can have alpha-numeric characters, as well as dashes and underscores.$default_value
: (Optional) Default value of the field
CAMPAIGNS:
HTTP method | Endpoint | Function |
---|---|---|
GET | /api/v1/campaigns | Get information about all campaigns |
POST | /api/v1/campaigns | Add new campaign |
GET | /api/v1/campaigns/{uid} | Get information about a specific campaign |
PATCH | /api/v1/campaigns/{uid} | Update campaign |
POST | /api/v1/campaigns/{uid}/run | Run a specific campaign |
POST | /api/v1/campaigns/{uid}/pause | Pause a specific campaign |
POST | /api/v1/campaigns/{uid}/resume | Resume a specific campaign |
DELETE | /api/v1/campaigns/{uid} | Delete a campaign |
Parameters:
- For POST /api/v1/campaigns:
$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 is true) Track open (true|false)$track_click
: (Optional, default is true) Track click (true|false)$sign_dkim
: (Optional, default is true) Sign dkim (true|false)$skip_failed_messages
: (Optional, default is false) Track open (true|false)
SUBSCRIBERS:
HTTP method | Endpoint | Function |
---|---|---|
GET | /api/v1/subscribers | Display list’s subscribers |
POST | /api/v1/subscribers | Create subscriber for a mail list |
GET | /api/v1/subscribers/{uid} | Get information about a specific subscriber |
PATCH | /api/v1/subscribers/{uid} | Update subscriber for a mail list |
POST | /api/v1/subscribers/{uid}/add-tag | Add tag(s) to subscriber |
GET | /api/v1/subscribers/email/{email} | Find subscribers with email |
PATCH | /api/v1/lists/{list_uid}/subscribers/{uid}/subscribe | Subscribe a subscriber |
PATCH | /api/v1/lists/{list_uid}/subscribers/{uid}/unsubscribe | Unsubscribe a subscriber |
DELETE | /api/v1/subscribers/{uid} | Delete a subscriber |
NOTIFICATION:
HTTP method | Endpoint | Function |
---|---|---|
POST | /api/v1/notification | Send a delivery or abuse report to the application |
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
FILE:
HTTP method | Endpoint | Function |
---|---|---|
POST | /api/v1/file/upload | Upload file(s) to customer’s storage |
Parameters:
$file_url
: File URL$subdirectory
: (Optional, default is user root directory) Custom subdirectory