Web services for the activation and management of Certified Email (PEC). These services allow you to register a new certified mailbox, as well as renew or revoke existing accounts. You can also modify mailbox options such as total storage and archive space, or enable and expand legally compliant preservation. Furthermore, the system includes methods to report a certified email address to the Business Register. Finally, you can use these services to download and upload activation forms for both the mailbox and the legal preservation service. All endpoints that take an id only operate on resources owned by the authenticated account: an id belonging to another account returns the same 404 error as an id that does not exist.
This method shows you the availability of a certified e-mail box. It can only verify the availability of mailboxes for domains configured and managed by the system. For unmanaged domains, it will return an error since their existence cannot be verified.
| pec required |
object | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/verifica_pec/%7Bpec%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "data": {
- "available": true
}, - "success": true,
- "message": "",
- "error": null
}This method shows you the list of certified e-mail boxes that belong to your account
| skip | integer Default: "<integer>" Example: skip=0 Optional. Number of items to skip for pagination. If not specified, the default value is 0. |
| limit | integer Default: "<integer>" Example: limit=100 Optional. Maximum number of items to return. If not specified, the default value is 100. |
| expiring | integer [ -366 .. 365 ] Default: "<integer>" Example: expiring=30 Optional. Number of days. Positive (1-365): returns mailboxes in 'evasa' state with expiration date (timestamp.scadenza) falling on that calendar day (today + N days, 00:00:00-23:59:59), sorted by expiration date ascending. Negative (-1 to -366): returns mailboxes in 'revocata' state with expiration date (timestamp.scadenza) falling on that calendar day (today + N days, i.e. today - |N| days, 00:00:00-23:59:59), sorted by expiration date ascending. |
Array of objects (Caselle) [ items ] | |
| total_count | integer Total number of PEC mailboxes matching the query, ignoring skip/limit pagination. |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/pec?skip=0&limit=100&expiring=30"); struct curl_slist *headers = NULL; 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": "6040e4613a716838dc4eee0e",
- "tipo_casella": "BRONZE",
- "stato": "revocata",
- "data_scadenza": "04/03/2022",
- "timestamp": {
- "registrazione": 1614865504,
- "ultima_modifica": 1614868403,
- "evasione": 1614868312,
- "scadenza": 1646391493,
- "revoca": 1614868400
}, - "owner": "[email protected]"
}, - {
- "id": "6040c9df3a716838dc4eede4",
- "tipo_casella": "STANDARD",
- "stato": "evasa",
- "data_scadenza": "04/03/2022",
- "timestamp": {
- "registrazione": 1614858718,
- "ultima_modifica": 1614859181,
- "evasione": 1614859181,
- "scadenza": 1646391493
}, - "owner": "[email protected]"
}
], - "total_count": 2,
- "success": true,
- "message": "",
- "error": null
}This method allows you to register a new certified mailbox.
If you do not have your own certified domain, the mailbox must necessarily consist of:
'box_name'@legalmail.it (Es. provapec@legalmail.it) for STANDARD, BRONZE, SILVER AND GOLD mailbox;
'box_name'@domiciliodigitale.com (Es. provapec@domiciliodigitale.com) for DOMICILIODIGITALE box;
'box_name'@pecmassiva.com (Es. provapec@pecmassiva.com) for PECMASSIVA box.
In Sandbox must be: 'box_name'@testcert.legalmail.it (Es. provapec@testcert.legalmail.it) or 'box_name'@test.domiciliodigitale.com (Es. provapec@test.domiciliodigitale.com).
| casella_pec required | string Default: "<string>" the certified email address (PEC) |
| tipo_casella required | string Default: "<string>" Enum: "STANDARD" "BRONZE" "SILVER" "GOLD" "DOMICILIODIGITALE" "PECMASSIVA" "MASSIVA1" "MASSIVA2" "MASSIVA3" type of mailbox. STANDARD/BRONZE/SILVER/GOLD/MASSIVA1-3 are provisioned via InfoCert; DOMICILIODIGITALE/PECMASSIVA are provisioned via Namirial. The provider is derived from this value (plus the domain), not chosen separately, and it determines which of the other BodyPostPec fields actually apply (see their descriptions). The type must match the provider of the domain: an InfoCert type on a Namirial domain (domiciliodigitale.com, pecmassiva.com) or a Namirial type on an InfoCert domain (legalmail.it) returns error 505. |
| tipo_cliente required | string Default: "<string>" Enum: "IM" "PS" "PL" "PC" "A" "PV" "X" the customer type |
| sottotipo_cliente | string Default: "<string>" Enum: "SI" "IN" "CM" "TE" "ES" "ME" "AL" "CF" "ED" "TM" "MA" "AR" "TL" "FI" "X" "PC" "PR" "PN" "PT" "PA" "PL" "LR" "LP" "LC" "LM" "LA" "LI" The customer subtype. Validated against the DB-driven 'tipologie' lookup collection, not a fixed list — which valid codes apply depends on 'tipo_cliente'; see the TipologieCliente schema for the per-tipo_cliente code tables. |
| sottotipo_cliente_altro | string Default: "<string>" other customer subtype |
| nome_richiedente required | string Default: "<string>" first name of the applicant |
| cognome_richiedente required | string Default: "<string>" last name of the applicant |
| email required | string Default: "<string>" standard email address of the applicant |
| telefono | string Default: "<string>" phone number of the applicant. InfoCert: required, numeric, 11 characters maximum. Namirial (DOMICILIODIGITALE/PECMASSIVA): ignored and saved empty. |
| cellulare | string Default: "<string>" mobile phone number of the applicant. Namirial (DOMICILIODIGITALE/PECMASSIVA): required, with the international prefix (e.g. +393490000000). InfoCert: optional, numeric. |
| codice_fiscale_richiedente required | string Default: "<string>" fiscal code of the applicant |
| data_nascita_richiedente | string Default: "<string>" date of birth of the applicant (dd/mm/yyyy). InfoCert: required for every tipo_cliente. Namirial (DOMICILIODIGITALE/PECMASSIVA): required for private clients (tipo_cliente PV), optional and saved as sent for the others. On Namirial it is needed to activate the conservation service later for every client type, so send it if conservation will be requested. |
| sesso_richiedente | string Default: "<string>" Enum: "M" "F" gender of the applicant; M or F. InfoCert: required for every tipo_cliente. Namirial (DOMICILIODIGITALE/PECMASSIVA): required for private clients (tipo_cliente PV), optional and saved as sent for the others. On Namirial it is needed to activate the conservation service later for every client type, so send it if conservation will be requested. |
| nazione_nascita_richiedente | string Default: "<string>" country of birth of the applicant. InfoCert: required for every tipo_cliente, 2 characters maximum (e.g. IT). Namirial (DOMICILIODIGITALE/PECMASSIVA): optional, saved as sent. On Namirial it is needed to activate the conservation service later for every client type, so send it if conservation will be requested. |
| comune_nascita_richiedente | string Default: "<string>" city of birth of the applicant. InfoCert: optional. Namirial (DOMICILIODIGITALE/PECMASSIVA): required for private clients (tipo_cliente PV), optional and saved as sent for the others. On Namirial it is needed to activate the conservation service later for every client type, so send it if conservation will be requested. |
| provincia_nascita_richiedente | string Default: "<string>" province of birth of the applicant. 3 characters maximum. InfoCert: optional. Namirial (DOMICILIODIGITALE/PECMASSIVA): required for private clients (tipo_cliente PV), optional and saved as sent for the others. On Namirial it is needed to activate the conservation service later for every client type, so send it if conservation will be requested. |
| denominazione_titolare | string Default: "<string>" name of the mailbox holder. Required when tipo_cliente is not 'PV'. |
| cf_piva_titolare | string Default: "<string>" fiscal code or VAT number of the mailbox holder. Required when tipo_cliente is not 'PV'. |
| indirizzo_titolare required | string Default: "<string>" address of the mailbox holder |
| comune_titolare required | string Default: "<string>" city of the mailbox holder |
| cap_titolare required | string Default: "<string>" postal code (CAP) of the mailbox holder |
| nazione_titolare required | string Default: "<string>" country of the mailbox holder |
| provincia_titolare | string Default: "<string>" province of the mailbox holder. Required only when nazione_titolare is IT (Namirial also accepts ITA). For any other country Namirial saves EE; InfoCert saves the value as sent. |
object (Callback) Standardized callback configuration. Enables receiving notifications about status updates of asynchronous requests. | |
| autorinnovo | boolean Default: false if set to true, it allows the system to renew the account automatically upon expiration, trying to withdraw credit from the owner's purse |
| tipo_documento | string Default: "<string>" Enum: "CARTA_D_IDENTITA" "PATENTE" "PASSAPORTO" type of identification document |
| numero_documento | string Default: "<string>" number of the document |
| data_scadenza_documento | string Default: "<string>" expiration date of the document |
| documento_rilasciato_da | string Default: "<string>" issuing authority of the document |
| data_rilascio_documento | string Default: "<string>" Issue date of the document |
| rinnovo_anni | integer [ 0 .. 3 ] Default: 0 additional years beyond the mandatory first year (0-3); total registration length = 1 + rinnovo_anni, i.e. 1-4 years; defaults to 0 |
| spazio_disco | integer Default: "<integer>" initial disk space in MB (optional; must be a multiple of 1024) |
| spazio_storico | integer Default: "<integer>" initial archive space in MB (optional; must be a multiple of 1024) |
| spazio_conservazione | integer Default: "<integer>" initial conservation space in MB (optional). Sold in packages: must be a multiple of 512 for InfoCert boxes, of 1024 (1 GB) for Namirial boxes (DOMICILIODIGITALE/PECMASSIVA). The space is paid here (packages × years) but the service is activated later, by uploading the signed documents with PATCH /pec/{id}/conservazione, which does not charge it again. |
| invio_massivo_pec | integer Default: "<integer>" InfoCert only. Bulk sending quota (must be a positive multiple of 50). Not supported on Namirial boxes. |
| phishing_protection | boolean Default: "<boolean>" InfoCert only. Activate phishing protection at registration. Not supported on Namirial boxes. |
| password_protection | boolean Default: "<boolean>" InfoCert only. Activate password protection at registration. Not supported on Namirial boxes. |
| norma_ai | boolean Default: false InfoCert only. Activate the Norma AI add-on at registration (charged per year, like the other add-ons). Not supported on Namirial boxes. |
boolean or Array of objects | |
| note | string Default: "<string>" internal notes |
object (Casella) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
{- "tipo_casella": "bronze",
- "tipo_cliente": "PV",
- "sottotipo_cliente": "SI",
- "sottotipo_cliente_altro": "",
- "nome_richiedente": "mario",
- "cognome_richiedente": "rossi",
- "telefono": "0548798569",
- "cellulare": "3401234567",
- "codice_fiscale_richiedente": "RSSMRA82D11H501D",
- "data_nascita_richiedente": "11/04/1982",
- "sesso_richiedente": "M",
- "nazione_nascita_richiedente": "it",
- "comune_nascita_richiedente": "roma",
- "provincia_nascita_richiedente": "RM",
- "denominazione_titolare": "",
- "cf_piva_titolare": "",
- "indirizzo_titolare": "via verdi 20",
- "comune_titolare": "roma",
- "cap_titolare": "00042",
- "nazione_titolare": "it",
- "provincia_titolare": "rm",
- "tipo_documento": "CARTA_D_IDENTITA",
- "numero_documento": "CA00000AA",
- "data_rilascio_documento": "01/01/2020",
- "data_scadenza_documento": "01/01/2030",
- "documento_rilasciato_da": "Comune di Roma",
- "autorinnovo": false,
- "rinnovo_anni": 1,
- "spazio_disco": 2048,
- "spazio_storico": 3072,
- "spazio_conservazione": 512,
- "invio_massivo_pec": 50,
- "phishing_protection": false,
- "password_protection": false,
- "multiutenza": [
- {
- "nome": "luca",
- "cognome": "bianchi",
- "descrizione": "collaboratore",
- "email_gestione_password": "[email protected]"
}
], - "note": "note interne",
}{- "data": {
- "dominio": "testcert.legalmail.it",
- "uid": "MA178634",
- "cod_attivazione": "10174594",
- "callback": {
- "method": "JSON",
- "user_id": "",
- "username": "",
- "field": "data",
- "headers": [ ],
- "data": [ ],
- "retry": 0,
- "scope": null,
- "domain": null,
- "custom": {
- "my_order_id": "123456"
}
}, - "tipo_casella": "BRONZE",
- "stato": "registrata",
- "autorinnovo": false,
- "spazio_disco": 2048,
- "storico": false,
- "spazio_storico": 3072,
- "conservazione": false,
- "spazio_conservazione": 512,
- "sms": false,
- "phishing_protection": false,
- "password_protection": false,
- "tipo_cliente": "PV",
- "sottotipo_cliente": "SI",
- "sottotipo_cliente_altro": "",
- "nome_richiedente": "mario",
- "cognome_richiedente": "rossi",
- "telefono": "0548798569",
- "cellulare": "3401234567",
- "codice_fiscale_richiedente": "RSSMRA82D11H501D",
- "data_nascita_richiedente": "11/04/1982",
- "sesso_richiedente": "M",
- "nazione_nascita_richiedente": "it",
- "comune_nascita_richiedente": "roma",
- "provincia_nascita_richiedente": "RM",
- "denominazione_titolare": "",
- "cf_piva_titolare": "",
- "indirizzo_titolare": "via verdi 20",
- "comune_titolare": "roma",
- "cap_titolare": "00042",
- "provincia_titolare": "rm",
- "nazione_titolare": "it",
- "tipo_documento": "CARTA_D_IDENTITA",
- "numero_documento": "CA00000AA",
- "data_rilascio_documento": "01/01/2020",
- "data_scadenza_documento": "01/01/2030",
- "documento_rilasciato_da": "Comune di Roma",
- "timestamp": {
- "registrazione": 1615199724,
- "ultima_modifica": 1615199724
}, - "multiutenza": [
- {
- "nome": "luca",
- "cognome": "bianchi",
- "descrizione": "collaboratore",
- "email_gestione_password": "[email protected]"
}
], - "documenti_attivazione": [ ],
- "documenti_conservazione": [ ],
- "invio_massivo": false,
- "norma_ai": false,
- "invio_massivo_pec": 50,
- "rinnovo_anni": 2,
- "id": "6045fdee3a716847a978a471"
}, - "success": true,
- "message": "",
- "error": null
}This method shows you the specific certified e-mail address related to the id
| id required | string Default: "<string>" Example: 6040e4613a716838dc4eee0e Pec id |
object (Casella) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/pec/%7Bid%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "data": {
- "tipo_casella": "BRONZE",
- "tipo_cliente": "PV",
- "sottotipo_cliente": "SI",
- "sottotipo_cliente_altro": "",
- "nome_richiedente": "mario",
- "cognome_richiedente": "rossi",
- "telefono": "0548798569",
- "cellulare": "3401234567",
- "codice_fiscale_richiedente": "RSSMRA82D11H501D",
- "data_nascita_richiedente": "11/04/1982",
- "sesso_richiedente": "M",
- "nazione_nascita_richiedente": "IT",
- "comune_nascita_richiedente": "roma",
- "provincia_nascita_richiedente": "RM",
- "denominazione_titolare": "",
- "cf_piva_titolare": "",
- "indirizzo_titolare": "via verdi 20",
- "comune_titolare": "roma",
- "cap_titolare": "00042",
- "nazione_titolare": "IT",
- "provincia_titolare": "rm",
- "tipo_documento": "CARTA_D_IDENTITA",
- "numero_documento": "CA00000AA",
- "data_rilascio_documento": "01/01/2020",
- "data_scadenza_documento": "01/01/2030",
- "documento_rilasciato_da": "Comune di Roma",
- "callback": {
- "custom": {
- "my_order_id": "123456"
}
}, - "dominio": "testcert.legalmail.it",
- "timestamp": {
- "registrazione": 1614865504,
- "ultima_modifica": 1614868403,
- "evasione": 1614868312,
- "scadenza": 1646391493,
- "revoca": 1614868400
}, - "cod_attivazione": "10173956",
- "uid": "MA177987",
- "conservazione": true,
- "data_scadenza": "04/03/2022",
- "data_attivazione": "04/03/2021",
- "sms": true,
- "spazio_conservazione": 512,
- "spazio_disco": 3072,
- "spazio_storico": 3072,
- "stato": "revocata",
- "storico": true,
- "autorinnovo": false,
- "phishing_protection": true,
- "password_protection": false,
- "invio_massivo": true,
- "invio_massivo_pec": 100,
- "invio_massivo_stat": {
- "totale": 100,
- "consumati": 23,
- "rimanenti": 77
}, - "documenti_attivazione": [
- "6040e4613a716838dc4eee0e_0_attivazione.pdf",
- "6040e4613a716838dc4eee0e_1_attivazione.pdf"
], - "documenti_conservazione": [
- "6040e4613a716838dc4eee0e_0_conservazione.pdf",
- "6040e4613a716838dc4eee0e_1_conservazione.pdf"
], - "multiutenza": [
- {
- "nome": "luca",
- "cognome": "bianchi",
- "descrizione": "prima utenza",
- "id_utenza": "6040e4613a716838dc4eee0e_0",
- "timestamp": {
- "attivazione": 1614868138
}, - "userid": "MA177993"
}
], - "id": "6040e4613a716838dc4eee0e"
}, - "success": true,
- "message": "",
- "error": null
}This method allows you to revoke the specific certified e-mail address related to the id
| id required | string Default: "<string>" Example: 6040e4613a716838dc4eee0e Pec id |
object (Casella) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/pec/%7Bid%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "data": {
- "tipo_casella": "BRONZE",
- "tipo_cliente": "PV",
- "sottotipo_cliente": "",
- "sottotipo_cliente_altro": "",
- "nome_richiedente": "mario",
- "cognome_richiedente": "rossi",
- "telefono": "0548798569",
- "codice_fiscale_richiedente": "RSSMRA82D11H501D",
- "data_nascita_richiedente": "11/04/1982",
- "sesso_richiedente": "M",
- "nazione_nascita_richiedente": "IT",
- "provincia_nascita_richiedente": "RM",
- "denominazione_titolare": "",
- "cf_piva_titolare": "",
- "indirizzo_titolare": "via verdi 20",
- "comune_titolare": "roma",
- "cap_titolare": "00042",
- "nazione_titolare": "IT",
- "provincia_titolare": "rm",
- "dominio": "testcert.legalmail.it",
- "timestamp": {
- "registrazione": 1614865504,
- "ultima_modifica": 1614868403,
- "evasione": 1614868312,
- "scadenza": 1646391493,
- "revoca": 1614868400
}, - "cellulare": "",
- "comune_nascita_richiedente": "",
- "cod_attivazione": "10173956",
- "uid": "MA177987",
- "conservazione": true,
- "data_scadenza": "04/03/2022",
- "sms": true,
- "spazio_conservazione": 512,
- "spazio_disco": 3072,
- "spazio_storico": 3072,
- "stato": "revocata",
- "storico": true,
- "documenti_attivazione": [
- "6040e4613a716838dc4eee0e_0_attivazione.pdf",
- "6040e4613a716838dc4eee0e_1_attivazione.pdf"
], - "data_attivazione": "04/03/2021",
- "documenti_conservazione": [
- "6040e4613a716838dc4eee0e_0_conservazione.pdf",
- "6040e4613a716838dc4eee0e_1_conservazione.pdf"
], - "multiutenza": [
- {
- "nome": "luca",
- "cognome": "bianchi",
- "descrizione": "prima utenza",
- "id_utenza": "6040e4613a716838dc4eee0e_0",
- "timestamp": {
- "attivazione": 1614868138
}, - "userid": "MA177993"
}
], - "id": "6040e4613a716838dc4eee0e",
- "autorinnovo": false
}, - "success": true,
- "message": "",
- "error": null
}Perform one or more operations on a PEC mailbox in a single call with a single billing checkout: upload activation documents, renew, upgrade box type, modify storage/options, activate conservation, and/or add multi-user accounts. At least one operation must be specified. Activation (ModuloAttivazione) requires stato registrata/documenti_errati; all other operations require stato evasa (rinnovo also accepts revocata). When ModuloAttivazione is sent together with other operations, they are all charged in the same checkout but, since the box is not active yet, they are saved on the box (rinnovo_anni increased, new space totals, options, multiutenza users, conservation pending) and applied at the provider when an operator activates it; they are listed in 'operazioni_in_attesa_di_attivazione' (conservation instead in 'operazioni_eseguite') and the box stays in_evasione. 'upgrade_casella' cannot be combined with ModuloAttivazione (error 704, before any charge). Several fields are InfoCert-only: 'upgrade_casella' always fails on Namirial (error 609, no tiers to upgrade to, before any charge), and 'phishing_protection'/'password_protection'/'norma_ai'/'invio_massivo_pec' have no effect there. 'multiutenza' also behaves differently per provider (a real per-user list on InfoCert vs a single on/off service on Namirial, with no individual user management). See field descriptions below and the 'combined_namirial' example. Billing (InfoCert): services and space activated after registration (phishing_protection, password_protection, norma_ai, extra space, conservation packages, multiutenza and each user) are charged at the full annual price, regardless of the months remaining until the mailbox expires.
| id required | string Default: "<string>" Example: 6045fdee3a716847a978a471 Pec id |
Array of objects <= 2 items [ items ] Documents to upload; each item must have 'tipo' (ModuloAttivazione|richiestaConservazione) and 'file' (base64-encoded PDF). This only stages the documents — real provider-side activation is done later by an operator, not through this API. For 'richiestaConservazione': InfoCert needs just 1 document; Namirial needs exactly 2, in order (1st = conservation contract, 2nd = privacy disclosure; error 726 otherwise): Namirial accepts a single document, so they are merged into one PDF when an operator activates conservazione. 'richiestaConservazione' requires 'spazio_conservazione' (error 727). All documents must be PDF (error 528), checked before any charge. | |
| rinnovo_anni | integer [ 1 .. 3 ] Default: "<integer>" number of years to renew (1-3) |
| upgrade_casella | string Default: "<string>" Enum: "STANDARD" "BRONZE" "SILVER" "GOLD" InfoCert only. Upgrade the box type (only upgrades allowed, one of the InfoCert tiers). MASSIVA1/2/3 boxes cannot be transformed (error 708). Always fails on Namirial boxes (DOMICILIODIGITALE/PECMASSIVA — error 609, they have no upgrade tiers). |
string or integer disk space in MB. Prefix '+' adds to current (e.g. '+1024'); plain integer sets absolute value. Must be a multiple of 1024. | |
string or integer archive space in MB. Prefix '+' adds to current; plain integer sets absolute. Must be a multiple of 1024. | |
string or integer conservation space in MB. Prefix '+' adds to current; plain integer sets absolute. Must be a multiple of 512 for InfoCert boxes, of 1024 (1 GB packages) for Namirial boxes (DOMICILIODIGITALE/PECMASSIVA). Conservation not active yet: the space already paid at registration is not charged again, only the packages beyond it are; a value lower than the space already paid returns error 289. | |
| phishing_protection | boolean Default: "<boolean>" InfoCert only. Activate phishing protection (one-way). Not supported on Namirial boxes — has no effect there. |
| password_protection | boolean Default: "<boolean>" InfoCert only. Activate password protection (one-way). Not supported on Namirial boxes — has no effect there. |
| norma_ai | boolean Default: "<boolean>" InfoCert only. Activate the Norma AI add-on (one-way). Cannot be set to true if already active (error 711). Not supported on Namirial boxes — has no effect there. |
| invio_massivo_pec | integer Default: "<integer>" InfoCert only. Bulk sending quota to add (must be a positive multiple of 50). Not supported on Namirial boxes. |
boolean or Array of objects |
object (Casella) | |
| operazioni_eseguite | Array of strings operations executed: attivazione, rinnovo, upgrade_casella, modifica, conservazione, multiutenza |
| operazioni_in_attesa_di_attivazione | Array of strings only with ModuloAttivazione: paid fields saved on the box and applied when it is activated (rinnovo_anni, spazio_disco, spazio_storico, phishing_protection, password_protection, norma_ai, invio_massivo_pec, multiutenza). Conservation is not listed here: it is saved as pending and listed in 'operazioni_eseguite' as 'conservazione' |
| success | boolean |
| message | string |
| error | integer |
{- "documenti": [
- {
- "tipo": "ModuloAttivazione",
- "file": "JVBERi0xLjQKJ..."
}, - {
- "tipo": "richiestaConservazione",
- "file": "JVBERi0xLjQKJ..."
}
], - "rinnovo_anni": 1,
- "spazio_disco": "+1024",
- "spazio_storico": "2048",
- "spazio_conservazione": "512",
- "invio_massivo_pec": 50,
- "phishing_protection": true,
- "password_protection": true,
- "multiutenza": [
- {
- "nome": "Mario",
- "cognome": "Rossi",
- "descrizione": "Collaboratore",
- "email_gestione_password": "[email protected]"
}
]
}{- "data": {
- "tipo_casella": "BRONZE",
- "stato": "evasa",
- "spazio_disco": 2048,
- "spazio_storico": 3072,
- "spazio_conservazione": 512,
- "conservazione": true,
- "storico": true,
- "sms": false,
- "autorinnovo": false,
- "phishing_protection": false,
- "password_protection": false,
- "invio_massivo": false,
- "invio_massivo_pec": 0,
- "id": "6045fdee3a716847a978a471"
}, - "operazioni_eseguite": [
- "rinnovo",
- "modifica"
], - "success": true,
- "message": "",
- "error": null
}This method allows you, once you have registered your certified electronic mailbox, to activate it by uploading the necessary documentation. The required documentation includes your valid identity document and the completed and signed activation form that you can download using the method GET/pec/{id}/modulo_attivazione. For the boxes of type DOMICILIODIGITALE and PECMASSIVA (Namirial) several PDFs can be sent (e.g. form and identity document): they are merged into a single PDF, as Namirial accepts only one document.
| id required | string Default: "<string>" Example: 6045fdee3a716847a978a471 Pec id |
required | string or Array of strings |
object (Casella) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
{- "documenti": [
- "JVBERi0xLjUKJeLjz9MKNyAwIG9iago8PAovVHlwZSAvRm9udERlc2NyaXB0b3IKL0ZvbnROYW1lIC9UaW1lcyMyME5ldyMyMFJvbWFuCi9GbGFncyAzMgovSXRhbGljQW5nbGUgMAovQXNjZW50IDg5MQovRGVzY2VudCAtMjE2Ci9DYXBIZWlnaHQgNjkzCi9BdmdXaWR0aCA0MDEKL01heFdpZHRoIDI2MTQKL0ZvbnRXZWlnaHQgNDAwCi9YSGVpZ2h0IDI1MAovTGVhZGluZyA0MgovU3RlbVYgNDAKL0ZvbnRCQm94IFstNTY4IC0yMTYgMjA0NiA2OTNdCj4+CmVuZG9iago4IDAgb2JqClsyNTAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAyNTAgMCA1MDAgMCA1MDAgMCAwIDUwMCA1MDAgNTAwIDUwMCA1MDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgNDQ0IDAgNDQ0IDAgMCAwIDAgMCAyNzggMCAwIDAgMCA1MDAgNTAwIDUwMCAwIDMzMyAzODkgMjc4IDAgNTAwXQplbmRvYmoKNiAwIG9iago8PAovVHlwZSAvRm9udAovU3VidHlwZSAvVHJ1ZVR5cGUKL05hbWUgL0YxCi9CYXNlRm9udCAvVGltZXMjMjBOZXcjMjBSb21hbgovRW5jb2RpbmcgL1dpbkFuc2lFbmNvZGluZwovRm9udERlc2NyaXB0b3IgNyAwIFIKL0ZpcnN0Q2hhciAzMgovTGFzdENoYXIgMTE4Ci9XaWR0aHMgOCAwIFIKPj4KZW5kb2JqCjkgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovQk0gL05vcm1hbAovY2EgMQo+PgplbmRvYmoKMTAgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovQk0gL05vcm1hbAovQ0EgMQo+PgplbmRvYmoKMTEgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZ",
- "JVBERi0xLjUKJeLjz9MKNyAwIG9iago8PAovVHlwZSAvRm9udERlc2NyaXB0b3IKL0ZvbnROYW1lIC9UaW1lcyMyME5ldyMyMFJvbWFuCi9GbGFncyAzMgovSXRhbGljQW5nbGUgMAovQXNjZW50IDg5MQovRGVzY2VudCAtMjE2Ci9DYXBIZWlnaHQgNjkzCi9BdmdXaWR0aCA0MDEKL01heFdpZHRoIDI2MTQKL0ZvbnRXZWlnaHQgNDAwCi9YSGVpZ2h0IDI1MAovTGVhZGluZyA0MgovU3RlbVYgNDAKL0ZvbnRCQm94IFstNTY4IC0yMTYgMjA0NiA2OTNdCj4+CmVuZG9iago4IDAgb2JqClsyNTAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAyNTAgMCA1MDAgMCA1MDAgMCAwIDUwMCA1MDAgNTAwIDUwMCA1MDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAw"
]
}{- "data": {
- "tipo_casella": "BRONZE",
- "tipo_cliente": "PV",
- "sottotipo_cliente": "",
- "sottotipo_cliente_altro": "",
- "nome_richiedente": "mario",
- "cognome_richiedente": "rossi",
- "telefono": "0548798569",
- "codice_fiscale_richiedente": "RSSMRA82D11H501D",
- "data_nascita_richiedente": "11/04/1982",
- "sesso_richiedente": "M",
- "nazione_nascita_richiedente": "IT",
- "provincia_nascita_richiedente": "RM",
- "denominazione_titolare": "",
- "cf_piva_titolare": "",
- "indirizzo_titolare": "via verdi 20",
- "comune_titolare": "roma",
- "cap_titolare": "00042",
- "nazione_titolare": "IT",
- "provincia_titolare": "rm",
- "dominio": "testcert.legalmail.it",
- "timestamp": {
- "registrazione": 1615199724,
- "ultima_modifica": 1615200175
}, - "cellulare": "",
- "comune_nascita_richiedente": "",
- "cod_attivazione": "10174594",
- "uid": "MA178634",
- "conservazione": false,
- "data_scadenza": "",
- "sms": false,
- "spazio_conservazione": 0,
- "spazio_disco": 0,
- "spazio_storico": 0,
- "stato": "in_evasione",
- "storico": false,
- "documenti_attivazione": [
- "6045fdee3a716847a978a471_0_attivazione.pdf",
- "6045fdee3a716847a978a471_1_attivazione.pdf"
], - "id": "6045fdee3a716847a978a471",
- "autorinnovo": false
}, - "success": true,
- "message": "",
- "error": null
}Modify settings of an active PEC mailbox. Space fields (spazio_disco, spazio_storico, spazio_conservazione) accept an integer (absolute value) or a string prefixed with '+' for incremental increase (e.g. '+1024'). Only upgrades allowed for space. Boolean fields activate optional services (phishing_protection, password_protection, norma_ai) — InfoCert only, no effect on Namirial boxes. invio_massivo_pec adds bulk-send packages (multiple of 50, one package every 50) to the existing quota — also InfoCert only. At least one field must be provided. Billing (InfoCert): services and space activated after registration (phishing_protection, password_protection, norma_ai, extra space, conservation packages, multiutenza and each user) are charged at the full annual price, regardless of the months remaining until the mailbox expires.
| id required | string Default: "<string>" Example: 6045fdee3a716847a978a471 Pec id |
string or integer If you put the + symbol in front you go to add space to what you have. If you pass only a number go to set the space with that value. | |
string or integer If you put the + symbol in front you go to add space to what you have. If you pass only a number go to set the space with that value. | |
string or integer If you put the + symbol in front you go to add space to what you have. If you pass only a number go to set the space with that value. Requires 'conservazione' service to be active. Must be a multiple of 512 for InfoCert boxes, of 1024 (1 GB packages) for Namirial boxes (DOMICILIODIGITALE/PECMASSIVA). | |
| invio_massivo_pec | integer multiple of 50 >= 50 Default: "<integer>" InfoCert only. Bulk sends to add to the current quota (N/50 packages). Must be a positive multiple of 50 (e.g. 50, 100, 150). Not supported on Namirial boxes. |
| phishing_protection | boolean Default: "<boolean>" InfoCert only. Activate phishing protection add-on. Cannot be set to true if already active (error 516). Not supported on Namirial boxes. |
| password_protection | boolean Default: "<boolean>" InfoCert only. Activate password protection add-on. Cannot be set to true if already active (error 517). Not supported on Namirial boxes. |
| norma_ai | boolean Default: "<boolean>" InfoCert only. Activate the Norma AI add-on. Cannot be set to true if already active (error 652). Not supported on Namirial boxes. |
object (Casella) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
{- "spazio_disco": "+1024",
- "invio_massivo_pec": 100,
- "phishing_protection": true
}{- "data": {
- "tipo_casella": "GOLD",
- "tipo_cliente": "PV",
- "sottotipo_cliente": "",
- "sottotipo_cliente_altro": "",
- "nome_richiedente": "mario",
- "cognome_richiedente": "rossi",
- "telefono": "0548798569",
- "codice_fiscale_richiedente": "RSSMRA82D11H501D",
- "data_nascita_richiedente": "11/04/1982",
- "sesso_richiedente": "M",
- "nazione_nascita_richiedente": "IT",
- "provincia_nascita_richiedente": "RM",
- "denominazione_titolare": "",
- "cf_piva_titolare": "",
- "indirizzo_titolare": "via verdi 20",
- "comune_titolare": "roma",
- "cap_titolare": "00042",
- "nazione_titolare": "IT",
- "provincia_titolare": "rm",
- "dominio": "testcert.legalmail.it",
- "timestamp": {
- "registrazione": 1615199724,
- "evasione": 1615199724,
- "scadenza": 1646391493,
- "ultima_modifica": 1615200175
}, - "cellulare": "",
- "comune_nascita_richiedente": "",
- "cod_attivazione": "10174594",
- "uid": "MA178634",
- "conservazione": true,
- "data_attivazione": "20/04/2021",
- "data_scadenza": "20/04/2022",
- "sms": true,
- "spazio_conservazione": 1536,
- "spazio_disco": 3072,
- "spazio_storico": 14336,
- "stato": "evasa",
- "storico": true,
- "documenti_attivazione": [
- "6045fdee3a716847a978a471_0_attivazione.pdf",
- "6045fdee3a716847a978a471_1_attivazione.pdf"
], - "documenti_conservazione": [
- "6045fdee3a716847a978a471_0_conservazione.pdf"
], - "id": "6045fdee3a716847a978a471",
- "autorinnovo": false
}, - "success": true,
- "message": "",
- "error": null
}This method allows you to activate the standard storage service in your certified e-mail. Supported for all mailbox types including DOMICILIODIGITALE and PECMASSIVA (Namirial). This only stages the request (space + documents) — real provider-side activation is done later by an operator, not through this API. Conservation space is sold in packages of 512 MB on InfoCert and 1 GB (1024 MB) on Namirial. Conservation space is bought at registration (POST /pec, spazio_conservazione); this call uploads the signed documents and does not charge that space again. Only space beyond what was already paid is charged here, at the full annual price. On Namirial the space cannot exceed the archive space (error 607). InfoCert needs just 1 document ('documenti' as a plain string or a 1-item array); Namirial needs exactly 2, passed in order (1st = conservation contract, 2nd = privacy disclosure; error 726 otherwise, before any charge): Namirial accepts a single document, so they are merged into one PDF when an operator activates conservazione — see the 'namirial' request example.
| id required | string Default: "<string>" Example: 6045fdee3a716847a978a471 Pec id |
string or integer Conservation space bought at registration (POST /pec) is already paid and is kept. If this parameter is not passed, that space is used (if none was bought: 512 MB on InfoCert, 1024 MB on Namirial); a higher value or '+N' charges only the packages beyond the space already paid; a lower value returns error 289. | |
required | string or Array of strings |
object (Casella) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
{- "spazio_conservazione": 512,
- "documenti": "JVBERi0xLjUKJeLjz9MKNyAwIG9iago8PAovVHlwZSAvRm9udERlc2NyaXB0b3IKL0ZvbnROYW1lIC9UaW1lcyMyME5ldyMyMFJvbWFuCi9GbGFncyAzMgovSXRhbGljQW5nbGUgMAovQXNjZW50IDg5MQovRGVzY2VudCAtMjE2Ci9DYXBIZWlnaHQgNjkzCi9BdmdXaWR0aCA0MDEKL01heFdpZHRoIDI2MTQKL0ZvbnRXZWlnaHQgNDAwCi9YSGVpZ2h0IDI1MAovTGVhZGluZyA0MgovU3RlbVYgNDAKL0ZvbnRCQm94IFstNTY4IC0yMTYgMjA0NiA2OTNdCj4+CmVuZG9iago4IDAgb2JqClsyNTAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAyNTAgMCA1MDAgMCA1MDAgMCAwIDUwMCA1MDAgNTAwIDUwMCA1MDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgNDQ0IDAgNDQ0IDAgMCAwIDAgMCAyNzggMCAwIDAgMCA1MDAgNTAwIDUwMCAwIDMzMyAzODkgMjc4IDAgNTAwXQplbmRvYmoKNiAwIG9iago8PAovVHlwZSAvRm9udAovU3VidHlwZSAvVHJ1ZVR5cGUKL05hbWUgL0YxCi9CYXNlRm9udCAvVGltZXMjMjBOZXcjMjBSb21hbgovRW5jb2RpbmcgL1dpbkFuc2lFbmNvZGluZwovRm9udERlc2NyaXB0b3IgNyAwIFIKL0ZpcnN0Q2hhciAzMgovTGFzdENoYXIgMTE4Ci9XaWR0aHMgOCAwIFIKPj4KZW5kb2JqCjkgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovQk0gL05vcm1hbAovY2EgMQo+PgplbmRvYmoKMTAgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovQk0gL05vcm1hbAovQ0EgMQo+PgplbmRvYmoKMTEgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZ"
}{- "data": {
- "tipo_casella": "GOLD",
- "tipo_cliente": "PV",
- "sottotipo_cliente": "",
- "sottotipo_cliente_altro": "",
- "nome_richiedente": "mario",
- "cognome_richiedente": "rossi",
- "telefono": "0548798569",
- "codice_fiscale_richiedente": "RSSMRA82D11H501D",
- "data_nascita_richiedente": "11/04/1982",
- "sesso_richiedente": "M",
- "nazione_nascita_richiedente": "IT",
- "provincia_nascita_richiedente": "RM",
- "denominazione_titolare": "",
- "cf_piva_titolare": "",
- "indirizzo_titolare": "via verdi 20",
- "comune_titolare": "roma",
- "cap_titolare": "00042",
- "nazione_titolare": "IT",
- "provincia_titolare": "rm",
- "dominio": "testcert.legalmail.it",
- "timestamp": {
- "registrazione": 1615199724,
- "evasione": 1615199724,
- "scadenza": 1646391493,
- "ultima_modifica": 1615200175
}, - "cellulare": "",
- "comune_nascita_richiedente": "",
- "cod_attivazione": "10174594",
- "uid": "MA178634",
- "conservazione": false,
- "data_attivazione": "20/04/2021",
- "data_scadenza": "20/04/2022",
- "sms": true,
- "spazio_conservazione": 1024,
- "spazio_disco": 2048,
- "spazio_storico": 13312,
- "stato": "evasa",
- "storico": true,
- "documenti_attivazione": [
- "6045fdee3a716847a978a471_0_attivazione.pdf",
- "6045fdee3a716847a978a471_1_attivazione.pdf"
], - "documenti_conservazione": [
- "6045fdee3a716847a978a471_0_conservazione.pdf"
], - "id": "6045fdee3a716847a978a471",
- "autorinnovo": false
}, - "success": true,
- "message": "",
- "error": null
}This method allows you to change the type of certified email. Only upgrades are allowed, for example from a STANDARD you can switch to a SILVER or GOLD one. Action not allowed for these two types of boxes: DOMICILIODIGITALE, PECMASSIVA. MASSIVA1, MASSIVA2 and MASSIVA3 boxes cannot be transformed into STANDARD, BRONZE, SILVER or GOLD (error 522).
| id required | string Default: "<string>" Example: 6045fdee3a716847a978a471 Pec id |
| tipo_casella | string Default: "<string>" Enum: "STANDARD" "BRONZE" "SILVER" "GOLD" type of mailbox |
object (Casella) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
{- "tipo_casella": "GOLD"
}{- "data": {
- "tipo_casella": "GOLD",
- "tipo_cliente": "PV",
- "sottotipo_cliente": "",
- "sottotipo_cliente_altro": "",
- "nome_richiedente": "mario",
- "cognome_richiedente": "rossi",
- "telefono": "0548798569",
- "codice_fiscale_richiedente": "RSSMRA82D11H501D",
- "data_nascita_richiedente": "11/04/1982",
- "sesso_richiedente": "M",
- "nazione_nascita_richiedente": "IT",
- "provincia_nascita_richiedente": "RM",
- "denominazione_titolare": "",
- "cf_piva_titolare": "",
- "indirizzo_titolare": "via verdi 20",
- "comune_titolare": "roma",
- "cap_titolare": "00042",
- "nazione_titolare": "IT",
- "provincia_titolare": "rm",
- "dominio": "testcert.legalmail.it",
- "timestamp": {
- "registrazione": 1615199724,
- "evasione": 1615199724,
- "scadenza": 1646391493,
- "ultima_modifica": 1615200175
}, - "cellulare": "",
- "comune_nascita_richiedente": "",
- "cod_attivazione": "10174594",
- "uid": "MA178634",
- "conservazione": false,
- "data_attivazione": "20/04/2021",
- "data_scadenza": "20/04/2022",
- "sms": true,
- "spazio_conservazione": 0,
- "spazio_disco": 2048,
- "spazio_storico": 13312,
- "stato": "evasa",
- "storico": true,
- "documenti_attivazione": [
- "6045fdee3a716847a978a471_0_attivazione.pdf",
- "6045fdee3a716847a978a471_1_attivazione.pdf"
], - "id": "6045fdee3a716847a978a471",
- "autorinnovo": false
}, - "success": true,
- "message": "",
- "error": null
}This method allows you to renew (1-3 years, query parameter 'anni') or re-activate the certified e-mail identified by the id. The mailbox always keeps the day and month of its previous expiration date: the new expiration date is the previous one plus the renewed years if the mailbox expired less than 6 months ago (InfoCert) or less than 1 month ago (Namirial), otherwise the last anniversary already passed plus the renewed years (the yearly cycle continues; e.g. expired on 15/03/2025, renewed on 10/10/2026 for 1 year → 15/03/2027). A revoked mailbox can be renewed only within those limits (error 252).
| id required | string Default: "<string>" Example: 6040e4613a716838dc4eee0e Pec id |
| anni | integer [ 1 .. 3 ] Default: "<integer>" Example: anni=2 Number of years for which you want to renew the pec box (1-3). If not passed it is 1 by default. Values above 3 are silently clamped down to 3; non-numeric or values below 1 return error 649. |
object (Casella) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/pec/%7Bid%7D/rinnovo?anni=2"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "data": {
- "tipo_casella": "BRONZE",
- "tipo_cliente": "PV",
- "sottotipo_cliente": "",
- "sottotipo_cliente_altro": "",
- "nome_richiedente": "mario",
- "cognome_richiedente": "rossi",
- "telefono": "0548798569",
- "codice_fiscale_richiedente": "RSSMRA82D11H501D",
- "data_nascita_richiedente": "11/04/1982",
- "sesso_richiedente": "M",
- "nazione_nascita_richiedente": "IT",
- "provincia_nascita_richiedente": "RM",
- "denominazione_titolare": "",
- "cf_piva_titolare": "",
- "indirizzo_titolare": "via verdi 20",
- "comune_titolare": "roma",
- "cap_titolare": "00042",
- "nazione_titolare": "IT",
- "provincia_titolare": "rm",
- "dominio": "testcert.legalmail.it",
- "timestamp": {
- "registrazione": 1614865504,
- "ultima_modifica": 1614868403,
- "evasione": 1614868312,
- "scadenza": 1646391493
}, - "cellulare": "",
- "comune_nascita_richiedente": "",
- "cod_attivazione": "10173956",
- "uid": "MA177987",
- "conservazione": true,
- "data_scadenza": "04/03/2022",
- "sms": true,
- "spazio_conservazione": 512,
- "spazio_disco": 3072,
- "spazio_storico": 3072,
- "stato": "evasa",
- "storico": true,
- "documenti_attivazione": [
- "6040e4613a716838dc4eee0e_0_attivazione.pdf",
- "6040e4613a716838dc4eee0e_1_attivazione.pdf"
], - "data_attivazione": "04/03/2021",
- "documenti_conservazione": [
- "6040e4613a716838dc4eee0e_0_conservazione.pdf",
- "6040e4613a716838dc4eee0e_1_conservazione.pdf"
], - "multiutenza": [
- {
- "nome": "luca",
- "cognome": "bianchi",
- "descrizione": "prima utenza",
- "id_utenza": "6040e4613a716838dc4eee0e_0",
- "timestamp": {
- "attivazione": 1614868138
}, - "userid": "MA177993"
}
], - "id": "6040e4613a716838dc4eee0e",
- "autorinnovo": false
}, - "success": true,
- "message": "",
- "error": null
}InfoCert: adds a user who can use an existing pec box (repeatable, up to 25 users). Namirial (DOMICILIODIGITALE/PECMASSIVA): does not add a user — this call only activates the multiutenza on/off service once. The body is not read at all for Namirial, an empty '{}' works; calling it again returns error 596 'multiutenza just available for this pec'. Billing (InfoCert): the multiutenza service (first user only) and each user are charged at the full annual price, regardless of the months remaining until the mailbox expires.
| id required | string Default: "<string>" Example: 6040e4613a716838dc4eee0e Pec id |
| nome required | string Default: "<string>" first name |
| cognome required | string Default: "<string>" last name |
| descrizione | string Default: "<string>" description. Required for InfoCert mailboxes (STANDARD/BRONZE/SILVER/GOLD). Not validated at all for Namirial mailboxes (DOMICILIODIGITALE/PECMASSIVA), whose multiutenza is a simple on/off flag. |
| email_gestione_password required | string Default: "<string>" email of the user |
object (Casella) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
{- "nome": "luca",
- "cognome": "bianchi",
- "descrizione": "prima utenza",
- "email_gestione_password": "[email protected]"
}{- "data": {
- "tipo_casella": "BRONZE",
- "tipo_cliente": "PV",
- "sottotipo_cliente": "",
- "sottotipo_cliente_altro": "",
- "nome_richiedente": "mario",
- "cognome_richiedente": "rossi",
- "telefono": "0548798569",
- "codice_fiscale_richiedente": "RSSMRA82D11H501D",
- "data_nascita_richiedente": "11/04/1982",
- "sesso_richiedente": "M",
- "nazione_nascita_richiedente": "IT",
- "provincia_nascita_richiedente": "RM",
- "denominazione_titolare": "",
- "cf_piva_titolare": "",
- "indirizzo_titolare": "via verdi 20",
- "comune_titolare": "roma",
- "cap_titolare": "00042",
- "nazione_titolare": "IT",
- "provincia_titolare": "rm",
- "dominio": "testcert.legalmail.it",
- "timestamp": {
- "registrazione": 1614865504,
- "ultima_modifica": 1614868403,
- "evasione": 1614868312,
- "scadenza": 1646391493
}, - "cellulare": "",
- "comune_nascita_richiedente": "",
- "cod_attivazione": "10173956",
- "uid": "MA177987",
- "conservazione": true,
- "data_scadenza": "04/03/2022",
- "sms": true,
- "spazio_conservazione": 512,
- "spazio_disco": 3072,
- "spazio_storico": 3072,
- "stato": "evasa",
- "storico": true,
- "documenti_attivazione": [
- "6040e4613a716838dc4eee0e_0_attivazione.pdf",
- "6040e4613a716838dc4eee0e_1_attivazione.pdf"
], - "data_attivazione": "04/03/2021",
- "documenti_conservazione": [
- "6040e4613a716838dc4eee0e_0_conservazione.pdf",
- "6040e4613a716838dc4eee0e_1_conservazione.pdf"
], - "multiutenza": [
- {
- "nome": "luca",
- "cognome": "bianchi",
- "descrizione": "prima utenza",
- "id_utenza": "6040e4613a716838dc4eee0e_0",
- "timestamp": {
- "attivazione": 1614868138
}, - "userid": "MA177993"
}
], - "id": "6040e4613a716838dc4eee0e",
- "autorinnovo": false
}, - "success": true,
- "message": "",
- "error": null
}Returns the slave users of an InfoCert mailbox's multiutenza service. Not applicable to Namirial (DOMICILIODIGITALE/PECMASSIVA) boxes, whose 'multiutenza' field is a boolean, not an array — see error 208.
| id required | string Default: "<string>" Example: 6040e4613a716838dc4eee0e Pec id |
| id_subset | string Default: "<string>" Example: id_subset=6040e4613a716838dc4eee0e_0 If provided, returns only the single slave user at this index instead of the full list. Format: ' |
Array of Utenza (objects) or Utenza (object) | |
| 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://pec.openapi.it/pec/%7Bid%7D/multiutenza?id_subset=6040e4613a716838dc4eee0e_0"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "data": [
- {
- "nome": "luca",
- "cognome": "bianchi",
- "descrizione": "prima utenza",
- "id_utenza": "6040e4613a716838dc4eee0e_0",
- "timestamp": {
- "attivazione": 1614868138
}, - "userid": "MA177993"
}
], - "success": true,
- "message": "",
- "error": null
}This method shows you all the certified e-mail communications to the business register started
Array of objects (RichiesteComunicazionePec) [ items ] | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/comunica_pec"); struct curl_slist *headers = NULL; 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": "60ad149c3a7168084f1d2b68",
- "stato": "documenti_caricati",
- "timestamp": 1622127248,
- "owner": "[email protected]"
}, - {
- "id": "60ad0f2a3a716801f42a9773",
- "stato": "documenti_caricati",
- "timestamp": 1622126850,
- "owner": "[email protected]"
}
], - "success": true,
- "message": "",
- "error": null
}This method allows you to communicate a certified e-mail to the business register
| casella_pec required | string Default: "<string>" the certified email address (PEC) |
| pec_amministratore | boolean Default: false if true, the mailbox belongs to the company administrator |
| cf required | string Default: "<string>" fiscal code |
| nome required | string Default: "<string>" first name |
| cognome required | string Default: "<string>" last name |
| qualifica required | string Default: "<string>" Enum: "AMMINISTRATORE" "COMMISSARIO_GIUDIZIARIO" "CURATORE_FALLIMENTARE" "LEGALE_RAPPRESENTANTE" "LIQUIDATORE" "SOCIO" "TITOLARE" qualification of the owner |
| email required | string Default: "<string>" email of the owner |
| cellulare required | string Default: "<string>" mobile phone of the owner |
| ragione_sociale required | string Default: "<string>" company name |
| cf_piva required | string Default: "<string>" company's fiscal code or VAT number |
| comune required | string Default: "<string>" municipality of the company |
| provincia required | string Default: "<string>" province of the company |
object (Callback) Standardized callback configuration. Enables receiving notifications about status updates of asynchronous requests. |
object (RichiestaComunicazionePec) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
{- "pec_amministratore": false,
- "cf": "RSSMRA80A01L117D",
- "nome": "mario",
- "cognome": "rossi",
- "qualifica": "LEGALE_RAPPRESENTANTE",
- "cellulare": "3401234567",
- "ragione_sociale": "azienda test",
- "cf_piva": "12345678910",
- "comune": "roma",
- "provincia": "RM",
}{- "data": {
- "pec_amministratore": false,
- "cf": "RSSMRA80A01L117D",
- "nome": "mario",
- "cognome": "rossi",
- "qualifica": "LEGALE_RAPPRESENTANTE",
- "cellulare": "34xxxxxx18",
- "ragione_sociale": "azienda test",
- "cf_piva": "12345678910",
- "comune": "roma",
- "provincia": "RM",
- "callback": false,
- "stato": "codice_in_richiesta",
- "codice_registro_imprese": "openapi",
- "documenti_registro_imprese": [ ],
- "timestamp": 1621955739,
- "id": "60ad149c3a7168084f1d2b68"
}, - "success": true,
- "message": "",
- "error": null
}This method returns you the specific request marked with the id
| id required | string Default: "<string>" Example: 60ad149c3a7168084f1d2b68 Comunica Pec id |
object (RichiestaComunicazionePec) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/comunica_pec/%7Bid%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "data": {
- "pec_amministratore": false,
- "cf": "RSSMRA80A01L117D",
- "nome": "mario",
- "cognome": "rossi",
- "qualifica": "LEGALE_RAPPRESENTANTE",
- "cellulare": "349xxxxx18",
- "ragione_sociale": "azienda test",
- "cf_piva": "12345678910",
- "comune": "roma",
- "provincia": "RM",
- "callback": false,
- "stato": "documenti_caricati",
- "codice_registro_imprese": "openapi",
- "documenti_registro_imprese": [
- "60ad149c3a7168084f1d2b68_0_registro_imprese.p7m"
], - "timestamp": 1622127248,
- "id": "60ad149c3a7168084f1d2b68"
}, - "success": true,
- "message": "",
- "error": null
}This method allows you to complete the request for communication of your pec to the business register by uploading the necessary documentation. The required documentation includes the completed and digitally signed form (PDF or p7m) that you can download using the method GET/comunica_pec/{id}/procura_registro_imprese.
| id required | string Default: "<string>" Example: 60dc8da86c8b04624536bbb2 Comunica Pec id |
required | string or Array of strings |
object (RichiestaComunicazionePec) | |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
{- "documenti": "JVBERi0xLjUKJeLjz9MKNyAwIG9iago8PAovVHlwZSAvRm9udERlc2NyaXB0b3IKL0ZvbnROYW1lIC9UaW1lcyMyME5ldyMyMFJvbWFuCi9GbGFncyAzMgovSXRhbGljQW5nbGUgMAovQXNjZW50IDg5MQovRGVzY2VudCAtMjE2Ci9DYXBIZWlnaHQgNjkzCi9BdmdXaWR0aCA0MDEKL01heFdpZHRoIDI2MTQKL0ZvbnRXZWlnaHQgNDAwCi9YSGVpZ2h0IDI1MAovTGVhZGluZyA0MgovU3RlbVYgNDAKL0ZvbnRCQm94IFstNTY4IC0yMTYgMjA0NiA2OTNdCj4+CmVuZG9iago4IDAgb2JqClsyNTAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAyNTAgMCA1MDAgMCA1MDAgMCAwIDUwMCA1MDAgNTAwIDUwMCA1MDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgNDQ0IDAgNDQ0IDAgMCAwIDAgMCAyNzggMCAwIDAgMCA1MDAgNTAwIDUwMCAwIDMzMyAzODkgMjc4IDAgNTAwXQplbmRvYmoKNiAwIG9iago8PAovVHlwZSAvRm9udAovU3VidHlwZSAvVHJ1ZVR5cGUKL05hbWUgL0YxCi9CYXNlRm9udCAvVGltZXMjMjBOZXcjMjBSb21hbgovRW5jb2RpbmcgL1dpbkFuc2lFbmNvZGluZwovRm9udERlc2NyaXB0b3IgNyAwIFIKL0ZpcnN0Q2hhciAzMgovTGFzdENoYXIgMTE4Ci9XaWR0aHMgOCAwIFIKPj4KZW5kb2JqCjkgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovQk0gL05vcm1hbAovY2EgMQo+PgplbmRvYmoKMTAgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovQk0gL05vcm1hbAovQ0EgMQo+PgplbmRvYmoKMTEgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZ"
}{- "data": {
- "pec_amministratore": false,
- "cf": "RSSMRA80A01L117D",
- "nome": "mario",
- "cognome": "rossi",
- "qualifica": "LEGALE_RAPPRESENTANTE",
- "cellulare": "34xxxxx018",
- "ragione_sociale": "azienda test",
- "cf_piva": "12345678910",
- "comune": "roma",
- "provincia": "RM",
- "callback": false,
- "stato": "documenti_caricati",
- "codice_registro_imprese": "openapi",
- "documenti_registro_imprese": [
- "60dc8da86c8b04624536bbb2_0_registro_imprese.p7m"
], - "timestamp": 1625067055,
- "id": "60dc8da86c8b04624536bbb2"
}, - "success": true,
- "message": "",
- "error": null
}Array of objects (Dominio) <= 2 items [ items ] |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/dominio"); struct curl_slist *headers = NULL; 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": "69806bcce09fb76c6b0fef0b",
- "dominio": "testdominio.legalmail.it",
- "fornitore": "infocert",
- "stato_fornitore": "OK",
- "dns": "OK",
- "config": "OK",
- "certif": "missing",
- "note": "string",
- "record_mx": "string",
- "tipo_dominio": "interno",
- "stato": "registrato",
- "data_scadenza": "02/02/2027",
- "data_certificazione": "02/02/2026",
- "timestamp": {
- "registrazione": 0,
- "ultima_modifica": 0,
- "evasione": 0,
- "certificazione": 0,
- "scadenza": 0,
- "revoca": 0
}, - "id_ordine": "62558f",
- "autorinnovo": false,
- "anni": 1,
- "numero_pec": 1,
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
}, - "custom": {
- "my_custom_id": "123456789"
}
}, - "tipo_cliente": "IM",
- "nome_richiedente": "string",
- "cognome_richiedente": "string",
- "codice_fiscale_richiedente": "string",
- "email": "string",
- "cellulare": "string",
- "indirizzo_titolare": "string",
- "comune_titolare": "string",
- "cap_titolare": "string",
- "provincia_titolare": "string",
- "nazione_titolare": "string",
- "denominazione_titolare": "string",
- "cf_piva_titolare": "string",
- "data_nascita_richiedente": "string",
- "sesso_richiedente": "M",
- "comune_nascita_richiedente": "string",
- "provincia_nascita_richiedente": "string",
- "nazione_nascita_richiedente": "string",
- "documenti_attivazione": [
- "string",
- "string"
], - "tipo_documento": "CARTA_D_IDENTITA",
- "numero_documento": "string",
- "data_scadenza_documento": "string",
- "documento_rilasciato_da": "string",
- "data_rilascio_documento": "string",
- "sottotipo_cliente": "string",
- "telefono": "string",
- "anagrafica_sincronizzata": true,
- "pec_attive": 0,
- "pec_totali": 0
}
]
}Before calling this endpoint, the customer must configure an MX record on their domain's own DNS pointing to the provider's mail server: 'mx.cert.legalmail.it' for InfoCert, 'mailpro.sicurezzapostale.it' for Namirial. This check is skipped for internal legalmail.it subdomains and in test environments (AMBIENTE_TEST_DOMINI). If the MX record is missing or incorrect, the request fails with error 714. In addition to the local DB check, the domain is also checked against the central domain registry (the same lookup used by GET /domini_pec/{dominio}), unless its MX record already points to the chosen provider's mail server (the registry would detect the provider's MX, not a real registration); if already censito there, the request fails with error 712 (InfoCert) or 732 (Namirial), and if the registry lookup itself fails the request fails with error 710 (503).
| dominio required | string Default: "<string>" The domain name to activate (e.g. example.com). An MX record must already be configured on this domain's DNS pointing to the provider's mail server before calling this endpoint — see 'fornitore'. |
| fornitore required | string Default: "<string>" Enum: "infocert" "namirial" The service provider. Determines the required MX record for 'dominio': 'mx.cert.legalmail.it' for infocert, 'mailpro.sicurezzapostale.it' for namirial. |
| anni | integer Default: 1 Enum: 1 2 3 Number of years for which the domain is purchased (initial activation only, 1-3) |
| numero_pec | integer Default: 0 Number of PEC boxes purchased for the domain |
| note | string Default: "<string>" Free-text internal note stored with the domain. Never returned by GET /dominio or GET /dominio/{id} (stripped from those two responses only). |
| tipo_cliente | string Default: "<string>" Enum: "IM" "PS" "PL" "PC" "A" "PV" [Namirial only] Customer type. Forced to 'IM' whenever absent or 'PV' — a domain activation can never actually be recorded as 'PV', so denominazione_titolare/cf_piva_titolare are effectively always required for Namirial. 'X' is rejected (error 362). |
| nome_richiedente | string Default: "<string>" [Namirial only] First name of the applicant. Required. |
| cognome_richiedente | string Default: "<string>" [Namirial only] Last name of the applicant. Required. |
| codice_fiscale_richiedente | string Default: "<string>" [Namirial only] Fiscal code of the applicant. Required. |
| data_nascita_richiedente | string Default: "<string>" [Namirial only] Date of birth of the applicant (dd/mm/yyyy). Required for domain activation regardless of tipo_cliente. |
| sesso_richiedente | string Default: "<string>" Enum: "M" "F" [Namirial only] Gender of the applicant. Required for domain activation regardless of tipo_cliente. |
string Default: "<string>" [Namirial only] Email address of the applicant. Required. | |
| cellulare | string Default: "<string>" [Namirial only] Mobile phone of the applicant. Required. |
| indirizzo_titolare | string Default: "<string>" [Namirial only] Address of the holder. Required. |
| comune_titolare | string Default: "<string>" [Namirial only] City of the holder. Required. |
| cap_titolare | string Default: "<string>" [Namirial only] Postal code of the holder. Required. |
| provincia_titolare | string Default: "<string>" [Namirial only] Province of the holder, 3 characters maximum. Required only when nazione_titolare is IT or ITA; for any other country EE is saved. |
| nazione_titolare | string Default: "<string>" [Namirial only] Country of the holder. Required. |
| denominazione_titolare | string Default: "<string>" [Namirial only] Company/entity name. Always required in practice — tipo_cliente can never remain 'PV' for a domain activation. |
| cf_piva_titolare | string Default: "<string>" [Namirial only] VAT number of the holder: only an 11-digit partita IVA is accepted (error 389), not a fiscal code. Always required in practice — tipo_cliente can never remain 'PV' for a domain activation. |
| comune_nascita_richiedente | string Default: "<string>" [Namirial only] City of birth of the applicant. Required for domain activation regardless of tipo_cliente. |
| provincia_nascita_richiedente | string Default: "<string>" [Namirial only] Province of birth of the applicant. |
| nazione_nascita_richiedente | string Default: "<string>" [Namirial only] Country of birth of the applicant. Required for domain activation regardless of tipo_cliente. |
| tipo_documento | string Default: "<string>" Enum: "CARTA_D_IDENTITA" "PASSAPORTO" [Namirial only] Type of identification document. Required. Driver's license (PATENTE) is NOT accepted for domain registration (unlike PEC mailbox activation, which does accept it). |
| numero_documento | string Default: "<string>" [Namirial only] Document number. Required. |
| data_scadenza_documento | string Default: "<string>" [Namirial only] Document expiry date (dd/mm/yyyy). Required. |
| documento_rilasciato_da | string Default: "<string>" [Namirial only] Issuing authority of the document. Required. |
| data_rilascio_documento | string Default: "<string>" [Namirial only] Document issue date (dd/mm/yyyy). Required. |
object (Callback) Standardized callback configuration. Enables receiving notifications about status updates of asynchronous requests. |
object (Dominio) GET/POST/PATCH/DELETE all return the domain record as stored in MongoDB pretty much as-is (only a handful of fields are stripped, see individual endpoints). On some InfoCert domains this includes fields not written by any current API code path — 'anagrafica_sincronizzata', 'pec_attive', 'pec_totali', 'sottotipo_cliente', 'telefono' (all documented below) — plus Italian-language 'dns'/'config'/'certif' values (e.g. 'CORRETTO'/'ERRATO') written by the async cron (CronAutorinnovo), which reads them from InfoCert's XML interface (InfocertDominiClient::getStatoDominio) — DominioInfoCert::sincronizza only updates stato_fornitore — as opposed to the English 'OK'/'KO' produced by the REST integration used at initial activation. |
InfoCert only needs the domain, provider, duration/quota and optional note/callback — none of the applicant/holder fields apply.
{- "dominio": "testdominio.legalmail.it",
- "fornitore": "infocert",
- "anni": 1,
- "numero_pec": 1
}{- "data": {
- "dominio": "testdominio.legalmail.it",
- "fornitore": "infocert",
- "stato_fornitore": "KO",
- "dns": "OK",
- "config": "KO",
- "certif": "KO",
- "tipo_dominio": "interno",
- "stato": "registrato",
- "data_scadenza": "02/02/2027",
- "timestamp": {
- "registrazione": 1770023882,
- "scadenza": 1801559882,
- "ultima_modifica": 1770023884
}, - "anni": 1,
- "numero_pec": 1,
- "id_ordine": "62558f",
- "autorinnovo": false,
- "id": "69806bcce09fb76c6b0fef0b"
}
}| id required | string Default: "<string>" Example: 69806bcce09fb76c6b0fef0b The domain ID |
object (Dominio) GET/POST/PATCH/DELETE all return the domain record as stored in MongoDB pretty much as-is (only a handful of fields are stripped, see individual endpoints). On some InfoCert domains this includes fields not written by any current API code path — 'anagrafica_sincronizzata', 'pec_attive', 'pec_totali', 'sottotipo_cliente', 'telefono' (all documented below) — plus Italian-language 'dns'/'config'/'certif' values (e.g. 'CORRETTO'/'ERRATO') written by the async cron (CronAutorinnovo), which reads them from InfoCert's XML interface (InfocertDominiClient::getStatoDominio) — DominioInfoCert::sincronizza only updates stato_fornitore — as opposed to the English 'OK'/'KO' produced by the REST integration used at initial activation. |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/dominio/%7Bid%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "data": {
- "dominio": "pec.esempiosrl.it",
- "fornitore": "infocert",
- "stato_fornitore": "OK",
- "dns": "CORRETTO",
- "config": "CORRETTO",
- "certif": "CORRETTO",
- "tipo_dominio": "esterno",
- "stato": "evaso",
- "numero_pec": 0,
- "data_scadenza": "09/04/2027",
- "data_certificazione": "09/04/2013",
- "timestamp": {
- "registrazione": 1365465600,
- "certificazione": 1365465600,
- "scadenza": 1807228800,
- "ultima_modifica": 1770023884
}, - "callback": {
- "method": "JSON",
- "field": null,
- "retry": 2,
- "custom": { },
- "headers": { }
}, - "autorinnovo": false,
- "anagrafica_sincronizzata": true,
- "cap_titolare": "00100",
- "cellulare": "3491234567",
- "cf_piva_titolare": "01234567890",
- "codice_fiscale_richiedente": "RSSMRA80A01H501U",
- "cognome_richiedente": "Rossi",
- "comune_titolare": "Roma",
- "data_nascita_richiedente": "01/01/1980",
- "denominazione_titolare": "Esempio S.r.l.",
- "indirizzo_titolare": "Via Roma 1",
- "nazione_nascita_richiedente": "IT",
- "nazione_titolare": "Italiana",
- "nome_richiedente": "Mario",
- "pec_attive": 0,
- "pec_totali": 1,
- "provincia_titolare": "RM",
- "sesso_richiedente": "M",
- "sottotipo_cliente": "SI",
- "telefono": "0612345678",
- "tipo_cliente": "IM",
- "id": "65f1a2b3c4d5e6f7a8b9c0d1"
}
}Updates a certified domain. Accepts activation documents (Namirial only — InfoCert returns error 730) and/or renews or reactivates the domain for a given number of years (1–10). At least one of 'documenti' or 'anni' must be provided. If the domain is in 'revocato' state and 'anni' is provided, the domain is reactivated.
| id required | string Default: "<string>" Example: 69806bcce09fb76c6b0fef0b The domain ID |
Array of strings or objects <= 2 items [ items ] Activation documents. Namirial only — triggers document submission via certified PEC email to the provider. If the domain is currently in 'revocato' state, submitted documents are silently discarded and the domain is reactivated instead (see 'anni' behavior below). | |
| anni | integer [ 1 .. 10 ] Default: "<integer>" Number of years to renew or reactivate the domain (1–10). If the domain is in 'revocato' state, this reactivates it (defaults to 1 year if omitted); otherwise it renews the current expiration. |
object (Dominio) GET/POST/PATCH/DELETE all return the domain record as stored in MongoDB pretty much as-is (only a handful of fields are stripped, see individual endpoints). On some InfoCert domains this includes fields not written by any current API code path — 'anagrafica_sincronizzata', 'pec_attive', 'pec_totali', 'sottotipo_cliente', 'telefono' (all documented below) — plus Italian-language 'dns'/'config'/'certif' values (e.g. 'CORRETTO'/'ERRATO') written by the async cron (CronAutorinnovo), which reads them from InfoCert's XML interface (InfocertDominiClient::getStatoDominio) — DominioInfoCert::sincronizza only updates stato_fornitore — as opposed to the English 'OK'/'KO' produced by the REST integration used at initial activation. |
{- "anni": 1
}{- "data": {
- "id": "69806bcce09fb76c6b0fef0b",
- "dominio": "testdominio.legalmail.it",
- "fornitore": "infocert",
- "stato_fornitore": "OK",
- "dns": "OK",
- "config": "OK",
- "certif": "missing",
- "note": "string",
- "record_mx": "string",
- "tipo_dominio": "interno",
- "stato": "registrato",
- "data_scadenza": "02/02/2027",
- "data_certificazione": "02/02/2026",
- "timestamp": {
- "registrazione": 0,
- "ultima_modifica": 0,
- "evasione": 0,
- "certificazione": 0,
- "scadenza": 0,
- "revoca": 0
}, - "id_ordine": "62558f",
- "autorinnovo": false,
- "anni": 1,
- "numero_pec": 1,
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
}, - "custom": {
- "my_custom_id": "123456789"
}
}, - "tipo_cliente": "IM",
- "nome_richiedente": "string",
- "cognome_richiedente": "string",
- "codice_fiscale_richiedente": "string",
- "email": "string",
- "cellulare": "string",
- "indirizzo_titolare": "string",
- "comune_titolare": "string",
- "cap_titolare": "string",
- "provincia_titolare": "string",
- "nazione_titolare": "string",
- "denominazione_titolare": "string",
- "cf_piva_titolare": "string",
- "data_nascita_richiedente": "string",
- "sesso_richiedente": "M",
- "comune_nascita_richiedente": "string",
- "provincia_nascita_richiedente": "string",
- "nazione_nascita_richiedente": "string",
- "documenti_attivazione": [
- "string",
- "string"
], - "tipo_documento": "CARTA_D_IDENTITA",
- "numero_documento": "string",
- "data_scadenza_documento": "string",
- "documento_rilasciato_da": "string",
- "data_rilascio_documento": "string",
- "sottotipo_cliente": "string",
- "telefono": "string",
- "anagrafica_sincronizzata": true,
- "pec_attive": 0,
- "pec_totali": 0
}
}Revokes the domain and its associated PEC mailboxes. Mailboxes already in 'evasa' state are revoked through the provider; the mailbox callback is sent only for InfoCert mailboxes. Mailboxes not yet active (any other state except 'revocata') are soft-deleted directly to 'revocata' without contacting the provider. If the provider refuses to revoke a mailbox, the others are still processed and the refused ones are listed in the notification to the operators. The domain itself is set to 'revocato' in our DB, but it is revoked at the provider manually: the operators receive a notification to do it in the provider's panel. The domain callback, if configured, is sent.
| id required | string Default: "<string>" Example: 69806bcce09fb76c6b0fef0b The domain ID to revoke |
| success | boolean |
| message | string |
object (Dominio) GET/POST/PATCH/DELETE all return the domain record as stored in MongoDB pretty much as-is (only a handful of fields are stripped, see individual endpoints). On some InfoCert domains this includes fields not written by any current API code path — 'anagrafica_sincronizzata', 'pec_attive', 'pec_totali', 'sottotipo_cliente', 'telefono' (all documented below) — plus Italian-language 'dns'/'config'/'certif' values (e.g. 'CORRETTO'/'ERRATO') written by the async cron (CronAutorinnovo), which reads them from InfoCert's XML interface (InfocertDominiClient::getStatoDominio) — DominioInfoCert::sincronizza only updates stato_fornitore — as opposed to the English 'OK'/'KO' produced by the REST integration used at initial activation. |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/dominio/%7Bid%7D"); struct curl_slist *headers = NULL; 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": "",
- "data": {
- "dominio": "pec.testgestionale.com",
- "fornitore": "infocert",
- "stato_fornitore": "OK",
- "dns": "OK",
- "config": "OK",
- "certif": "OK",
- "tipo_dominio": "esterno",
- "stato": "revocato",
- "data_scadenza": "13/03/2054",
- "data_certificazione": "13/03/2026",
- "timestamp": {
- "registrazione": 1773401265,
- "scadenza": 2657014065,
- "ultima_modifica": 1774273311,
- "certificazione": 1773401405,
- "revoca": 1774273558
}, - "autorinnovo": false,
- "anni": 1,
- "numero_pec": 3,
- "id_ordine": "1a54cf",
- "id": "69b3f4b1d0747173230c4448"
}
}Renews the domain for the specified number of years (1–3). If the domain is in 'revocato' state, reactivates it and restores associated non-expired PEC boxes (also at the provider). The new expiration date is added to the current one if the domain has not expired yet, otherwise it starts from today.
| id required | string Default: "<string>" Example: 69806bcce09fb76c6b0fef0b The domain ID |
| anni | integer [ 1 .. 3 ] Default: 1 Number of years for renewal or reactivation (1–3). Default 1. |
object (Dominio) GET/POST/PATCH/DELETE all return the domain record as stored in MongoDB pretty much as-is (only a handful of fields are stripped, see individual endpoints). On some InfoCert domains this includes fields not written by any current API code path — 'anagrafica_sincronizzata', 'pec_attive', 'pec_totali', 'sottotipo_cliente', 'telefono' (all documented below) — plus Italian-language 'dns'/'config'/'certif' values (e.g. 'CORRETTO'/'ERRATO') written by the async cron (CronAutorinnovo), which reads them from InfoCert's XML interface (InfocertDominiClient::getStatoDominio) — DominioInfoCert::sincronizza only updates stato_fornitore — as opposed to the English 'OK'/'KO' produced by the REST integration used at initial activation. |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/dominio/%7Bid%7D/rinnovo?anni=SOME_INTEGER_VALUE"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "data": {
- "dominio": "pec.testgestionale.com",
- "fornitore": "infocert",
- "stato_fornitore": "OK",
- "dns": "OK",
- "config": "OK",
- "certif": "OK",
- "tipo_dominio": "esterno",
- "stato": "evaso",
- "data_scadenza": "13/03/2054",
- "data_certificazione": "13/03/2026",
- "timestamp": {
- "registrazione": 1773401265,
- "scadenza": 2657014065,
- "ultima_modifica": 1774273311,
- "certificazione": 1773401405
}, - "autorinnovo": false,
- "anni": 1,
- "numero_pec": 3,
- "id_ordine": "1a54cf",
- "id": "69b3f4b1d0747173230c4448"
}
}This method allows you to check if a domain is eligible for sending or receiving a pec
| dominio required | string Default: "<string>" Example: legalmail.it Domain |
| data | Array of strings Always an empty array in the current implementation |
| success | boolean Operation success (true/false). |
| message | string error message |
| error | integer error code |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/domini_pec/%7Bdominio%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "data": [ ],
- "success": true,
- "message": "legalmail.it found!",
- "error": null
}Methods that allow you to download the forms necessary for the management of certified e-mail boxes
Downloads the PDF activation form for a certified domain. Available only for Namirial domains. Once completed and signed, upload it using PATCH /dominio/{id} with the 'documenti' field.
| id required | string Default: "<string>" Example: 69806bcce09fb76c6b0fef0b The domain ID |
| Content-Disposition | string Example: "inline;filename=modulo_attivazione_studiorossi.it.pdf" Namirial only — filename is built dynamically from the domain name; disposition is 'inline', not 'attachment' |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/dominio/%7Bid%7D/modulo_attivazione"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "success": false,
- "message": "modulo_attivazione non supportato per questo fornitore",
- "error": 731,
- "data": null
}This method allows you to directly download the activation form of a certified e-mail. Once compiled and signed it will be passed in the form of a base 64 encoded string using the PATCH/pec/{id}/attivazione method together with an identity document.
| id required | string Default: "<string>" Example: 5f7b2e323a716857774a4373 request id |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/pec/%7Bid%7D/modulo_attivazione"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "success": false,
- "message": "Wrong id",
- "error": 201,
- "data": null
}This method allows you to directly download the storage activation form for a certified e-mail. Once compiled and signed, it must be passed as a base64-encoded string via PATCH /pec/{id}/conservazione.
| id required | string Default: "<string>" Example: 5f7b2e323a716857774a4373 request id |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/pec/%7Bid%7D/modulo_conservazione"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "success": false,
- "message": "Wrong id",
- "error": 201,
- "data": null
}This method allows you to download the pec communication form to the business register. Once digitally signed in p7m format it will be passed in the form of a base 64 encoded string using the PATCH/comunica_pec/{id} method.
| id required | string Default: "<string>" Example: 5f7b2e323a716857774a4373 request id |
| Content-Disposition | string Example: "attachment; filename=\"5f7b2e323a716857774a4373_procura_registro_imprese.pdf\"" |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://pec.openapi.it/comunica_pec/%7Bid%7D/procura_registro_imprese"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);