Run with Postman

PEC Massiva 1.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:
path Parameters
code
required
string
Default: "<string>"
Example: 2020082610003492

Code returned at the time of sending the PEC

header Parameters
x-username
required
string
Default: <string>

Username of Email to check

x-password
required
string
Default: <string>

Password of Email to check

Responses

Response Schema: application/json
Array of objects (ResponseStatus) [ items ]
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:
path Parameters
code
required
string
Default: "<string>"
Example: 2020082610003492

Code returned at the time of sending the PEC

header Parameters
x-username
required
string
Default: <string>

Username of Email to check

x-password
required
string
Default: <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:
Request Body schema: application/json
sender
string
Default: "<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
Default: "<string>"
body
string
Default: "<string>"
object (Attachment)

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": "dev-api@pecmassiva.com",
  • "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:
path Parameters
id
required
number
Default: "<number>"
Example: 3

The id of the message that you got from /inbox

header Parameters
x-username
required
string
Default: <string>

Username of Email to check

x-password
required
string
Default: <string>

Password of Email to check

Responses

Response Schema: application/json
object (InboxSingle)