DevPortalPagoPA




Table of contents

Add attachments

What are attachments

They are PDF documents shown at the bottom of the message content. These attachments are retrieved by the systems of the sending institution each time the user accesses the resource in the IO app.
Example of how a user can view a message containing an attachment.

How does it work?

To permit IO to retrieve the content of a message and its attachments, **you must make a **REST web service available in compliance with the relative OpenAPI.
To include the attachments in a message, in addition to the steps indicated in ., you must follow these steps:
Include the Third_party_data block, specifying the reference Remote configuration and the id which IO returns to you when it asks you for the metadata and, subsequently, the bytes of the attachments to the particular message you are sending.
Specify the value true in the field Has_attachments present in the block Third_party_data.
Specify the value ADVANCED in the field Feature_level_type present in the request.

Examples

Example of a call for sending a message with attachments:
1curl --location --request POST &apos;https://api.io.pagopa.it/api/v1/messages&apos; \ --header &apos;Ocp-Apim-Subscription-Key:<YOUR_API_KEY>&apos; \ --header &apos;Content-Type: application/json&apos; \ --data-raw &apos;{ &quot;content&quot;: { &quot;subject&quot;: &quot;Message with attachments&quot;, &quot;markdown&quot;: &quot;# Title\n\nMessage text: contains **attachments**!&quot;, &quot;third_party_data&quot;: { &quot;id&quot;: &quot;c7832d5f-5946-48a3-ba9d-2d1e3aa3f7e5&quot;, &quot;configuration_id&quot;: &quot;0e9852ccb8a04128bd637c807b9d80d3&quot;, &quot;has_attachments&quot;: true } }, &quot;feature_level_type&quot;: &quot;ADVANCED&quot;, &quot;fiscal_code&quot;: &quot;<validFiscalCode>&quot;, }&apos;
2
Example of a positive response:
1{ &quot;id&quot;: &quot;01BX9NSMKVXXS5PSP2FATZMYYY&quot; }
2

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