Run with Postman

Pec (Posta Elettronica Certificata)

Web service that allows you to activate a certified e-mail.

Pec

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

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>"
Example: prova_pec@legalmail.it

Email box

Responses

Response Schema: application/json
object
success
boolean
message
string
error
integer

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:

Responses

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

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

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

mailbox name

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"

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"

customer subtype

sottotipo_cliente_altro
string
Default: "<string>"

customer subtype, other

nome_richiedente
required
string
Default: "<string>"

customer name

cognome_richiedente
required
string
Default: "<string>"

customer surname

email
required
string
Default: "<string>"

customer email

telefono
required
string
Default: "<string>"

customer telephone

cellulare
string
Default: "<string>"

customer mobile phone

codice_fiscale_richiedente
required
string
Default: "<string>"

customer fiscal code

data_nascita_richiedente
required
string
Default: "<string>"

customer date of birth (accepted format: dd/mm/yyyy)

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

gender

nazione_nascita_richiedente
required
string
Default: "<string>"

customer country code

comune_nascita_richiedente
string
Default: "<string>"

customer city

provincia_nascita_richiedente
string
Default: "<string>"

customer province code

denominazione_titolare
string
Default: "<string>"

holder denomination

cf_piva_titolare
string
Default: "<string>"

holder vat number

indirizzo_titolare
required
string
Default: "<string>"

holder address

comune_titolare
required
string
Default: "<string>"

holder city

cap_titolare
required
string
Default: "<string>"

holder postal code

nazione_titolare
required
string
Default: "<string>"

holder country code

provincia_titolare
required
string
Default: "<string>"

holder province code

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 identity document