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. Two accepted formats, with DIFFERENT response item shapes: a legacy date-based code starting with "20" (e.g. "2020082610003492"), or a 24-char unique id returned when the PEC was sent. |
| 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": [
- {
- "data": "Wed, 26 Aug 2020 10:00:35 +0200",
- "object": "ACCETTAZIONE: Invio di prova pec massiva 2020082610003492",
- "message": ""
}, - {
- "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"
}, - {
- "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 successful"
}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
Note: on the test server, the subject of the actually-sent email gets a " --- SANDBOX ---" suffix appended — expect it if you inspect the raw email/subject.
For testing, use the mailbox "username": "testsandboxpecmassiva@pecmassiva.com", "password": "openapitest" — a bold notice line stating it's a test send gets prepended to the body.
required | 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 required | string Default: "<string>" |
| body required | string Default: "<string>" |
object (Attachment) | |
| username required | string Default: "<string>" Also used as sender (the two are always the same mailbox). Must end with @pecmassiva.com, OR belong to a mailbox registered with tipo_casella = PECMASSIVA. |
| password required | string Default: "<string>" |
| success | boolean |
| message | string |
| message_id | string |
| sent | integer The number of PEC emails that have been sent |
{- "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": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="
}
], - "username": "your_pec_username",
- "password": "your_pec_password"
}{- "success": true,
- "sent": 1,
- "message": "",
- "message_id": "2020082610003492"
}Lists the threads originated by the authenticated mailbox (sender = x-username), newest first. Metadata only, no IMAP enrichment — that keeps the endpoint fast regardless of thread size or count. For the full conversation of one thread use GET /threads/{threadId}.
| page | integer Default: 0 0-based page index, 25 threads per page |
| x-username required | string Default: <string> |
| x-password required | string Default: <string> |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/threads?page=SOME_INTEGER_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": {
- "total": 2,
- "page": 0,
- "n_of_pages": 1,
- "threads": [
- {
- "threadId": "6650f1a2b3c4d5e6f7081920",
- "subject": "Invio di prova pec massiva",
- "dateFirst": "2026-08-26 10:00:35"
}, - {
- "threadId": "6650f1a2b3c4d5e6f7081925",
- "subject": "Un altro invio",
- "dateFirst": "2026-08-25 09:12:01"
}
]
}, - "success": true,
- "message": "Operation successful",
- "error": null
}Sends a PEC to the recipient(s) and creates a trackable thread: the returned threadId (== msgId for the newly created root) can be used with GET /threads/{threadId} to read the full thread, with PATCH /threads/{threadId} to add a reply, or with DELETE /threads/{threadId} to delete it. If the daily limit of 3500 sends is exceeded, the request is queued (status: pending) instead of being rejected. Supports an optional callback, invoked when the send completes and reused by PATCH /threads/{threadId} replies on this thread that don't specify their own. Always creates a NEW, independent thread — does not accept an id in the URL (use PATCH /threads/{threadId} to continue an existing one). Note: on the test server, the subject of the actually-sent email gets a " --- SANDBOX ---" suffix appended.
For testing, use the mailbox "username": "testsandboxpecmassiva@pecmassiva.com", "password": "openapitest" — a bold notice line stating it's a test send gets prepended to the body.
required | 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 required | string Default: "<string>" |
| body required | string Default: "<string>" |
object (Attachment) | |
| username required | string Default: "<string>" Also used as sender (the two are always the same mailbox). Must end with @pecmassiva.com, OR belong to a mailbox registered with tipo_casella = PECMASSIVA. |
| password required | string Default: "<string>" |
| callback | object Default: "<object>" Optional webhook configuration invoked when the send completes. |
{- "subject": "Invio di prova pec massiva",
- "body": "Salve, questa rappresenta una prova di invio, che prevede un <b>corpo in html</b>",
- "username": "your_pec_username",
- "password": "your_pec_password",
- "callback": {
- "method": "JSON",
- "custom": {
- "my_order_id": "123456"
}
}
}{- "data": {
- "msgId": "6650f1a2b3c4d5e6f7081920",
- "threadId": "6650f1a2b3c4d5e6f7081920",
- "createdAt": "26/08/2026 10:00:35",
- "sentAt": "26/08/2026 10:00:35",
- "updateAt": "26/08/2026 10:00:35",
- "status": "sent",
- "subject": "Invio di prova pec massiva",
- "body": "Salve, questa rappresenta una prova di invio, che prevede un <b>corpo in html</b>",
- "attachment": [ ],
- "callBack": {
- "method": "JSON",
- "custom": {
- "my_order_id": "123456"
}
}
}, - "success": true,
- "message": "Operation successful",
- "error": null
}Returns the whole thread as a single chronological conversation: the original send (or every reply sent later via PATCH), merged with any PEC receipts and real replies found on the mailbox. Each entry is tagged direction: "out" (something this account sent) or "in" (something received). Entries still in queue (not yet sent) have no IMAP data attached. Each entry also reports attachmentCount (metadata only, no content — fetch a single message via GET /threads/{threadId}/{msgId} to download its attachments).
| threadId required | string Default: "<string>" Example: 6650f1a2b3c4d5e6f7081920 Thread id, returned by POST /threads |
| x-username required | string Default: <string> |
| x-password required | string Default: <string> |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/threads/%7BthreadId%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": {
- "id": "6650f1a2b3c4d5e6f7081920",
- "messageCount": 4,
- "conversation": [
- {
- "msgId": "6650f1a2b3c4d5e6f7081920",
- "direction": "out",
- "status": "sent",
- "subject": "Invio di prova pec massiva",
- "body": "Salve, questa rappresenta una prova di invio...",
- "date": "2026-08-26 10:00:35",
- "attachmentCount": 1
}, - {
- "msgId": "6650f1a2b3c4d5e6f7081925",
- "direction": "in",
- "status": "received",
- "subject": "ACCETTAZIONE: Invio di prova pec massiva",
- "body": "",
- "date": "Wed, 26 Aug 2026 10:00:35 +0200",
- "attachmentCount": 0
}, - {
- "msgId": "6650f1a2b3c4d5e6f7081921",
- "direction": "out",
- "status": "sent",
- "subject": "Re: Invio di prova pec massiva",
- "body": "Seguito della comunicazione precedente.",
- "date": "2026-08-26 11:15:02",
- "attachmentCount": 0
}, - {
- "msgId": "6650f1a2b3c4d5e6f7081930",
- "direction": "out",
- "status": "pending",
- "subject": "Re: Invio di prova pec massiva",
- "body": "Ultima reply, non ancora spedita: limite giornaliero superato al momento della richiesta, in coda per il prossimo cron.",
- "date": "2026-08-26 12:00:00",
- "attachmentCount": 0
}
]
}, - "success": true,
- "message": "Operation successful",
- "error": null
}Sends a follow-up email on an existing thread: same sender/recipient as the root message, subject prefixed with "Re: " (no double prefix), email headers In-Reply-To/References pointing to the root Message-ID. Only body (+ optional attachments) and username/password are required — sender/recipient/subject are taken from the thread root. Follows the same daily-quota rule as POST /threads: over the 3500/day limit, the reply is queued instead of sent immediately. The thread root must already have been sent (a root still in queue cannot be continued). Supports an optional callback, invoked when the send completes (only for the immediate-send case — a queued reply's callback fires later, when the cron job actually sends it). If omitted, falls back to the callback configured on the thread's original POST /threads call, if any. Same test-server " --- SANDBOX ---" subject suffix caveat as POST /threads applies here too.
For testing, use the mailbox "username": "testsandboxpecmassiva@pecmassiva.com", "password": "openapitest" — a bold notice line stating it's a test send gets prepended to the body.
| threadId required | string Default: "<string>" Example: 6650f1a2b3c4d5e6f7081920 Thread id to continue |
| body required | string Default: "<string>" |
object (Attachment) | |
| username required | string Default: "<string>" |
| password required | string Default: "<string>" |
| callback | object Default: "<object>" Optional. Invoked with the same payload as the 200 response's data, once the send completes. If omitted, the thread root's own callback (from POST /threads) is used instead, if any. |
{- "body": "Seguito della comunicazione precedente.",
- "username": "your_pec_username",
- "password": "your_pec_password",
- "callback": {
- "method": "JSON",
- "custom": {
- "my_order_id": "123456"
}
}
}{- "data": {
- "msgId": "6650f1a2b3c4d5e6f7081921",
- "threadId": "6650f1a2b3c4d5e6f7081920",
- "createdAt": "26/08/2026 11:15:02",
- "sentAt": "26/08/2026 11:15:02",
- "updateAt": "26/08/2026 11:15:02",
- "status": "sent",
- "subject": "Re: Invio di prova pec massiva",
- "body": "Seguito della comunicazione precedente.",
- "attachment": [ ],
- "callBack": {
- "method": "JSON",
- "custom": {
- "my_order_id": "123456"
}
}, - "accepted": false,
- "acceptedAt": null,
- "deliveries": [ ]
}, - "success": true,
- "message": "Operation successful",
- "error": null
}Deletes the thread root and every reply (records for pec_submissions/pec_queue), best-effort deletes the corresponding emails on IMAP (both INBOX and the Posta Inviata/Sent folder), and also deletes every received message (receipts and real replies) of this thread from INBOX plus their pec_inbound_refs records. To delete a single message instead of the whole thread, use DELETE /threads/{threadId}/{msgId}.
| threadId required | string Default: "<string>" Example: 6650f1a2b3c4d5e6f7081920 |
| x-username required | string Default: <string> |
| x-password required | string Default: <string> |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/threads/%7BthreadId%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": {
- "deleted": [
- "6650f1a2b3c4d5e6f7081920",
- "6650f1a2b3c4d5e6f7081930"
], - "skipped": [ ]
}, - "success": true,
- "message": "Thread deleted",
- "error": null
}Same entry shape as one item of GET /threads/{threadId}'s conversation, but with full attachment content (base64) instead of just attachmentCount. msgId is always a 24-char unique id (ObjectId). If it matches a message this account sent or queued (root or reply), attachments come from the encrypted bucket copy if still queued, or are re-parsed from the IMAP MIME structure of the Posta Inviata copy if already sent. Otherwise it's the internal ref (pec_inbound_refs) of a received message (receipt or real reply) — the actual IMAP uid is resolved internally from that ref, and attachments are re-parsed from the corresponding IMAP MIME structure. Ownership of the thread (x-username must match the thread's sender) and IMAP connectivity are checked before returning anything.
| threadId required | string Default: "<string>" Example: 6650f1a2b3c4d5e6f7081920 Thread id |
| msgId required | string Default: "<string>" Example: 6650f1a2b3c4d5e6f7081921 Unique id (ObjectId) of the message (sent/queued message, or the internal ref for a received message) |
| x-username required | string Default: <string> |
| x-password required | string Default: <string> |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/threads/%7BthreadId%7D/%7BmsgId%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": {
- "msgId": "6650f1a2b3c4d5e6f7081920",
- "direction": "out",
- "status": "sent",
- "subject": "Invio di prova pec massiva",
- "body": "Salve, questa rappresenta una prova di invio...",
- "date": "2026-08-26 10:00:35",
- "attachmentCount": 1,
- "attachments": [
- {
- "name": "documento.pdf",
- "mimeType": "application/pdf",
- "size": 34821,
- "content": "JVBERi0xLjQKJ..."
}
]
}, - "success": true,
- "message": "Operation successful",
- "error": null
}Deletes one message of the thread instead of the whole thread. msgId is always a 24-char unique id (ObjectId). If it matches a message this account already sent (root or reply), the email is deleted from IMAP first — if that fails, nothing is deleted and the record is kept. If it's still queued (never sent), only the record is removed, no IMAP involved. Otherwise msgId is the internal ref (pec_inbound_refs) of a received message: deleted from INBOX first, then its ref record — again, nothing is deleted if the IMAP deletion fails.
| threadId required | string Default: "<string>" Example: 6650f1a2b3c4d5e6f7081920 Thread id |
| msgId required | string Default: "<string>" Example: 6650f1a2b3c4d5e6f7081921 Unique id (ObjectId) of the message (sent message, or the internal ref for a received message) |
| x-username required | string Default: <string> |
| x-password required | string Default: <string> |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/threads/%7BthreadId%7D/%7BmsgId%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": null,
- "success": true,
- "message": "Message deleted",
- "error": null
}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": {
- "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",
- "data": [ ]
}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 |
| error | integer or null |
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": [
- {
- "date": "Wed, 26 Aug 2020 10:00:35 +0200",
- "object": "ACCETTAZIONE: Invio di prova pec massiva 2020082610003492",
- "id": 1
}, - {
- "date": "Wed, 26 Aug 2020 10:00:35 +0200",
- "object": "POSTA CERTIFICATA: Invio di prova pec massiva 2020082610003492",
- "id": 2
}, - {
- "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,
- "error": null
}Returns unread messages (IMAP \Seen flag not set) in your INBOX, most recent first (higher IMAP UID first), without marking them as read. For each unread message, attempts to resolve which PEC thread it belongs to by inspecting its headers only (X-Riferimento-Message-ID for standard receipts, In-Reply-To/References for real replies, subject match as a lower-confidence fallback for PEC-to-PEC replies wrapped in a transport envelope with no Message-ID linkage) — no message body is fetched, so checking never marks anything as read.
Note: a null threadId does not guarantee the message is unrelated to any thread — some replies are only identifiable by opening the full thread's conversation (which does fetch the body).
| skip | integer Default: 0 Number of unread messages to skip, ordered most recent first. Default 0. |
| limit | integer Default: "<integer>" Max number of unread messages to return. Omit for no limit (all unread messages). |
| 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[ items ] | |
| count | integer Number of items in data (this page) |
| total | integer Total unread messages in the mailbox, regardless of skip/limit |
| skip | integer |
| limit | integer or null Null if no limit was requested |
| hasUnread | boolean True if total > 0 |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/inbox/unread?skip=SOME_INTEGER_VALUE&limit=SOME_INTEGER_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": [
- {
- "id": 1044,
- "threadId": "6650f1a2b3c4d5e6f7081920",
- "msgId": "6650f1a2b3c4d5e6f7081925"
}, - {
- "id": 1047,
- "threadId": null,
- "msgId": null
}
], - "count": 2,
- "total": 2,
- "skip": 0,
- "limit": null,
- "hasUnread": true
}Returns today's PEC send count for this mailbox against the shared 3500/day limit — counted by the mailbox address (x-username header). Requires a real IMAP authentication check with x-username/x-password before counting.
| x-username required | string Default: <string> Username of Email to check |
| x-password required | string Default: <string> Password of Email to check |
object (DailyUsage) | |
| success | boolean |
| message | string |
| error | integer or null |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.pecmassiva.com/quota"); 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": {
- "used": 120,
- "limit": 3500,
- "remaining": 3380
}, - "success": true,
- "message": "",
- "error": null
}Returns information on the usage quota of your INBOX in kilobyte (IMAP QUOTA extension, RFC 2087 — 1024-byte blocks), plus today's PEC send count (dailyUsage) against the shared daily limit.
| 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 |
| error | integer or null |
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,
- "dailyUsage": {
- "used": 120,
- "limit": 3500,
- "remaining": 3380
}
}, - "success": true,
- "message": "",
- "error": null
}