Preface
About the API
Ether Mailer exposes some API endpoints to the public to allow integration to external clients, such as CRM, Website Frameworks, Eshop Frameworks, external Web Services and much more.
Via the API it is possible for an external client to add
, edit
, delete
contacts, add
, edit
, delete
contact groups, get extra contact fields, get sender profiles, and more.
The target audience of this document is mainly Software Engineers and Web Developers who are familiar with REST APIs. The API is not final and will never be. We are constantly updating it and adding new endpoints.
You may download the PDF version of the API doc from here.
Basic Information
REST
The Ether Mailer API is based on simple REST
architecture. The payloads and responses are in JSON
format only.
HTTP Headers
All API calls require the following HTTP headers:
Name | Value |
---|---|
Content-Type | application/json |
Accept | application/json |
Authorization | Api xxxxxxxxxx |
Paginated list of content
Usually, the API endpoints that respond with a list of content use pagination.
For example, list of contacts and list of groups are paginated. In order to control the pagination, you will have to use the parameters limit
and offset
. The offset starts with zero and is incremented by the limit (offset = offset + limit).
For example, let’s say that we want to get a list with limit 50. The offsets will be:
Page | Offset | Limit |
---|---|---|
1 | 0 | 50 |
2 | 50 | 50 |
3 | 100 | 50 |
4 | 150 | 50 |
5 | 200 | 50 |
Rate Limiting (Throttling)
In order to secure the application from abuse and DDOS attacks, we apply rate limits.
Authentication
Authenticate your API calls
Each API call has to be authenticated. You will have to get an API KEY from Ether Mailer and use it in every API call. The API KEY has to be put in the Authorization
header.
More specific:
- Login to Ether Mailer and browse to Integrations > API Keys. Direct link.
- Create a new API key and copy it to your application
- Keep the API KEY safe, at the backend of your application. Do not use it in a javascript file, or any frontend file, that anybody can view!
- In every API call add the following header:
Authorization: API your_api_key
Example:
Authorization: API 911222492809633792-e2d5f707-0363-4a71
Errors Responses
Structure of error responses
Example
{
"errors": [
{
"objectName": "email",
"constraintName": "AlreadyExists",
"description": "A contact with the email [email protected] already exists"
}
]
}
When submitting POST
or PUT
requests to modify data (eg add a contact or rename a contact group), the system responds either with 200 OK
or 404 Not Found
or 400 Bad Request
. In case of 400 Bad Request, a response entity is returned that explains the bad request.
Example
Here is an example when trying to add a contact with an email address that already exists in the contact list.
Name | Description |
---|---|
objectName | contains the offending JSON field name |
constraintName | contains the error code |
description | contains a textual description of the error code |
User Information
Get basic user information
curl -X GET \
https://api.ethermailer.com/user \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Response
{
"username": "xxxxxxxx",
"company": "xxxxxxxx",
"email": "xxxxxxxx",
"apiKey": "xxxxxxxx",
"active": true,
"verified": true,
"createdAt": "xxxxxxxx"
}
Request
GET https://api.ethermailer.com/user
Email Settings
Get the list of Sender Profiles
curl -X GET \
https://api.ethermailer.com/user/email-settings/sender-profiles \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/email-settings/sender-profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/email-settings/sender-profiles');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Response
{
"items": [
{
"id": "xxxxxxxx",
"name": "xxxxxxxx",
"email": "xxxxxxxx",
"verified": true,
"spf": true,
"dkim": true
}
]
}
Request
GET https://api.ethermailer.com/user/email-settings/sender-profiles
Contact Group
List Contact Groups
curl -X GET \
https://api.ethermailer.com/user/contact-groups/limit/{findLimit}/offset/{offset} \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact-groups/limit/{findLimit}/offset/{offset}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact-groups/limit/{findLimit}/offset/{offset}');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Response
{
"items": [
{
"groupId": "xxxxxxxx",
"name": "xxxxxxxx",
"canDelete": "xxxxxxxx",
"contactsCount": 0
}
],
"totalItems": 0
}
Get a paginated list of Contact Groups.
Request
GET https://api.ethermailer.com/user/contact-groups/limit/{findLimit}/offset/{offset}
Parameters
The request has the following paramaters available:
Name | Description |
---|---|
findLimit | The limit of each page. Max is 50 |
offset | The offset to be used. Starts with 0. |
Create a Contact Group
curl -X GET \
https://api.ethermailer.com/user/contact-groups \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact-groups');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Payload
{
"name": "xxxxxxxx"
}
Response
{
"text": "xxxxxxxx"
}
Create a new Contact Group.
Request
POST https://api.ethermailer.com/user/contact-groups
Response
The response text
contains the ID
of the new Contact Group.
Rename a Contact Group
curl -X GET \
https://api.ethermailer.com/user/contact-groups/{groupId}/name \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact-groups/{groupId}/name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Put.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact-groups/{groupId}/name');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Payload
{
"name": "xxxxxxxx"
}
Response
{
"text": "xxxxxxxx"
}
Rename an existing Contact Group.
Request
PUT https://api.ethermailer.com/user/contact-groups/{groupId}/name
Parameters
Name | Description |
---|---|
groupId | The group id |
Response
The response text
contains the ID
of the new Contact Group.
Delete a Contact Group
curl -X GET \
https://api.ethermailer.com/user/contact-groups/{groupId} \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact-groups/{groupId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Delete.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact-groups/{groupId}');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Delete a Contact Group.
Request
DELETE https://api.ethermailer.com/user/contact-groups/{groupId}
Parameters
Name | Description |
---|---|
groupId | The group id |
Response
An empty response.
Extra Contact Fields
List Extra Contact Fields
curl -X GET \
https://api.ethermailer.com/user/extra-fields/limit/{findLimit}/offset/{offset} \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/extra-fields/limit/{findLimit}/offset/{offset}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/extra-fields/limit/{findLimit}/offset/{offset}');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Response
{
"items": [
{
"fieldId": "xxxxxxxx",
"name": "xxxxxxxx",
"required": false,
"type": "xxxxxxxx",
"options": [
{
"optionId": "xxxxxxxx",
"text": "xxxxxxxx"
}
]
}
],
"totalItems": 10
}
Get a paginated list of Extra Contact Fields.
Request
GET https://api.ethermailer.com/user/extra-fields/limit/{findLimit}/offset/{offset}
Parameters
The request has the following paramaters available:
Name | Description |
---|---|
findLimit | The limit of each page. Max is 50 |
offset | The offset to be used. Starts with 0. |
Values of “type”
DATE, INTEGER, BOOLEAN, TEXT, OPTIONS
Contacts
List contacts
curl -X GET \
https://api.ethermailer.com/user/contact/limit/{findLimit}/offset/{offset} \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact/limit/{findLimit}/offset/{offset}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact/limit/{findLimit}/offset/{offset}');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Response
{
"items": [
{
"contactId": "xxxxxxxx",
"email": "xxxxxxxx",
"name": "xxxxxxxx",
"surname": "xxxxxxxx",
"deleted": false,
"deletedAtDate": 0
}
],
"totalItems": 10
}
Get a paginated list of Contacts.
Request
GET https://api.ethermailer.com/user/contact/limit/{findLimit}/offset/{offset}
Parameters
The request has the following paramaters available:
Name | Description |
---|---|
findLimit | The limit of each page. Max is 50 |
offset | The offset to be used. Starts with 0. |
Get a single Contact
curl -X GET \
https://api.ethermailer.com/user/contact/{contactId} \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact/{contactId}');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Response
{
"contactId": "xxxxxxxx",
"email": "xxxxxxxx",
"name": "xxxxxxxx",
"surname": "xxxxxxxx",
"groups": [
{
"groupId": "xxxxxxxx",
"name": "xxxxxxxx"
}
],
"extraFieldValues": [
{
"fieldId": "xxxxxxxx",
"name": "xxxxxxxx",
"required": false,
"type": "xxxxxxxx",
"options": [
{
"optionId": "xxxxxxxx",
"text": "xxxxxxxx"
}
],
"value": "xxxxxxxx"
}
]
}
Request
GET https://api.ethermailer.com/user/contact/{contactId}
Parameters
The request has the following paramaters available:
Name | Description |
---|---|
contactId | The contact id |
Add a single Contact
curl -X GET \
https://api.ethermailer.com/user/contact \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Payload
{
"email": "xxxxxxxx",
"name": "xxxxxxxx",
"surname": "xxxxxxxx",
"groups": [
{
"groupId": "xxxxxxxx"
}
],
"extraFieldValues": [
{
"fieldId": "xxxxxxxx",
"value": "xxxxxxxx"
}
]
}
Response
{
"text": "xxxxxxxx"
}
Request
POST https://api.ethermailer.com/user/contact
Response
The response text
contains the ID
of the added Contact.
Batch import Contacts
curl -X GET \
https://api.ethermailer.com/user/contact/import \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact/import');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Payload
[
{
"email": "xxxxxxxx",
"name": "xxxxxxxx",
"surname": "xxxxxxxx",
"groups": [
{
"groupId": "xxxxxxxx"
}
],
"extraFieldValues": [
{
"fieldId": "xxxxxxxx",
"value": "xxxxxxxx"
}
]
}
]
Response
{
"totalCreated": 10,
"totalUpdated": 5,
"totalErrors": 0,
"contactImportResponses": [
{
"contactEmail": "xxxxxxxx",
"constraintViolationErrorList": [
{
"objectName": "xxxxxxxx",
"constraintName": "xxxxxxxx",
"description": "xxxxxxxx"
}
]
}
]
}
Request
POST https://api.ethermailer.com/user/contact/import
Double optin Contact
curl -X GET \
https://api.ethermailer.com/user/contact/register \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact/register');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Payload
{
"senderProfileId": "xxxxxxxx",
"email": "xxxxxxxx",
"name": "xxxxxxxx",
"surname": "xxxxxxxx",
"groups": [
{
"groupId": "xxxxxxxx"
}
],
"extraFieldValues": [
{
"fieldId": "xxxxxxxx",
"value": "xxxxxxxx"
}
]
}
Response
{
"doubleOptinEmailSent": true
}
Register with double optin a single Contact
An optin email will be sent to the given email address using the specified sender profile.
Request
POST https://api.ethermailer.com/user/contact/register
Update a single Contact
curl -X GET \
https://api.ethermailer.com/user/contact/{contactId} \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact/{contactId}');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Payload
{
"email": "xxxxxxxx",
"name": "xxxxxxxx",
"surname": "xxxxxxxx",
"groups": [
{
"groupId": "xxxxxxxx"
}
],
"extraFieldValues": [
{
"fieldId": "xxxxxxxx",
"value": "xxxxxxxx"
}
]
}
Response
{
"text": "xxxxxxxx"
}
Request
POST https://api.ethermailer.com/user/contact/{contactId}
Parameters
Name | Description |
---|---|
contactId | The contact id |
Response
The response text
contains the ID
of the updated Contact.
Delete a list of Contacts
curl -X GET \
https://api.ethermailer.com/user/contact/multiple \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact/multiple")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Delete.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact/multiple');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Request
DELETE https://api.ethermailer.com/user/contact/multiple
Query Parameters
A list contact ids to delete. Max is 1000 contact ids per request.
Name | Description |
---|---|
contactIds | List of contact ids to delete |
Example
DELETE https://api.ethermailer.com/user/contact/multiple?contactIds=xxxxxxxx&contactIds=xxxxxxxx&contactIds=xxxxxxxx
Response
An empty response.
Restore a list of Contacts from deletion
curl -X GET \
https://api.ethermailer.com/user/contact/multiple/restore \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Api xxxxxxxxxx'
require 'uri'
require 'net/http'
url = URI("https://api.ethermailer.com/user/contact/multiple/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Put.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Api xxxxxxxxxx'
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.ethermailer.com/user/contact/multiple/restore');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders(array(
'Authorization' => 'Api xxxxxxxxxx',
'Content-Type' => 'application/json',
'Accept' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Request
PUT https://api.ethermailer.com/user/contact/multiple/restore
Query Parameters
A list contact ids to restore. Max is 1000 contact ids per request.
Name | Description |
---|---|
ContactIds | List of contact ids to restore |
Example
PUT https://api.ethermailer.com/user/contact/multiple/restore?contactIds=xxxxxxxx&contactIds=xxxxxxxx&contactIds=xxxxxxxx
Response
An empty response.