Agile Telecom Agile Telecom
  • Products
    • SMS
    • 2 Way
    • Smart Content Verification
    • HLR Look Up
    • Testing Tool
  • Industries
    • Communications
    • Information Technology
    • Financial Services
    • Marketing
  • ATWS
  • How We Work
    • Who We Are
Sign In Contact us
Sign In Contact us

Send SMS

  • ENG – SMS REST API HTTP Protocol
  • ENG – SMPP Protocol
  • ITA – REST API / Protocollo HTTP
  • ITA – Protocollo SMPP

Send RCS

  • ENG – RCS API / Template Creation
  • ITA – RCS REST API / Protocollo HTTP
  • ITA – RCS API / Creazione Template

Receive SMS

  • ENG – Inbound SMS Service
  • ITA – Servizio di Ricezione SMS

Credit Check

  • ENG – SMS Credit Check
  • ITA – SMS Credit Check

Mobile Number Portability

  • ENG – Mobile Number Portability
  • ITA – Mobile Number Portability
  • Home
  • Documentation
  • Send RCS
  • ITA – RCS API / Creazione Template
View Categories

ITA – RCS API / Creazione Template

5 min read

Questa guida descrive come costruire il body JSON delle chiamate POST /rcs/template/create utilizzate per creare nuovi template RCS. La documentazione si rivolge sia a sviluppatori sia a figure di prodotto.


Struttura base del payload #

{
  "name": "Nome leggibile",
  "description": "Breve descrizione del template",
  "type": "TEXT | CARD | CAROUSEL",
  "body": { ... contenuto del template ... }
}

Campi comuni (in body) #

fallbackSms (opzionale) #

SMS inviato se l’RCS non è disponibile sul dispositivo.

"fallbackSms": {
  "sender": "SMS-SENDER",   // obbligatorio se presente fallbackSms
  "text":   "Testo SMS"     // obbligatorio se presente fallbackSms
}

Se si definisce fallbackSms, sender e text sono entrambi obbligatori.

suggestions (opzionale) #

Pulsanti/azioni attivabili dall’utente la cui struttura deve essere conforme con la struttura definita nella tabella 5: “Suggestions: tipi e campi”. Ogni voce ha:

  • type (es. "url", "dial", "reply", "coordinates", "location", "calendar");
  • text (etichetta del pulsante, opzionale).
"suggestions": [
  { "type": "url",  "text": "Visita sito", "url": { "url": "https://example.com" } },
  { "type": "dial", "text": "Chiama",      "dial": { "phoneNumber": "+39037224525" } }
]

Template (text) #

Struttura #

Messaggio testuale con possibili azioni e SMS di fallback.

{
  "type": "TEXT",
  "body": {
    "text": "Testo del messaggio",   // obbligatorio
    "suggestions": [ ... ],          // opzionale
    "fallbackSms": { ... }           // opzionale
  }
}
Obbligatori #
  • text non vuoto ne nullo.
Esempio di RCS testuale con SMS di fallback #
{
  "name": "RCS - Benvenuto (Text)",
  "description": "Messaggio di benvenuto con fallback SMS",
  "type": "TEXT",
  "body": {
    "text": "Ciao {name}, benvenuto nel nostro servizio!",
    "suggestions": [
      { "type": "url",  "text": "Sito",  "url": { "url": "https://agiletelecom.com" } },
      { "type": "dial", "text": "Chiama","dial": { "phoneNumber": "+39037224525" } }
    ],
    "fallbackSms": { "sender": "AGILE", "text": "Ciao {name}, benvenuto!" }
  }
}

Template CARD (rich card singola) #

Riquadro con media (immagine/video), titolo, descrizione e, facoltativamente, suggestions.

Struttura #
{
  "type": "CARD",
  "body": {
    "cardOrientation": "VERTICAL | HORIZONTAL | UNSPECIFIED", // obbligatorio
    "thumbnailAlignment": "LEFT | RIGHT | UNSPECIFIED",       // opzionale
    "card": {                                                 // obbligatorio
      "title": "Titolo",            // opzionale
      "description": "Descrizione", // opzionale
      "media": {                    // opzionale
        "height": "SHORT | MEDIUM | TALL | UNSPECIFIED", // obbligatorio se presente il media
        "fileUrl": "https://..."   // Url del media file da inserire nella card
      },
      "suggestions": [ ... ]        // opzionale
    },
    "suggestions": [ ... ],         // opzionale (azioni globali)
    "fallbackSms": { ... }          // opzionale
  }
}
Esempio #
{
  "name": "RCS - Promo Autunno (Card)",
  "description": "Card verticale con immagine e azioni",
  "type": "CARD",
  "body": {
    "cardOrientation": "VERTICAL",
    "card": {
      "title": "Offerta d'autunno",
      "description": "Sconto 20% sui prodotti selezionati",
      "media": {
        "height": "TALL",
        "fileUrl": "https://cdn.example.com/img/offerta.jpg"
      },
      "suggestions": [
        { "type": "url", "text": "Scopri", "url": { "url": "https://shop.example.com/offerta" } }
      ]
    },
    "suggestions": [
      { "type": "dial", "text": "Chiama", "dial": { "phoneNumber": "+39037224525" } }
    ],
    "fallbackSms": { "sender": "AGILE", "text": "Promo -20% su shop.example.com" }
  }
}

Template CAROUSEL (più card) #

Lista scorrevole di 2–10 card, ognuna con media e azioni proprie.

Struttura #
{
  "type": "CAROUSEL",
  "body": {
    "cardWidth": "SMALL | MEDIUM | UNSPECIFIED", // obbligatorio
    "cards": [                                    // obbligatorio
      {
        "title": "Titolo",            // opzionale
        "description": "Descrizione", // opzionale
        "media": {                    // opzionale
          "height": "SHORT | MEDIUM | TALL | UNSPECIFIED", // obbligatorio
          "fileUrl": "https://..."  
        },
        "suggestions": [ ... ]        // opzionale (per la card visibili sotto la card)
      }
      // ... altre card ...
    ],
    "suggestions": [ ... ],           // opzionale (azioni globali visibili sotto il carousel)
    "fallbackSms": { ... }            // opzionale
  }
}
Esempio #
{
  "name": "RCS - Menu Ristorante (Carousel)",
  "description": "Carosello con piatti e azioni",
  "type": "CAROUSEL",
  "body": {
    "cardWidth": "MEDIUM",
    "cards": [
      {
        "title": "Antipasti",
        "description": "Un abbraccio di sapori.",
        "media": { "height": "SHORT", "fileUrl": "https://cdn.example.com/a.jpg" },
        "suggestions": [
          { "type": "dial", "text": "Chiama subito", "dial": { "phoneNumber": "+39037224525" } }
        ]
      },
      {
        "title": "Primi",
        "description": "Pasta fresca a km0.",
        "media": { "height": "SHORT", "fileUrl": "https://cdn.example.com/p.jpg" },
        "suggestions": [
          { "type": "url", "text": "Visita il sito", "url": { "url": "https://agiletelecom.com/" } }
        ]
      }
    ],
    "suggestions": [
      {
        "type": "calendar",
        "text": "Partecipa alla presentazione",
        "calendar": {
          "title": "Save the date",
          "description": "Presentazione del nuovo menu",
          "startTime": "2026-06-02T11:00:00Z",
          "endTime":   "2026-06-02T13:00:00Z"
        }
      }
    ],
    "fallbackSms": { "sender": "AGILE", "text": "Scopri il menu: agiletelecom.com" }
  }
}

Suggestions: tipi e campi #

type Oggetto Obbligatori Esempio
"reply" reply — { "type":"reply", "text":"Ok", "reply":{} }
"url" url url.url { "type":"url", "text":"Apri", "url":{"url":"https://..."} }
"dial" dial dial.phoneNumber { "type":"dial", "text":"Chiama", "dial":{"phoneNumber":"+390372..."} }
"coordinates" locationCoordinates latitude, longitude { "type":"coordinates", "text":"Posizione", "locationCoordinates":{"label":"Store","latitude":45.1,"longitude":10.0} }
"location" locationQuery locationQuery.query { "type":"location", "text":"Cerca", "locationQuery":{"query":"farmacie"} }
"calendar" calendar startTime, endTime { "type":"calendar", "text":"Aggiungi evento", "calendar":{"title":"Demo","startTime":"2026-06-02T11:00:00Z","endTime":"2026-06-02T12:00:00Z"} }
Formati data: usa ISO-8601 (es. 2026-06-02T11:00:00Z o +01:00). #

Media nelle card #

Di seguito si riporta l’enumerato che definisce la dimensione del media.
Si ricorda che l’indirizzo definito in fileUrl deve essere pubblicamente accessibile e mantenuto online fino al termine dell’invio del messaggio; la mancanza del media in fase di invio causa un errore che può compromettere il corretto invio del RCS

  • height obbligatorio: "SHORT" | "MEDIUM" | "TALL" | "UNSPECIFIED".
  • Specificare sempre fileUrl che definisce l’indirizzo del media.

Enumerazioni #

Di seguito si riportano gli enumerato utilizzabili in fase di definizione dei template RCS.

  • Type: TEXT, CARD, CAROUSEL.
  • cardOrientation: VERTICAL, HORIZONTAL, UNSPECIFIED
  • thumbnailAlignment: LEFT, RIGHT, UNSPECIFIED.
  • height: SHORT, MEDIUM, TALL, UNSPECIFIED
  • cardWidth: SMALL, MEDIUM, UNSPECIFIED

Placeholder nel testo #

Usa segnaposto nel text (es. {name}); la sostituzione avviene in fase di invio.
All’interno del testo è possibile definire quanti template si deisderano attraverso l’uso delle parentesi graffe; in fase di invio saranno sostituiti dai valori definiti nella chiamata

NB: Se in fase di invio non sarà fornito un valore per un placeholter questo non avrà alcuna sostituzione e la dicitura con le graffe (es. {name}) resterà all’interno del messaggio RCS


Checklist errori comuni #

  • TEXT: manca body.text.
  • CARD: mancano body.card o body.card.media.height.
  • CAROUSEL: manca body.cardWidth o cards è vuoto.
  • Media: manca fileUrl o non è raggiungibile dall’esterno.
  • Suggestions: type incoerente con l’oggetto compilato.
What are your Feelings
Table of Contents
  • Struttura base del payload
  • Campi comuni (in body)
    • fallbackSms (opzionale)
    • suggestions (opzionale)
  • Template (text)
    • Struttura
    • Obbligatori
    • Esempio di RCS testuale con SMS di fallback
  • Template CARD (rich card singola)
    • Struttura
    • Esempio
  • Template CAROUSEL (più card)
    • Struttura
    • Esempio
  • Suggestions: tipi e campi
    • Formati data: usa ISO-8601 (es. 2026-06-02T11:00:00Z o +01:00).
  • Media nelle card
  • Enumerazioni
  • Placeholder nel testo
  • Checklist errori comuni

Via Baldassarre Peruzzi 26, 41012 – Carpi (MO)

VAT ID: IT02804070361

Agile Telecom is part of Growens

Products

SMS

2Way

Smart content verification

HLR Lookup

Testing Tool

Industries

Communications

Information Technology

Financial services

Marketing

Developers

Documentation

How we work

Our experience

Our people

Get in touch

Contact Us

Privacy Policy

Compliance

GDPR Infrastructure

Terms of Service

Private Area

AgCom Regulation