Italian Postal Service

All your mailings via API and in real time

Automate the sending of documents, registered mail, telegrams, advertisements with Post Office.

All the knowledge you need

Here you can find some advice to consider to approach this API. If you prefer, we provide code samples, OAS3 documentation, the ability to try the API live via the Swagger UI or import the entire collection into Postman. We also offer a Sandbox environment where you can experiment with all kinds of requests completely free of charge.

Useful tips to start with Italian Postal Service

Get the token in the appropriate section before you start.

Use the the online tool or generate it via API. Set the expire date, a usefull name and now add a bunch of scopes to limit the possible actions your token can do.

Ufficio Postale (1.0.0)

This web service allows the delivery of postal products like Raccomandate, Telegrammi, Posta Prioritaria through Poste Italiane

  1. Create a new mail with a POST request
  2. Check the prices and confirm it with a PATCH, or use autoconfirm: true
  3. Receive the status updates of your mail by providing a callback url

Note: There are some limitations regarding the size of a PDF document. Please read the 'document' field in the description of the endpoint that you want to use.

Error handling

When a sending error occurs, the response will include a message and a data.wrong_fields: []: each element of wrong_fields is a string which indicates where the error was generated from. This makes it very easy to integrate in your front-end form, where you can highlight the wrong entries

Testing

When using the Sandbox environment, you will receive update callbacks a short time after creating the request with placeholder content. It is also possible, for some products, to force the execution of the callback in the sandbox environment.

Ufficio Postale

Get pricings

Returns a list of prices for various kinds of services

Authorizations:
bearerAuth

Responses

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

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/pricing/");

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

OK

{
  • "data": [
    ],
  • "success": true,
  • "message": "",
  • "error": null
}

List of addresses

Authorizations:
bearerAuth
query Parameters
cap
string
Example: cap=05100
comune
string
Example: comune=terni
dug
string
Example: dug=via

Responses

Response Schema: application/json
data
Array of strings
success
boolean
message
string
error
any

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/indirizzi/?cap=SOME_STRING_VALUE&comune=SOME_STRING_VALUE&dug=SOME_STRING_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": [
    ],
  • "success": true,
  • "message": "string",
  • "error": null
}

List of all available dugs

(denomiazioni urbanistiche generiche)

Authorizations:
bearerAuth

Responses

Response Schema: application/json
Array of objects
success
boolean
message
string
error
any

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/dug/");

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": [
    ],
  • "message": "1 Risultato",
  • "success": true,
  • "error": null
}

Track your product

Authorizations:
bearerAuth
path Parameters
id
required
string

Responses

Response Schema: application/json
Array of objects
success
boolean
message
string
error
any

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/tracking/%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": [
    ],
  • "message": "1 Risultati",
  • "success": true,
  • "error": null
}

Get information about a postal code Deprecated

Authorizations:
bearerAuth
path Parameters
code
required
string
Example: 05100

Responses

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

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/comuni/05100");

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

OK

{
  • "data": [
    ],
  • "message": "1 Risultati",
  • "success": true,
  • "error": null
}

Telegrammi

Get information about a telegram

Authorizations:
bearerAuth
path Parameters
id
required
string
query Parameters
ricevuta
string
Example: ricevuta=1

If the option was set, returns a PDF file as the received

state
string
Example: state=NEW

If the option has been set, it returns a specifc schema with state equal to the one requested

Responses

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

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/telegrammi/%7Bid%7D?ricevuta=1&state=NEW");

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": {
    },
  • "message": "",
  • "success": true,
  • "error": null
}

Confirm send of a telegram

Confirm sending a telegram that was created with "autoconfirm = false"

Authorizations:
bearerAuth
path Parameters
id
required
string
Request Body schema: application/json
confirmed
boolean

Responses

Request samples

Content type
application/json
{
  • "confirmed": true
}

Response samples

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

List your telegrams

Authorizations:
bearerAuth

Responses

Response Schema: application/json
Array of objects
success
boolean
message
string
error
any

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/telegrammi/");

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": [
    ],
  • "message": "1 Risultati",
  • "success": true,
  • "error": null
}

Send a telegram. You should provide information ab

Send a telegram. You should provide information about the sender and the receiver(s) in the post body. Additionally, the "autoconfirm" parameter can be set to false to save the telegram for a later confirmation with a PATCH request, while you do custom logic with the response.

Authorizations:
bearerAuth
Request Body schema: application/json
object
object
Array of objects (Recipient)
Array of strings or string (documento)

The document can either be a string or an array of strings in plain text.
The strings can either be:

  • Plain text
  • Formatted in HTML, with style, header tags etc..
  • An URL pointing to either a webpage, a PDF or an image file (urls must start with http). The content is deduced from the "Content-Type" header
  • A base64-encoded PDF file. Encoded strings are deducted by the base64 content header data:application/pdf;base64,: basically, in order to mark a string as a base64-encoded content, you should prepend the aforementioned string to the output.
    The request will return an error if the decoding process fails on the server
The service analyses the "documento" (document) field, merges all the strings/document/images in different pages, compresses it slightly (if possible) and generates a single PDF file.

The maximum size for a PDF document, after our compression, is 5 MB for every products execept Posta 4 PRO, Posta Massiva and Raccomandata Smart (these 3 products accept up to 15 MB maximum).

The maximum number of pages is currently 50, or 100 is using the fronteretro option.

Responses

Response Schema: application/json
object
object
Array of objects
Array of strings or string (documento)

The document can either be a string or an array of strings in plain text.
The strings can either be:

  • Plain text
  • Formatted in HTML, with style, header tags etc..
  • An URL pointing to either a webpage, a PDF or an image file (urls must start with http). The content is deduced from the "Content-Type" header
  • A base64-encoded PDF file. Encoded strings are deducted by the base64 content header data:application/pdf;base64,: basically, in order to mark a string as a base64-encoded content, you should prepend the aforementioned string to the output.
    The request will return an error if the decoding process fails on the server
The service analyses the "documento" (document) field, merges all the strings/document/images in different pages, compresses it slightly (if possible) and generates a single PDF file.

The maximum size for a PDF document, after our compression, is 5 MB for every products execept Posta 4 PRO, Posta Massiva and Raccomandata Smart (these 3 products accept up to 15 MB maximum).

The maximum number of pages is currently 50, or 100 is using the fronteretro option.

object (documento_validato)

The output of the document generation process.

Callbacks

Request samples

Content type
application/json
{
  • "mittente": {
    },
  • "destinatari": [
    ],
  • "documento": [
    ],
  • "opzioni": {
    }
}

Response samples

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

Callback payload samples

Callback
POST: {$request.body#/opzioni/callback_url}
Content type
application/json
{
  • "mittente": {
    },
  • "destinatari": {
    },
  • "documento": [
    ],
  • "opzioni": {
    },
  • "prodotto": "string",
  • "creation_timestamp": 0,
  • "update_timestamp": 0,
  • "username": "string",
  • "confirmed": true,
  • "state": "string",
  • "documento_validato": {
    },
  • "pricing": {
    },
  • "confirmed_timestamp": 0,
  • "id": "string"
}

Raccomandate

This product offers a tracking code

List your Raccomandate

Authorizations:
bearerAuth

Responses

Response Schema: application/json
Array of objects
success
boolean
message
string
error
any

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/raccomandate/");

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": [
    ],
  • "message": "1 Risultati",
  • "success": true,
  • "error": null
}

Send a Raccomandata. You should provide informatio

Send a Raccomandata. You should provide information about the sender and the receiver(s) in the post body. Additionally, the "autoconfirm" parameter can be set to false to save the Raccomandata for a later confirmation with a PATCH request, while you do custom logic with the response. Check the NumeroRaccomandata field in the recipient object if you need the tracking number

Authorizations:
bearerAuth
Request Body schema: application/json
object
object
Array of Recipient (object) or Casella postale (object) (Recipient or Casella postale)
Array of strings or string (documento)

The document can either be a string or an array of strings in plain text.
The strings can either be:

  • Plain text
  • Formatted in HTML, with style, header tags etc..
  • An URL pointing to either a webpage, a PDF or an image file (urls must start with http). The content is deduced from the "Content-Type" header
  • A base64-encoded PDF file. Encoded strings are deducted by the base64 content header data:application/pdf;base64,: basically, in order to mark a string as a base64-encoded content, you should prepend the aforementioned string to the output.
    The request will return an error if the decoding process fails on the server
The service analyses the "documento" (document) field, merges all the strings/document/images in different pages, compresses it slightly (if possible) and generates a single PDF file.

The maximum size for a PDF document, after our compression, is 5 MB for every products execept Posta 4 PRO, Posta Massiva and Raccomandata Smart (these 3 products accept up to 15 MB maximum).

The maximum number of pages is currently 50, or 100 is using the fronteretro option.

Responses

Response Schema: application/json
object
object
Array of objects
Array of strings or string (documento)

The document can either be a string or an array of strings in plain text.
The strings can either be:

  • Plain text
  • Formatted in HTML, with style, header tags etc..
  • An URL pointing to either a webpage, a PDF or an image file (urls must start with http). The content is deduced from the "Content-Type" header
  • A base64-encoded PDF file. Encoded strings are deducted by the base64 content header data:application/pdf;base64,: basically, in order to mark a string as a base64-encoded content, you should prepend the aforementioned string to the output.
    The request will return an error if the decoding process fails on the server
The service analyses the "documento" (document) field, merges all the strings/document/images in different pages, compresses it slightly (if possible) and generates a single PDF file.

The maximum size for a PDF document, after our compression, is 5 MB for every products execept Posta 4 PRO, Posta Massiva and Raccomandata Smart (these 3 products accept up to 15 MB maximum).

The maximum number of pages is currently 50, or 100 is using the fronteretro option.

object (documento_validato)

The output of the document generation process.

Callbacks

Request samples

Content type
application/json
{
  • "mittente": {
    },
  • "destinatari": [
    ],
  • "documento": [
    ],
  • "opzioni": {
    }
}

Response samples

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

Callback payload samples

Callback
POST: {$request.body#/opzioni/callback_url}
Content type
application/json
{
  • "mittente": {
    },
  • "destinatari": {
    },
  • "documento": [
    ],
  • "opzioni": {
    },
  • "prodotto": "string",
  • "creation_timestamp": 0,
  • "update_timestamp": 0,
  • "username": "string",
  • "confirmed": true,
  • "state": "string",
  • "documento_validato": {
    },
  • "pricing": {
    },
  • "confirmed_timestamp": 0,
  • "id": "string"
}

Get information about a Raccomandata

Check the NumeroRaccomandata field in the recipient object if you need the tracking number

Authorizations:
bearerAuth
path Parameters
id
required
string
query Parameters
ricevuta
string
Example: ricevuta=1

If the option was set, returns a PDF file as the received

state
string
Example: state=NEW

If the option has been set, it returns a specifc schema with state equal to the one requested

callback
string
Example: callback=<empty string>

Simulates the progress of the shipment status: every time that this endpoint is called, your request progresses the the next shipping status.
If specified in the request, you will receive callback updates.
Please note that this option is avaialble ONLY for the sandbox environment

Responses

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

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/raccomandate/%7Bid%7D?ricevuta=1&state=NEW&callback=%3Cempty%20string%3E");

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": {
    },
  • "message": "",
  • "success": true,
  • "error": null
}

Confirm sending a Raccomandata that was created wi

Confirm sending a Raccomandata that was created with "autoconfirm = false"

Authorizations:
bearerAuth
path Parameters
id
required
string
Request Body schema: application/json
confirmed
boolean

Responses

Request samples

Content type
application/json
{
  • "confirmed": true
}

Response samples

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

Posta Prioritaria

This product offers a code to track status updates

List your requests

Authorizations:
bearerAuth

Responses

Response Schema: application/json
Array of objects
success
boolean
message
string
error
any

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/prioritarie/");

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": [
    ],
  • "message": "1 Risultati",
  • "success": true,
  • "error": null
}

Send a priority mail. You should provide informati

Send a priority mail. You should provide information about the sender and the receiver(s) in the post body. Additionally, the "autoconfirm" parameter can be set to false to save the mail for a later confirmation with a PATCH request, while you do custom logic with the response. Check the IdRicevuta field in the recipient object if you need the tracking number

Authorizations:
bearerAuth
Request Body schema: application/json
object
Array of Recipient (object) or Casella postale (object) (Recipient or Casella postale)
object
Array of strings or string (documento)

The document can either be a string or an array of strings in plain text.
The strings can either be:

  • Plain text
  • Formatted in HTML, with style, header tags etc..
  • An URL pointing to either a webpage, a PDF or an image file (urls must start with http). The content is deduced from the "Content-Type" header
  • A base64-encoded PDF file. Encoded strings are deducted by the base64 content header data:application/pdf;base64,: basically, in order to mark a string as a base64-encoded content, you should prepend the aforementioned string to the output.
    The request will return an error if the decoding process fails on the server
The service analyses the "documento" (document) field, merges all the strings/document/images in different pages, compresses it slightly (if possible) and generates a single PDF file.

The maximum size for a PDF document, after our compression, is 5 MB for every products execept Posta 4 PRO, Posta Massiva and Raccomandata Smart (these 3 products accept up to 15 MB maximum).

The maximum number of pages is currently 50, or 100 is using the fronteretro option.

Responses

Response Schema: application/json
object
object
Array of objects
Array of strings or string (documento)

The document can either be a string or an array of strings in plain text.
The strings can either be:

  • Plain text
  • Formatted in HTML, with style, header tags etc..
  • An URL pointing to either a webpage, a PDF or an image file (urls must start with http). The content is deduced from the "Content-Type" header
  • A base64-encoded PDF file. Encoded strings are deducted by the base64 content header data:application/pdf;base64,: basically, in order to mark a string as a base64-encoded content, you should prepend the aforementioned string to the output.
    The request will return an error if the decoding process fails on the server
The service analyses the "documento" (document) field, merges all the strings/document/images in different pages, compresses it slightly (if possible) and generates a single PDF file.

The maximum size for a PDF document, after our compression, is 5 MB for every products execept Posta 4 PRO, Posta Massiva and Raccomandata Smart (these 3 products accept up to 15 MB maximum).

The maximum number of pages is currently 50, or 100 is using the fronteretro option.

object (documento_validato)

The output of the document generation process.

Callbacks

Request samples

Content type
application/json
{
  • "mittente": {
    },
  • "destinatari": [
    ],
  • "documento": [
    ],
  • "opzioni": {
    }
}

Response samples

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

Callback payload samples

Callback
POST: {$request.body#/opzioni/callback_url}
Content type
application/json
{
  • "mittente": {
    },
  • "destinatari": {
    },
  • "documento": [
    ],
  • "opzioni": {
    },
  • "prodotto": "string",
  • "creation_timestamp": 0,
  • "update_timestamp": 0,
  • "username": "string",
  • "confirmed": true,
  • "state": "string",
  • "documento_validato": {
    },
  • "pricing": {
    },
  • "confirmed_timestamp": 0,
  • "id": "string"
}

Get information about a single priority mail

Authorizations:
bearerAuth
path Parameters
id
required
string
query Parameters
ricevuta
string
Example: ricevuta=1

If the option was set, returns a PDF file as the received

state
string
Example: state=NEW

If the option has been set, it returns a specifc schema with state equal to the one requested

Responses

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

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/prioritarie/%7Bid%7D?ricevuta=1&state=NEW");

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": {
    },
  • "message": "",
  • "success": true,
  • "error": null
}

Confirm sending a mail that was created with "auto

Confirm sending a mail that was created with "autoconfirm = false"

Authorizations:
bearerAuth
path Parameters
id
required
string
Request Body schema: application/json
confirmed
boolean

Responses

Request samples

Content type
application/json
{
  • "confirmed": true
}

Response samples

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

Posta Ordinaria

List your requests

Authorizations:
bearerAuth

Responses

Response Schema: application/json
Array of objects
success
boolean
message
string
error
any

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/ordinarie/");

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": [
    ],
  • "message": "1 Risultati",
  • "success": true,
  • "error": null
}

Send a standard mail. You should provide informati

Send a standard mail. You should provide information about the sender and the receiver(s) in the post body. Additionally, the "autoconfirm" parameter can be set to false to save the mail for a later confirmation with a PATCH request, while you do custom logic with the response.

Authorizations:
bearerAuth
Request Body schema: application/json
object
object
Array of Recipient (object) or Casella postale (object) (Recipient or Casella postale)
Array of strings or string (documento)

The document can either be a string or an array of strings in plain text.
The strings can either be:

  • Plain text
  • Formatted in HTML, with style, header tags etc..
  • An URL pointing to either a webpage, a PDF or an image file (urls must start with http). The content is deduced from the "Content-Type" header
  • A base64-encoded PDF file. Encoded strings are deducted by the base64 content header data:application/pdf;base64,: basically, in order to mark a string as a base64-encoded content, you should prepend the aforementioned string to the output.
    The request will return an error if the decoding process fails on the server
The service analyses the "documento" (document) field, merges all the strings/document/images in different pages, compresses it slightly (if possible) and generates a single PDF file.

The maximum size for a PDF document, after our compression, is 5 MB for every products execept Posta 4 PRO, Posta Massiva and Raccomandata Smart (these 3 products accept up to 15 MB maximum).

The maximum number of pages is currently 50, or 100 is using the fronteretro option.

Responses

Response Schema: application/json
object
object
Array of objects
Array of strings or string (documento)

The document can either be a string or an array of strings in plain text.
The strings can either be:

  • Plain text
  • Formatted in HTML, with style, header tags etc..
  • An URL pointing to either a webpage, a PDF or an image file (urls must start with http). The content is deduced from the "Content-Type" header
  • A base64-encoded PDF file. Encoded strings are deducted by the base64 content header data:application/pdf;base64,: basically, in order to mark a string as a base64-encoded content, you should prepend the aforementioned string to the output.
    The request will return an error if the decoding process fails on the server
The service analyses the "documento" (document) field, merges all the strings/document/images in different pages, compresses it slightly (if possible) and generates a single PDF file.

The maximum size for a PDF document, after our compression, is 5 MB for every products execept Posta 4 PRO, Posta Massiva and Raccomandata Smart (these 3 products accept up to 15 MB maximum).

The maximum number of pages is currently 50, or 100 is using the fronteretro option.

object (documento_validato)

The output of the document generation process.

Callbacks

Request samples

Content type
application/json
{
  • "mittente": {
    },
  • "destinatari": [
    ],
  • "documento": [
    ],
  • "opzioni": {
    }
}

Response samples

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

Callback payload samples

Callback
POST: {$request.body#/opzioni/callback_url}
Content type
application/json
{
  • "mittente": {
    },
  • "destinatari": {
    },
  • "documento": [
    ],
  • "opzioni": {
    },
  • "prodotto": "string",
  • "creation_timestamp": 0,
  • "update_timestamp": 0,
  • "username": "string",
  • "confirmed": true,
  • "state": "string",
  • "documento_validato": {
    },
  • "pricing": {
    },
  • "confirmed_timestamp": 0,
  • "id": "string"
}

Get information about a single mail

Authorizations:
bearerAuth
path Parameters
id
required
string
query Parameters
ricevuta
string
Example: ricevuta=1

If the option was set, returns a PDF file as the received

state
string
Example: state=NEW

If the option has been set, it returns a specifc schema with state equal to the one requested

Responses

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

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/ordinarie/%7Bid%7D?ricevuta=1&state=NEW");

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": {
    },
  • "message": "",
  • "success": true,
  • "error": null
}

Confirm sending a mail that was created with "auto

Confirm sending a mail that was created with "autoconfirm = false"

Authorizations:
bearerAuth
path Parameters
id
required
string
Request Body schema: application/json
confirmed
boolean

Responses

Request samples

Content type
application/json
{
  • "confirmed": true
}

Response samples

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

Raccomandata Smart

List your raccomandate_smart

List your raccomandate_smart

Authorizations:
bearerAuth

Responses

Response Schema: application/json
Array of objects
message
string
success
boolean
error
any

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/raccomandate_smart/");

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": [
    ],
  • "message": "1 Risultati",
  • "success": true,
  • "error": null
}

Send a Raccomandata Smart. You should provide info

Send a Raccomandata Smart. You should provide information about the sender and the receiver(s) in the post body. Additionally, the "autoconfirm" parameter can be set to false to save it for a later confirmation with a PATCH request, while you do custom logic with the response.

Authorizations:
bearerAuth
Request Body schema: application/json
object
object
Array of Recipient (object) or Casella postale (object) (Recipient or Casella postale)
Array of strings or string (documento)

The document can either be a string or an array of strings in plain text.
The strings can either be:

  • Plain text
  • Formatted in HTML, with style, header tags etc..
  • An URL pointing to either a webpage, a PDF or an image file (urls must start with http). The content is deduced from the "Content-Type" header
  • A base64-encoded PDF file. Encoded strings are deducted by the base64 content header data:application/pdf;base64,: basically, in order to mark a string as a base64-encoded content, you should prepend the aforementioned string to the output.
    The request will return an error if the decoding process fails on the server
The service analyses the "documento" (document) field, merges all the strings/document/images in different pages, compresses it slightly (if possible) and generates a single PDF file.

The maximum size for a PDF document, after our compression, is 5 MB for every products execept Posta 4 PRO, Posta Massiva and Raccomandata Smart (these 3 products accept up to 15 MB maximum).

The maximum number of pages is currently 50, or 100 is using the fronteretro option.

Responses

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

Callbacks

Request samples

Content type
application/json
{
  • "mittente": [
    ],
  • "destinatari": [
    ],
  • "opzioni": {}
}

Response samples

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

Callback payload samples

Callback
POST: {$request.body#/opzioni/callback_url}
Content type
application/json
{
  • "mittente": {
    },
  • "destinatari": {
    },
  • "documento": [
    ],
  • "opzioni": {
    },
  • "prodotto": "string",
  • "creation_timestamp": 0,
  • "update_timestamp": 0,
  • "username": "string",
  • "confirmed": true,
  • "state": "string",
  • "documento_validato": {
    },
  • "pricing": {
    },
  • "confirmed_timestamp": 0,
  • "id": "string"
}

List your single raccomandata smart

List your single raccomandata smart

Authorizations:
bearerAuth
path Parameters
id
required
string
query Parameters
state
string
Example: state=NEW

If the option has been set, it returns a specifc schema with state equal to the one requested

Responses

Response Schema: application/json
object (ExampleState)
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://ws.ufficiopostale.com/raccomandate_smart/%7Bid%7D?state=NEW");

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
}

Confirm sending a mail that was created with "auto

Confirm sending a mail that was created with "autoconfirm = false"

Authorizations:
bearerAuth
path Parameters
id
required
string
Request Body schema: application/json
confirmed
boolean

Responses

Request samples

Content type
application/json
{
  • "confirmed": true
}

Response samples

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

Posta Massiva

List your posta_massiva

List your posta_massiva

Authorizations:
bearerAuth

Responses

Response Schema: application/json
Array of objects
message
string
success
boolean
error
integer

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://ws.ufficiopostale.com/posta_massiva/");

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": [
    ],
  • "message": "3 Risultati",
  • "success": true,
  • "error": null
}

Send a posta_massiva. You should provide informati

Send a posta_massiva. You should provide information about the sender and the receiver(s) in the post body. Additionally, the "autoconfirm" parameter can be set to false to save it for a later confirmation with a PATCH request, while you do custom logic with the response.

Authorizations:
bearerAuth
Request Body schema: application/json
object
object
Array of Recipient (object) or Casella postale (object) (Recipient or Casella postale)
Array of strings or string (documento)

The document can either be a string or an array of strings in plain text.
The strings can either be:

  • Plain text
  • Formatted in HTML, with style, header tags etc..
  • An URL pointing to either a webpage, a PDF or an image file (urls must start with http). The content is deduced from the "Content-Type" header
  • A base64-encoded PDF file. Encoded strings are deducted by the base64 content header data:application/pdf;base64,: basically, in order to mark a string as a base64-encoded content, you should prepend the aforementioned string to the output.
    The request will return an error if the decoding process fails on the server
The service analyses the "documento" (document) field, merges all the strings/document/images in different pages, compresses it slightly (if possible) and generates a single PDF file.

The maximum size for a PDF document, after our compression, is 5 MB for every products execept Posta 4 PRO, Posta Massiva and Raccomandata Smart (these 3 products accept up to 15 MB maximum).

The maximum number of pages is currently 50, or 100 is using the fronteretro option.

Responses

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

Callbacks

Request samples

Content type
application/json
{
  • "mittente": {
    },
  • "destinatari": [
    ],
  • "documento": [
    ],
  • "opzioni": {
    }
}

Response samples

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

Callback payload samples

Callback
POST: {$request.body#/opzioni/callback_url}
Content type
application/json
{
  • "mittente": {
    },
  • "destinatari": {
    },
  • "documento": [
    ],
  • "opzioni": {
    },
  • "prodotto": "string",
  • "creation_timestamp": 0,
  • "update_timestamp": 0,
  • "username": "string",
  • "confirmed": true,
  • "state": "string",
  • "documento_validato": {
    },
  • "pricing": {
    },
  • "confirmed_timestamp": 0,
  • "id": "string"
}

List your single posta_massiva

List your single posta_massiva

Authorizations:
bearerAuth
path Parameters
id
required
string
query Parameters
state
string
Example: state=NEW

If the option has been set, it returns a specifc schema with state equal to the one requested

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://ws.ufficiopostale.com/posta_massiva/%7Bid%7D?state=NEW");

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
}

Confirm sending a mail that was created with "auto

Confirm sending a mail that was created with "autoconfirm = false"

Authorizations:
bearerAuth
path Parameters
id
required
string
Request Body schema: application/json
confirmed
boolean

Responses

Request samples

Content type
application/json
{
  • "confirmed": true
}

Response samples

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