DevPortalPagoPA




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.

fiscal_code*

DescriptionFiscal code of the message recipient
MandatoryYes
TypeString
ExampleAAAAAA00A00A000A
## **`time_to_live`**
DescriptionTime 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
MandatoryNo
Default3600
TypeInteger
Example3600
## **`feature_level_type`**
DescriptionIndicates if the message is sent within the scope of a Premium subscription, or if it is to be considered a standard message
MandatoryNo
DefaultSTANDARD
TypeEnumerated string
Accepted values
  • STANDARD -> the message is considered a normal IO message
  • ADVANCED -> additional advanced information is correlated with the message. This value can be specified only if you have a Premium subscription.
ExampleADVANCED
## **```content`` ```****`*`**

subject ``*

DescriptionSubject of the message, whose length must be between 10 and 120 characters
MandatoryYes
TypeString
ExampleRinnova la tua carta d'identità

markdown ``*

DescriptionText of the message in markdown format, whose length must be between 80 and 10000 characters
MandatoryYes
TypeString
ExampleGentile 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

DescriptionIndicates 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
MandatoryNo
DefaultIf 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)
TypeBoolean
Example
### **`due_date`**
DescriptionThis allows associating a reminder with the message. The format must be ISO-8601 with the UTC time zone
MandatoryNo
TypeString
Example2018-10-13T00🕛️00.000Z

payment_data

amount ``*

DescriptionAmount in euro cents of the payment notice issued on the pagoPA platform
MandatoryYes, for pagoPA payments
TypeInteger
Example100
#### **```notice_number`` ```****`*`**
DescriptionNotification code for a payment notice issued on the pagoPA platform
MandatoryYes, for pagoPA payments
TypeString
Example301011100007347557

invalid_after_due_date

DescriptionThe payment is shown in app as overdue if the current date is past the due_date
MandatoryNo
Default
TypeBoolean
Example
#### `payee`

third_party_data

id ``*

DescriptionUnivocal third party identifier generated by the institution that is needed in order to join the message with its remote content
MandatoryYes
TypeString
Example2d5e0bcf-7ac3-4afc-a8bd-ac3c27582b91
#### `has_precondition`
DescriptionIndicates the presence of preconditions when opening the message
MandatoryNo
DefaultNONE
TypeEnumerated string
Accepted values
  • NONE -> the message does not have preconditions
  • ONCE -> the preconditions are shown before opening in app only until the message is read by the recipient
  • ALWAYS -> the preconditions are shown each time before opening the message in app
ExampleONCE
#### `has_remote_content`
DescriptionIndicates that the subject and markdown of the message are remote content
MandatoryNo
Default
TypeBoolean
Example
#### `has_attachments`
DescriptionIndicates the presence of attachments related to the message
MandatoryNo
Default
TypeBoolean
Example
#### `original_sender`
original_receipt_date
summary
### **`prescription_data`**

eu_covid_cert

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" }'
2

Message 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" }
2

Message 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" }
2

Remote 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" }
2
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, "has_remote_content": true, "has_attachments": true //------------------------- } }, "fiscal_code": "AAAAAA00A00A000A" }
2

Expected 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" }
2

Useful resources

Haven't completed onboarding yet and need help?

Write an email describing your problem or question to the address areariservata@assistenza.pagopa.it.

Need help with APIs and Integration?

Write an email describing your problem or question to the address:

io-service-management@pagopa.it

Tell us what you think

To report problems or give feedback, leave a comment in the GitHub space of the IO app