Massive REM

The easiest and most secure solution for sending your Massive REMs

Manage and automate the sending of large quantities of Certified Electronic Mail messages via API

All the knowledge you need

Here you can find some advice to consider to approach this API. If you prefer, we provide code samples, OAS3 documentation, the ability to try the API live via the Swagger UI or import the entire collection into Postman. We also offer a Sandbox environment where you can experiment with all kinds of requests completely free of charge.

Useful tips to start with Massive REM

Get the token in the appropriate section before you start.

Use the the online tool or generate it via API. Set the expire date, a usefull name and now add a bunch of scopes to limit the possible actions your token can do.

PEC Massiva 1.0 (1.0.0)

This service offers rest calls to send massive pecs and check the status of the delivery verification and receipt verification emails

PEC

List of all the emails related to a given sending

Returns the status of the receipt and delivery verification emails relating to the sending with the code returned at the time of sending the PEC

Authorizations:
bearerAuth
path Parameters
code
required
string
Example: 2020082610003492

Code returned at the time of sending the PEC

header Parameters
x-username
required
string

Username of Email to check

x-password
required
string

Password of Email to check

Responses

Response Schema: application/json
Array of objects (ResponseStatus)
success
boolean
message
string

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/send/%7Bcode%7D");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-username: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "x-password: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "success": true,
  • "message": ""
}

Delete all the emails related to a given sending

Delete the receipt and the delivery verification of a sent email from your INBOX

Authorizations:
bearerAuth
path Parameters
code
required
string
Example: 2020082610003492

Code returned at the time of sending the PEC

header Parameters
x-username
required
string

Username of Email to check

x-password
required
string

Password of Email to check

Responses

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/send/%7Bcode%7D");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-username: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "x-password: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation succefull"
}

Send a PEC to the recipient sent

Send a PEC to the recipient sent and return the identification code of the shipment which can be used to return the information on the confirmation of receipt and delivery emails.
Recipients can be one or many: you can either specity a single address or an array of recipients

Please note that the this endpoint can handle up to 1 request/second.

Authorizations:
bearerAuth
Request Body schema: application/json
sender
string
string or Array of strings

Send a mail to one or multiple recipients. This field accepts either a string or an array of strings.

subject
string
body
string
object (Attachment)
username
string
password
string

Responses

Response Schema: application/json
success
boolean
message
string
message_id
string
sent
integer

The number of PEC emails that have been sent

Request samples

Content type
application/json
{
  • "sender": "[email protected]",
  • "recipient": [],
  • "subject": "Invio di prova pec massiva",
  • "body": "Salve, questa rappresenta una prova di invio, che prevede un <b>corpo in html</b>",
  • "attachments": [
    ],
  • "username": "your_pec_username",
  • "password": "your_pec_password"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "sent": 1,
  • "message": "",
  • "message_id": "2020082610003492"
}

Inbox

Returns a single message in the INBOX

Returns a single message. Please note that the body will be a string encoded in x-www-form-urlencoded

Authorizations:
bearerAuth
path Parameters
id
required
number
Example: 3

The id of the message that you got from /inbox

header Parameters
x-username
required
string

Username of Email to check

x-password
required
string

Password of Email to check

Responses

Response Schema: application/json
object (InboxSingle)
success
boolean
message
string

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/inbox/%7Bid%7D");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-username: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "x-password: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true,
  • "message": ""
}

Delete an email

Delete the receipt and the delivery verification of a sent email from your INBOX

Authorizations:
bearerAuth
path Parameters
id
required
number
Example: 3

The id of the message that you got from /inbox

header Parameters
x-username
required
string

Username of Email to check

x-password
required
string

Password of Email to check

Responses

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/inbox/%7Bid%7D");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-username: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "x-password: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Message deleted"
}

Get a list of emails in your inbox

Returns the content of your INBOX. Results can be paginated: each page contains up to 25 messages and have a unique ID that you can later use to get the single messsage or delete it.
Additionally, you can also query using the 'q' parameter. Please note that searching on a very populated mailbox can be slow.

Authorizations:
bearerAuth
query Parameters
q
string

Search criteria

page
number

Current page

header Parameters
x-username
required
string

Username of Email to check

x-password
required
string

Password of Email to check

Responses

Response Schema: application/json
Array of objects (InboxSearch)
success
boolean
message
string
page
number
total
number
n_of_pages
number

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/inbox?q=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-username: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "x-password: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "success": true,
  • "message": "",
  • "total": 981,
  • "page": 39,
  • "n_of_pages": 39
}

Returns the usage of you INBOX

Returns information on the usage quota of your INBOX in megabyte

Authorizations:
bearerAuth
path Parameters
mailbox
required
string
Example: inbox

The mailbox to check. You might use 'INBOX' to check the status of your main mailbox

header Parameters
x-username
required
string

Username of Email to check

x-password
required
string

Password of Email to check

Responses

Response Schema: application/json
object (QuotaResponse)
success
boolean
message
string

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/quota/inbox");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-username: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "x-password: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true,
  • "message": ""
}