LogoLogo
v4.0
v4.0
  • 🏠Guida tecnica
  • 🕗Changelog
  • 🔢Setup iniziale
    • Adesione tramite l'Area Riservata
    • Iscrizione al Developer Portal
  • Funzionalità
    • 📦Pubblicare un servizio
      • Creare un servizio
      • Provare un servizio in test
      • Revisione del servizio
      • Visibilità del servizio
      • Importare servizi nell'Area Riservata
      • Dati obbligatori
        • Attributi
        • Service Metadata
      • Informazioni sensibili
      • Stato del servizio
      • Chiave manage
    • ✉️Inviare un messaggio
      • Messaggi di test
      • 📎Aggiungere allegati (Premium)
        • Specifiche degli endpoint di recupero degli allegati
  • 📐API
    • 📐OpenAPI
    • API Servizi
      • Manage Service: Get
      • Manage Service: Get keys
      • Manage Service: Get User Services
      • Manage Service: Create
      • Manage Service: Delete
      • Manage Service: Update
      • Manage Service: Request Review
      • Manage Service: Release
      • Manage Service: Get Released
      • Manage Service: Unpublish
      • Manage Service: Regenerate api key
      • Manage Service: Upload service logo
      • Upload organization logo
    • API Messaggi
      • Get a User Profile using POST
      • Submit a Message passing the user fiscal_code in the request body
      • Get Message
      • Get Subscriptions Feed
      • ⚠️Get a User Profile
      • ⚠️Submit a Message passing the user fiscal_code as path parameter
    • Errori comuni
    • Specifiche API
  • 🔑Abilitazioni
    • Test con Codici Fiscali reali
    • Test invio avvisi pagoPA
    • Invio messaggi massivo
    • Subscription feed
    • Gestione dei servizi
    • Funzionalità Premium
  • Risorse Utili
    • ❓Supporto agli Enti
    • 📘Glossario
Powered by GitBook
On this page
  1. API
  2. API Messaggi

Submit a Message passing the user fiscal_code as path parameter

PreviousGet a User ProfileNextErrori comuni

Attenzione: la seguente API sarà a breve deprecata, pertanto se ne sconsiglia l’uso.

Descrizione

API equivalente a Submit a Message passing the user fiscal_code in the request body

Esempi

### REQUEST
curl --location --request POST 'https://api.io.pagopa.it/api/v1/messages/AAAAAA00A00A000A' \
--header 'Ocp-Apim-Subscription-Key: __YOUR_API_KEY__' \
--header 'Content-Type: application/json' \
--data-raw '{
"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"
}
}'
### RESPONSE
{
"id": "01EM6X4JB9VSZTQ8H16KMQFCEJ"
}

Risorse utili

📐
⚠️
https://developer.io.italia.it/openapi.html#operation/submitMessageforUser
  • Descrizione
  • POSTSubmit a Message passing the user fiscal_code as path parameter
  • Esempi
  • Risorse utili

Submit a Message passing the user fiscal_code as path parameter

post

Submits a message to a user. On error, the reason is returned in the response payload. In order to call submitMessageforUser, before sending any message, the sender MUST call getProfile and check that the profile exists (for the specified fiscal code) and that the sender_allowed field of the user's profile it set to true.

Authorizations
Path parameters
fiscal_codeanyRequired

The fiscal code of the user, all upper case.

Body
time_to_liveinteger · min: 3600 · max: 604800Optional

This parameter specifies for how long (in seconds) the system will try to deliver the message to the channels configured by the user.

Default: 3600Example: 3600
contentall ofRequired
fiscal_codestring · FiscalCodeOptional

User's fiscal code.

Example: SPNDNL80R13C555X
feature_level_typestringOptionalDefault: STANDARDExample: STANDARD
Responses
201
Message created.
application/json
400
Invalid payload.
application/json
401
Unauthorized
403
Forbidden.
429
Too many requests
500
The message cannot be delivered.
application/json
post
POST /api/v1/messages/{fiscal_code} HTTP/1.1
Host: api.io.pagopa.it
Ocp-Apim-Subscription-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1039

{
  "time_to_live": 3600,
  "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.",
    "require_secure_channels": true,
    "payment_data": {
      "amount": 1,
      "notice_number": "text",
      "invalid_after_due_date": true,
      "payee": {
        "fiscal_code": "12345678901"
      }
    },
    "prescription_data": {
      "nre": "text",
      "iup": "text",
      "prescriber_fiscal_code": "TCNZRO80R13C555Y"
    },
    "legal_data": {
      "sender_mail_from": "text",
      "has_attachment": true,
      "message_unique_id": "text",
      "original_message_url": "text",
      "pec_server_service_id": "text"
    },
    "eu_covid_cert": {
      "auth_code": "text"
    },
    "third_party_data": {
      "id": "text",
      "original_sender": "text",
      "original_receipt_date": "2018-10-13T00:00:00.000Z",
      "has_attachments": true,
      "has_remote_content": true,
      "has_precondition": "text",
      "summary": "text",
      "configuration_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
    },
    "due_date": "2018-10-13T00:00:00.000Z"
  },
  "default_addresses": {
    "email": "foobar@example.com"
  },
  "fiscal_code": "SPNDNL80R13C555X",
  "feature_level_type": "STANDARD"
}
{
  "id": "text"
}