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.
get
message
id
| Description | Identifier of the message obtained with the API ⚠️ Submit a Message passing the user fiscal_code as path parameter |
| Type | String |
| Example | 01EM6X4JB9VSZTQ8H16KMQFCEJ |
fiscal_code
| Description | Fiscal code of the citizen to whom the message was sent |
| Type | String |
| Example | AAAAAA00A00A000A |
created_at
| Description | Creation date of the message in ISO-8601 format with the UTC time zone |
| Type | String |
| Example | 2021-02-18T08:17:01.775Z |
sender_service_id
| Description | Identifier of the service associated with message |
| Type | String |
| Example | 01EYNQ0864HKYR1Q9PXPJ18W7G |
The data related to the Content is the same sent when the message was created.
notification
| Description | Sending 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. |
| Type | Enumerated string |
| Example | SENT |
webhook
| Description | Sending 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. |
| Type | Enumerated string |
| Example | SENT |
status
| Description | Sending 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. |
| Type | Enumerated string |
| Example | PROCESSED |
read_status
| Description | Field present only for messages sent as ADVANCED (part of the Premium program). The field can have the following values:
|
| Type | Enumerated string |
| Example | READ |
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:
|
| Type | Enumerated string |
| Example | NOT_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__'
41### 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}
191### REQUEST
2curl --location --request GET 'https://api.io.pagopa.it/api/v1/messages/AAAAAA00A00A000A/01EM6X4JB9VSZTQ8H16KMQFCEJ' \
3--header 'Ocp-Apim-Subscription-Key: __YOUR_API_KEY__'
41### 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
22Useful resources
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