Run with Postman

Pec (Posta Elettronica Certificata) (1.0.0)

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.

Pec

Methods that allow you to register, activate and modify a certified e-mail

Domain check

This method allows you to check if a domain is eligible for sending or receiving a pec

Authorizations:
path Parameters
dominio
required
string
Default: "<string>"
Example: legalmail.it

Domain

Responses

Response Schema: application/json
data
Array of strings
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

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);

Response samples

Content type
application/json
{
  • "data": [ ],
  • "success": true,
  • "message": "legalmail.it found!",
  • "error": null
}

Availability of a certified e-mail box

This method shows you the availability of a certified e-mail box

Authorizations:
path Parameters
pec
required
string
Default: "<string>"

Email box

Responses

Response Schema: application/json
object
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

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);

Response samples

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

List of your certified e-mail boxes

This method shows you the list of certified e-mail boxes that belong to your account

Authorizations:
query Parameters
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.

Responses

Response Schema: application/json
Array of objects (Caselle) [ items ]
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

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");

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);

Response samples

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

Register a new certified mailbox

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:

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).

Authorizations:
Request Body schema: application/json
casella_pec
required
string
Default: "<string>"

the certified email address (PEC)

tipo_casella
required
string
Default: "<string>"
Enum: "STANDARD" "BRONZE" "SILVER" "GOLD" "DOMICILIODIGITALE" "PECMASSIVA"

type of mailbox

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

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
required
string
Default: "<string>"

phone number of the applicant

cellulare
string
Default: "<string>"

mobile phone number of the applicant

codice_fiscale_richiedente
required
string
Default: "<string>"

fiscal code of the applicant

data_nascita_richiedente
required
string
Default: "<string>"

date of birth of the applicant

sesso_richiedente
required
string
Default: "<string>"
Enum: "M" "F"

gender of the applicant

nazione_nascita_richiedente
required
string
Default: "<string>"

country of birth of the applicant

comune_nascita_richiedente
string
Default: "<string>"

city of birth of the applicant

provincia_nascita_richiedente
string
Default: "<string>"

province of birth of the applicant

denominazione_titolare
string
Default: "<string>"

name of the mailbox holder

cf_piva_titolare
string
Default: "<string>"

fiscal code or VAT number of the mailbox holder

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
required
string
Default: "<string>"

province of the mailbox holder

object (Callback)
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

Responses

Response Schema: application/json
object (Casella)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

Content type
application/json
{
  • "casella_pec": "[email protected]",
  • "tipo_casella": "bronze",
  • "tipo_cliente": "PV",
  • "sottotipo_cliente": "",
  • "sottotipo_cliente_altro": "",
  • "nome_richiedente": "mario",
  • "cognome_richiedente": "rossi",
  • "email": "[email protected]",
  • "telefono": "0548798569",
  • "codice_fiscale_richiedente": "RSSXXXXXXXX56E",
  • "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",
  • "callback": {}
}

Response samples

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

Specific certified e-mail address

This method shows you the specific certified e-mail address related to the id

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 6040e4613a716838dc4eee0e

Pec id

Responses

Response Schema: application/json
object (Casella)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

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);

Response samples

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

Pec revocation

This method allows you to revoke the specific certified e-mail address related to the id

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 6040e4613a716838dc4eee0e

Pec id

Responses

Response Schema: application/json
object (Casella)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

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);

Response samples

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

Certified e-mail activation

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 it is necessary to create a single document comprising the signed activation form and the identity document.

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 6045fdee3a716847a978a471

Pec id

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

Responses

Response Schema: application/json
object (Casella)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

Content type
application/json
{
  • "documenti": [
    ]
}

Response samples

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

Change mailbox space

This method allows you to change the space of a certified e-mail. You can change the disk space('spazio_disco'), the security archive space('spazio_storico') and the standard storage space('spazio_conservazione'). Only a space upgrade is allowed. Action not allowed for these two types of boxes: DOMICILIODIGITALE, PECMASSIVA.

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 6045fdee3a716847a978a471

Pec id

Request Body schema: application/json
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.

Responses

Response Schema: application/json
object (Casella)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

Content type
application/json
{
  • "spazio_disco": "3072",
  • "spazio_storico": "+1024",
  • "spazio_conservazione": 1536
}

Response samples

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

Activation of conservation according to law

This method allows you to activate the standard storage service in your certified e-mail. Action not allowed for these two types of boxes: DOMICILIODIGITALE, PECMASSIVA.

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 6045fdee3a716847a978a471

Pec id

Request Body schema: application/json
string or integer

If this parameter is not passed it is set to 512 by default

required
string or Array of strings

Responses

Response Schema: application/json
object (Casella)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

Content type
application/json
{
  • "spazio_conservazione": 1024,
  • "documenti": "JVBERi0xLjUKJeLjz9MKNyAwIG9iago8PAovVHlwZSAvRm9udERlc2NyaXB0b3IKL0ZvbnROYW1lIC9UaW1lcyMyME5ldyMyMFJvbWFuCi9GbGFncyAzMgovSXRhbGljQW5nbGUgMAovQXNjZW50IDg5MQovRGVzY2VudCAtMjE2Ci9DYXBIZWlnaHQgNjkzCi9BdmdXaWR0aCA0MDEKL01heFdpZHRoIDI2MTQKL0ZvbnRXZWlnaHQgNDAwCi9YSGVpZ2h0IDI1MAovTGVhZGluZyA0MgovU3RlbVYgNDAKL0ZvbnRCQm94IFstNTY4IC0yMTYgMjA0NiA2OTNdCj4+CmVuZG9iago4IDAgb2JqClsyNTAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAyNTAgMCA1MDAgMCA1MDAgMCAwIDUwMCA1MDAgNTAwIDUwMCA1MDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgNDQ0IDAgNDQ0IDAgMCAwIDAgMCAyNzggMCAwIDAgMCA1MDAgNTAwIDUwMCAwIDMzMyAzODkgMjc4IDAgNTAwXQplbmRvYmoKNiAwIG9iago8PAovVHlwZSAvRm9udAovU3VidHlwZSAvVHJ1ZVR5cGUKL05hbWUgL0YxCi9CYXNlRm9udCAvVGltZXMjMjBOZXcjMjBSb21hbgovRW5jb2RpbmcgL1dpbkFuc2lFbmNvZGluZwovRm9udERlc2NyaXB0b3IgNyAwIFIKL0ZpcnN0Q2hhciAzMgovTGFzdENoYXIgMTE4Ci9XaWR0aHMgOCAwIFIKPj4KZW5kb2JqCjkgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovQk0gL05vcm1hbAovY2EgMQo+PgplbmRvYmoKMTAgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovQk0gL05vcm1hbAovQ0EgMQo+PgplbmRvYmoKMTEgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZ"
}

Response samples

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

Change box type

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.

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 6045fdee3a716847a978a471

Pec id

Request Body schema: application/json
tipo_casella
string
Default: "<string>"
Enum: "STANDARD" "BRONZE" "SILVER" "GOLD"

type of mailbox

Responses

Response Schema: application/json
object (Casella)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

Content type
application/json
{
  • "tipo_casella": "GOLD"
}

Response samples

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

Renewal of certified e-mail

This method allows you to renew for one year or re-activate the certified e-mail identified by the id

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 6040e4613a716838dc4eee0e

Pec id

query Parameters
anni
integer
Default: "<integer>"
Example: anni=2

Number of years for which you want to renew the pec box. If not passed it is 1 by default

Responses

Response Schema: application/json
object (Casella)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

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);

Response samples

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

Add user

This method allows you to add a user who can use an existing pec box. It can only be activated on STANDARD, BRONZE, SILVER, and GOLD mailboxes.

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 6040e4613a716838dc4eee0e

Pec id

Request Body schema: application/json
nome
required
string
Default: "<string>"

first name

cognome
required
string
Default: "<string>"

last name

descrizione
required
string
Default: "<string>"

description

email_gestione_password
required
string
Default: "<string>"

email of the user

Responses

Response Schema: application/json
object (Casella)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

Content type
application/json
{
  • "nome": "luca",
  • "cognome": "bianchi",
  • "descrizione": "prima utenza",
  • "email_gestione_password": "[email protected]"
}

Response samples

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

Comunica Pec

Methods that allow you to communicate a certified e-mail to the business register

List of your communications

This method shows you all the certified e-mail communications to the business register started

Authorizations:

Responses

Response Schema: application/json
Array of objects (RichiesteComunicazionePec) [ items ]
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

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);

Response samples

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

Communicate a certified e-mail

This method allows you to communicate a certified e-mail to the business register

Authorizations:
Request Body schema: application/json
casella_pec
required
string
Default: "<string>"

the certified email address (PEC)

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)

Responses

Response Schema: application/json
object (RichiestaComunicazionePec)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

Content type
application/json
{
  • "casella_pec": "[email protected]",
  • "cf": "RSSMRA80A01L117D",
  • "nome": "mario",
  • "cognome": "rossi",
  • "qualifica": "LEGALE_RAPPRESENTANTE",
  • "email": "[email protected]",
  • "cellulare": "34xxxxxx18",
  • "ragione_sociale": "azienda test",
  • "cf_piva": "12345678910",
  • "comune": "roma",
  • "provincia": "RM"
}

Response samples

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

Specific request for communication pec

This method returns you the specific request marked with the id

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 60ad149c3a7168084f1d2b68

Comunica Pec id

Responses

Response Schema: application/json
object (RichiestaComunicazionePec)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

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);

Response samples

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

Upload the documents

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 in p7m format form that you can download using the method GET/comunica_pec/{id}/procura_registro_imprese.

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 60dc8da86c8b04624536bbb2

Comunica Pec id

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

Responses

Response Schema: application/json
object (RichiestaComunicazionePec)
success
boolean

Operation success (true/false).

message
string

error message

error
integer

error code

Request samples

Content type
application/json
{
  • "documenti": "JVBERi0xLjUKJeLjz9MKNyAwIG9iago8PAovVHlwZSAvRm9udERlc2NyaXB0b3IKL0ZvbnROYW1lIC9UaW1lcyMyME5ldyMyMFJvbWFuCi9GbGFncyAzMgovSXRhbGljQW5nbGUgMAovQXNjZW50IDg5MQovRGVzY2VudCAtMjE2Ci9DYXBIZWlnaHQgNjkzCi9BdmdXaWR0aCA0MDEKL01heFdpZHRoIDI2MTQKL0ZvbnRXZWlnaHQgNDAwCi9YSGVpZ2h0IDI1MAovTGVhZGluZyA0MgovU3RlbVYgNDAKL0ZvbnRCQm94IFstNTY4IC0yMTYgMjA0NiA2OTNdCj4+CmVuZG9iago4IDAgb2JqClsyNTAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAyNTAgMCA1MDAgMCA1MDAgMCAwIDUwMCA1MDAgNTAwIDUwMCA1MDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgNDQ0IDAgNDQ0IDAgMCAwIDAgMCAyNzggMCAwIDAgMCA1MDAgNTAwIDUwMCAwIDMzMyAzODkgMjc4IDAgNTAwXQplbmRvYmoKNiAwIG9iago8PAovVHlwZSAvRm9udAovU3VidHlwZSAvVHJ1ZVR5cGUKL05hbWUgL0YxCi9CYXNlRm9udCAvVGltZXMjMjBOZXcjMjBSb21hbgovRW5jb2RpbmcgL1dpbkFuc2lFbmNvZGluZwovRm9udERlc2NyaXB0b3IgNyAwIFIKL0ZpcnN0Q2hhciAzMgovTGFzdENoYXIgMTE4Ci9XaWR0aHMgOCAwIFIKPj4KZW5kb2JqCjkgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovQk0gL05vcm1hbAovY2EgMQo+PgplbmRvYmoKMTAgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovQk0gL05vcm1hbAovQ0EgMQo+PgplbmRvYmoKMTEgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZ"
}

Response samples

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

Domini

Methods that allow you to activate and modify a certified domain

List all domains associated with the account

Authorizations:

Responses

Response Schema: application/json
Array of objects (Dominio) <= 2 items [ items ]

Request samples

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);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Activate a new certified domain

Authorizations:
Request Body schema: application/json
dominio
required
string
Default: "<string>"

The domain name to activate (e.g. example.com)

object (Callback)
fornitore
required
string
Default: "<string>"
Enum: "infocert" "namirial"

The service provider

anni
integer
Default: 1
Enum: 1 2 3 4 5 6 7 8 9 10

Number of years for which the domain is purchased

numero_pec
integer
Default: 1

Number of PEC boxes purchased for the domain

Responses

Response Schema: application/json
object (Dominio)

Request samples

Content type
application/json
{
  • "dominio": "testdominio.legalmail.it",
  • "callback": {},
  • "fornitore": "infocert",
  • "anni": 1,
  • "numero_pec": 1
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get details of a specific domain

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 69806bcce09fb76c6b0fef0b

The domain ID

Responses

Response Schema: application/json
object (Dominio)

Request samples

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);

Response samples

Content type
application/json
{
  • "data": {
    }
}

Revoke a certified domain

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 69806bcce09fb76c6b0fef0b

The domain ID to revoke

Responses

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

Request samples

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);

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Domain and associated boxes revoked",
  • "data": {
    }
}

Renew a certified domain

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 69806bcce09fb76c6b0fef0b

The domain ID

query Parameters
anni
integer
Default: 1
Enum: 1 2 3 4 5 6 7 8 9 10

Number of years for renewal. Default 1.

Responses

Response Schema: application/json
object (Dominio)

Request samples

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);

Response samples

Content type
application/json
{
  • "data": {
    }
}

Modulistica

Methods that allow you to download the forms necessary for the management of certified e-mail boxes

Download the activation form

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.

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 5f7b2e323a716857774a4373

request id

Responses

Response Schema: application/pdf
string <binary>

Request samples

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);

Response samples

Content type
application/json
{
  • "success": false,
  • "message": "Wrong id",
  • "error": 201,
  • "data": null
}

Download the activation form

This method allows you to directly download the storage activation form for 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}/conservazione method together with an identity document.

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 5f7b2e323a716857774a4373

request id

Responses

Response Schema: application/pdf
string <binary>

Request samples

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);

Response samples

Content type
application/json
{
  • "success": false,
  • "message": "Wrong id",
  • "error": 201,
  • "data": null
}

Download the power of attorney

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.

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 5f7b2e323a716857774a4373

request id

Responses

Response Schema: application/pdf
string <binary>

Request samples

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);

Response samples

Content type
application/json
{
  • "success": false,
  • "message": "Wrong id",
  • "error": 201,
  • "data": null
}