DevPortalPagoPA




Table of contents

Get Message

Description

This API checks the sending status of the message, retrieving the content. You must query the API with the fiscal code of the citizen receiving the message and the identifier of the message.

message

id

DescriptionIdentifier of the message obtained with the API ⚠️ Submit a Message passing the user fiscal_code as path parameter
TypeString
Example01EM6X4JB9VSZTQ8H16KMQFCEJ

fiscal_code

DescriptionFiscal code of the citizen to whom the message was sent
TypeString
ExampleAAAAAA00A00A000A

created_at

DescriptionCreation date of the message in ISO-8601 format with the UTC time zone
TypeString
Example2021-02-18T08:17:01.775Z

sender_service_id

DescriptionIdentifier of the service associated with message
TypeString
Example01EYNQ0864HKYR1Q9PXPJ18W7G

content

The data related to the Content is the same sent when the message was created.

notification

email

DescriptionSending status of the email.

- SENT: email sent correctly;
- THROTTLED: temporary error due to overload, the message can be delivered by the TTL and for a maximum of 7 days;
- EXPIRED: the maximum TTL of the message is reached;
- FAILED: permanent error of the notification.
TypeEnumerated string
ExampleSENT

webhook

DescriptionSending status of the push notification.

- SENT: notification sent;
- THROTTLED: temporary error due to overload, the message can be delivered by the TTL and for a maximum of 7 days;
- EXPIRED: the maximum TTL of the message is reached;
- FAILED: permanent error of the notification.
TypeEnumerated string
ExampleSENT

status

DescriptionSending status of the message.

- ACCEPTED: the message was entered in the queue for saving;
- THROTTLED: temporary error due to overload, the message can be sent by the TTL and for a maximum of 7 days;
- FAILED: permanent error when saving the message;
- PROCESSED:the message was sent; when this status is detected you are certain that your message is available to the recipient when they open the IO app
- REJECTED: the message was discarded because the recipient does not exist or blocked the communications of the service.
TypeEnumerated string
ExamplePROCESSED

read_status

Description
Field present only for messages sent as ADVANCED (part of the Premium program). The field can have the following values:
  • READ --> the recipient read the message
  • UNREAD --> the recipient has not yet read the message
  • UNAVAILABLE --> the recipient expressed their preference to not share the reading status of their messages
TypeEnumerated string
ExampleREAD

payment_status

Description
Field present only for messages that contain a payment notice and are sent as ADVANCED (Premium program part). The field can have the following values:
  • PAID --> the notice associated with the message was paid
  • NOT_PAID --> the notice associated with message was not yet paid
TypeEnumerated string
ExampleNOT_PAID

Examples

Standard message

1### REQUEST
2curl --location --request GET 'https://api.io.pagopa.it/api/v1/messages/AAAAAA00A00A000A/01EM6X4JB9VSZTQ8H16KMQFCEJ' \
3--header 'Ocp-Apim-Subscription-Key: __YOUR_API_KEY__'
4
1### RESPONSE
2{
3"message": {
4  "content": {
5    "subject": "My first IO app message with min 10 character",
6    "markdown": "This is my first message to the IO app. Use body markdown format with min 80 character"
7    },
8    "created_at": "2021-02-18T08:17:01.775Z",
9    "fiscal_code": "AAAAAA00A00A000A",
10    "id": "01EM6X4JB9VSZTQ8H16KMQFCEJ",
11    "sender_service_id": "01EYNQ0864HKYR1Q9PXPJ18W7G"
12  },
13  "notification": {
14    "email": "SENT",
15    "webhook": "SENT"
16  },
17  "status": "PROCESSED"
18}
19

Premium message

1###  REQUEST
2curl --location --request GET 'https://api.io.pagopa.it/api/v1/messages/AAAAAA00A00A000A/01EM6X4JB9VSZTQ8H16KMQFCEJ' \
3--header 'Ocp-Apim-Subscription-Key: __YOUR_API_KEY__'
4
1### RESPONSE
2{
3   "message": {
4       "content": {
5           "subject": "My first IO app message with min 10 character",
6           "markdown": "This is my first message to the IO app. Use body markdown format with min 80 character"
7       },
8       "created_at": "2021-02-18T08:17:01.775Z",
9       "fiscal_code": "AAAAAA00A00A000A",
10       "id": "01EM6X4JB9VSZTQ8H16KMQFCEJ",
11       "sender_service_id": "01EYNQ0864HKYR1Q9PXPJ18W7G"
12   },
13   "notification": {
14       "email": "SENT",
15       "webhook": "SENT"
16   },
17   “read_status”: “READ”,
18   “payment_status”: “NOT_PAID”,
19   "status": "PROCESSED"
20}
21
22

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