Table of contents
Submit a Message passing the user fiscal_code in the request body
Description
This API makes it possible to send messages to a citizen identified by the fiscal code. Before sending a message, you must check that the citizen is registered with IO and that the service can send communications to the citizen.
post
fiscal_code*
| Description | Fiscal code of the message recipient |
| Mandatory | Yes |
| Type | String |
| Example | AAAAAA00A00A000A |
## **`time_to_live`**
| Description | Time expressed in seconds that specifies the message delivery retry time by IO; once this time has passed, no other push notification or forwarding email is produced |
| Mandatory | No |
| Default | 3600 |
| Type | Integer |
| Example | 3600 |
## **`feature_level_type`**
| Description | Indicates if the message is sent within the scope of a Premium subscription, or if it is to be considered a standard message |
| Mandatory | No |
| Default | STANDARD |
| Type | Enumerated string |
| Accepted values |
|
| Example | ADVANCED |
## **```content`` ```****`*`**
subject ``*
| Description | Subject of the message, whose length must be between 10 and 120 characters |
| Mandatory | Yes |
| Type | String |
| Example | Rinnova la tua carta d'identità |
markdown ``*
| Description | Text of the message in markdown format, whose length must be between 80 and 10000 characters |
| Mandatory | Yes |
| Type | String |
| Example | Gentile Mario,\n\n\n\nsiamo lieti di comunicarti che la tua **Carta di Identità** è disponibile per il ritiro presso i nostri sportelli.\n\nPuoi consultare gli orari sul [Portale del servizio](https://www.miosito.it/).\n\n\n\n*Lo Staff* |
require_secure_channels
| Description | Indicates that the message contains sensitive and/or confidential information; if set to true anonymized push notifications will be produced and email copies of the message will not be forwarded |
| Mandatory | No |
| Default | If you do not include this field, the fallback is the service configuration (refer to https://github.com/pagopa/devportal-docs/blob/docs/from-gitbook/docs/2qewnaGowjcqCUhJyHjR/function/publish-a-service/mandatory%20data/attributes.md#require_secure_channels) |
| Type | Boolean |
| Example |
### **`due_date`**
| Description | This allows associating a reminder with the message. The format must be ISO-8601 with the UTC time zone |
| Mandatory | No |
| Type | String |
| Example | 2018-10-13T00🕛️00.000Z |
payment_data
amount ``*
| Description | Amount in euro cents of the payment notice issued on the pagoPA platform |
| Mandatory | Yes, for pagoPA payments |
| Type | Integer |
| Example | 100 |
#### **```notice_number`` ```****`*`**
| Description | Notification code for a payment notice issued on the pagoPA platform |
| Mandatory | Yes, for pagoPA payments |
| Type | String |
| Example | 301011100007347557 |
invalid_after_due_date
| Description | The payment is shown in app as overdue if the current date is past the due_date |
| Mandatory | No |
| Default | |
| Type | Boolean |
| Example |
#### `payee`
third_party_data
id ``*
| Description | Univocal third party identifier generated by the institution that is needed in order to join the message with its remote content |
| Mandatory | Yes |
| Type | String |
| Example | 2d5e0bcf-7ac3-4afc-a8bd-ac3c27582b91 |
#### `has_precondition`
| Description | Indicates the presence of preconditions when opening the message |
| Mandatory | No |
| Default | NONE |
| Type | Enumerated string |
| Accepted values |
|
| Example | ONCE |
#### `has_remote_content`
| Description | Indicates that the subject and markdown of the message are remote content |
| Mandatory | No |
| Default | |
| Type | Boolean |
| Example |
#### `has_attachments`
| Description | Indicates the presence of attachments related to the message |
| Mandatory | No |
| Default | |
| Type | Boolean |
| Example |
🚧 Field reserved for future use
#### `original_sender`
original_receipt_date
summary
### **`prescription_data`**
eu_covid_cert
legal_data
Examples
Non-remote message (static)
1### REQUEST curl --location --request POST 'https://api.io.pagopa.it/api/v1/messages' \ --header 'Content-Type: application/json' \ --header 'Ocp-Apim-Subscription-Key: __YOUR_API_KEY__' \ --data-raw '{ "content": { "subject": "Welcome new user !", "markdown": "# This is a markdown header\n\nto show how easily markdown can be converted to **HTML**\n\nRemember: this has to be a long text." }, “feature_level_type”: “STANDARD”, "fiscal_code": "AAAAAA00A00A000A" }'
2Message with remote subject and markdown
1{ "content": { "subject": "Subject of the message shown in inbox", "markdown": "This text will be replaced by the remote markdown specified at the moment of using the message", "third_party_data": { "id": "2d5e0bcf-7ac3-4afc-a8bd-ac3c27582b91", //------------------------ "has_remote_content": true //------------------------ } }, "fiscal_code": "AAAAAA00A00A000A" }
2Message with preconditions
1{ "content": { "subject": "Subject of the message", "markdown": "Message text with minimum length of eighty characters with respect to the IO integration specifications", "third_party_data": { "id": "2d5e0bcf-7ac3-4afc-a8bd-ac3c27582b91", //---------------------- "has_precondition": true //---------------------- } }, "fiscal_code": "AAAAAA00A00A000A" }
2Remote message with attachments
1{ "content": { "subject": "Subject of the message", "markdown": "Message text with minimum length of eighty characters with respect to the IO integration specifications", "third_party_data": { "id": "2d5e0bcf-7ac3-4afc-a8bd-ac3c27582b91", //--------------------- "has_attachments": true //--------------------- } }, "fiscal_code": "AAAAAA00A00A000A" }
21{ "content": { "subject": "Subject of the message", "markdown": "Message text with minimum length of eighty characters with respect to the IO integration specifications", "third_party_data": { "id": "2d5e0bcf-7ac3-4afc-a8bd-ac3c27582b91", //------------------------- "has_precondition": true, "has_remote_content": true, "has_attachments": true //------------------------- } }, "fiscal_code": "AAAAAA00A00A000A" }
2Expected response
In all the cases described above, IO returns the identifier of the message that you can use to query the status via the API Get Message.
1{ "id": "01EM6X4JB9VSZTQ8H16KMQFCEJ" }
2Useful resources
On this page
Haven't completed onboarding yet and need help?
Write an email describing your problem or question to the address areariservata@assistenza.pagopa.it.
Tell us what you think
To report problems or give feedback, leave a comment in the GitHub space of the IO app