This service offers rest calls to send massive pecs and check the status of the delivery verification and receipt verification emails
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
| code required | string Default: "<string>" Example: 2020082610003492 Code returned at the time of sending the PEC |
| x-username required | string Default: <string> Username of Email to check |
| x-password required | string Default: <string> Password of Email to check |
Array of objects (ResponseStatus) [ items ] | |
| success | boolean |
| message | string |
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);
{- "data": [
- {
- "sender": "posta-certificata@pecmassiva.com",
- "recipient": "dev-api@pecmassiva.com",
- "data": "Wed, 26 Aug 2020 10:00:35 +0200",
- "object": "ACCETTAZIONE: Invio di prova pec massiva 2020082610003492",
- "message": ""
}, - {
- "sender": "\"Per conto di: dev-api@pecmassiva.com\" ",
- "recipient": "\"dev-api@pecmassiva.com\" ",
- "data": "Wed, 26 Aug 2020 10:00:35 +0200",
- "object": "POSTA CERTIFICATA: Invio di prova pec massiva 2020082610003492",
- "message": "Salve, questa email � una prova di invio, che prevede un corpo in html"
}, - {
- "sender": "posta-certificata@pecmassiva.com",
- "recipient": "dev-api@pecmassiva.com",
- "data": "Wed, 26 Aug 2020 10:00:36 +0200",
- "object": "CONSEGNA: Invio di prova pec massiva 2020082610003492",
- "message": "Salve, questa email � una prova di invio, che prevede un corpo in html"
}
], - "success": true,
- "message": ""
}Delete the receipt and the delivery verification of a sent email from your INBOX
| code required | string Default: "<string>" Example: 2020082610003492 Code returned at the time of sending the PEC |
| x-username required | string Default: <string> Username of Email to check |
| x-password required | string Default: <string> Password of Email to check |
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);
{- "success": true,
- "message": "Operation succefull"
}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.
| 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) |
| success | boolean |
| message | string |
| message_id | string |
| sent | integer The number of PEC emails that have been sent |
{- "sender": "dev-api@pecmassiva.com",
- "recipient": [
- "dev-api@pecmassiva.com"
], - "subject": "Invio di prova pec massiva",
- "body": "Salve, questa rappresenta una prova di invio, che prevede un <b>corpo in html</b>",
- "attachments": [
- {
- "name": "allegato1.png",
- "file": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNMEgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQ1RTFGMzU5NzA3RTExRTdBRjRFRTc2MUNCMDFEREIzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjQ1RTFGMzVBNzA3RTExRTdBRjRFRTc2MUNCMDFEREIzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOml......"
}
], - "username": "your_pec_username",
- "password": "your_pec_password"
}{- "success": true,
- "sent": 1,
- "message": "",
- "message_id": "2020082610003492"
}Returns a single message. Please note that the body will be a string encoded in x-www-form-urlencoded
| id required | number Default: "<number>" Example: 3 The id of the message that you got from /inbox |
| x-username required | string Default: <string> Username of Email to check |
| x-password required | string Default: <string> Password of Email to check |
object (InboxSingle) | |
| success | boolean |
| message | string |
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);
{- "data": {
- "sender": "posta-certificata@pecmassiva.com",
- "recipient": "altravia@pecmassiva.com",
- "date": "Mon, 21 Sep 2020 15:26:37 +0200",
- "object": "ACCETTAZIONE: Invio di prova pec massiva 202009211526363",
- "body": "This is an example body."
}, - "success": true,
- "message": ""
}Delete the receipt and the delivery verification of a sent email from your INBOX
| id required | number Default: "<number>" Example: 3 The id of the message that you got from /inbox |
| x-username required | string Default: <string> Username of Email to check |
| x-password required | string Default: <string> Password of Email to check |
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);
{- "success": true,
- "message": "Message deleted"
}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.
| q | string Default: "<string>" Search criteria |
| page | number Default: "<number>" Current page |
| x-username required | string Default: <string> Username of Email to check |
| x-password required | string Default: <string> Password of Email to check |
Array of objects (InboxSearch) [ items ] | |
| success | boolean |
| message | string |
| page | number |
| total | number |
| n_of_pages | number |
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);
{- "data": [
- {
- "sender": "posta-certificata@pecmassiva.com",
- "recipient": "dev-api@pecmassiva.com",
- "date": "Wed, 26 Aug 2020 10:00:35 +0200",
- "object": "ACCETTAZIONE: Invio di prova pec massiva 2020082610003492",
- "id": 1
}, - {
- "sender": "\"Per conto di: dev-api@pecmassiva.com\" ",
- "recipient": "\"dev-api@pecmassiva.com\" ",
- "date": "Wed, 26 Aug 2020 10:00:35 +0200",
- "object": "POSTA CERTIFICATA: Invio di prova pec massiva 2020082610003492",
- "id": 2
}, - {
- "sender": "posta-certificata@pecmassiva.com",
- "recipient": "dev-api@pecmassiva.com",
- "date": "Wed, 26 Aug 2020 10:00:36 +0200",
- "object": "CONSEGNA: Invio di prova pec massiva 2020082610003492",
- "id": 3
}
], - "success": true,
- "message": "",
- "total": 981,
- "page": 39,
- "n_of_pages": 39
}Returns information on the usage quota of your INBOX in megabyte
| mailbox required | string Default: "<string>" Example: inbox The mailbox to check. You might use 'INBOX' to check the status of your main mailbox |
| x-username required | string Default: <string> Username of Email to check |
| x-password required | string Default: <string> Password of Email to check |
object (QuotaResponse) | |
| success | boolean |
| message | string |
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);
{- "data": {
- "usage": 171012,
- "limit": 1048576
}, - "success": true,
- "message": ""
}