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

### **`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`**

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 notification associated with the message was paid
  • NOT_PAID --> the notification associated with message was not yet paid
TypeEnumerated string
ExampleNOT_PAID
## Examples

Standard message

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

Premium message

1### REQUEST curl --location --request GET 'https://api.io.pagopa.it/api/v1/messages/AAAAAA00A00A000A/01EM6X4JB9VSZTQ8H16KMQFCEJ' \ --header 'Ocp-Apim-Subscription-Key: __YOUR_API_KEY__'
2
1### RESPONSE { "message": { "content": { "subject": "My first IO app message with min 10 character", "markdown": "This is my first message to the IO app. Use body markdown format with min 80 character" }, "created_at": "2021-02-18T08:17:01.775Z", "fiscal_code": "AAAAAA00A00A000A", "id": "01EM6X4JB9VSZTQ8H16KMQFCEJ", "sender_service_id": "01EYNQ0864HKYR1Q9PXPJ18W7G" }, "notification": { "email": "SENT", "webhook": "SENT" }, “read_status”: “READ”, “payment_status”: “NOT_PAID”, "status": "PROCESSED" }
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