Qlara RCS API
API REST per l'invio di messaggi RCS (Rich Communication Services). Supporta messaggi di testo, card ricche, caroselli e suggerimenti interattivi con fallback su WhatsApp e SMS.
Un messaggio per chiamata. Questa API invia un messaggio RCS a un destinatario per chiamata. Per inviare a molti destinatari usa una campagna (
POST /api/partner-gateway/campaigns, nella Qlara Platform API).
Autenticazione
Tutte le richieste richiedono una delle seguenti modalità:
- API Key — Header
X-Api-Key: <api-key> - Basic Auth — Header
Authorization: Basic <base64(username:password)>
Funzionalità principali
- Invio messaggi RCS: testo, card ricche, caroselli
- Suggerimenti interattivi (bottoni, link, risposte rapide)
- Fallback automatico su WhatsApp e SMS
- Notifiche di consegna, lettura e messaggi in ingresso (webhook)
Webhooks
I seguenti callback vengono inviati via HTTP POST al tuo URL configurato in piattaforma.
DELIVERY
{
"channel": "RCS",
"eventType": "DELIVERY",
"messageId": "uuid",
"destination": "+393401234567",
"statusCode": 3,
"description": "delivered",
"eventDate": "2025-10-16T10:42:18Z",
"price": 0.04
}
statusCode: 3 = consegnato; un messaggio RCS non riuscito termina con 9 = errore generico, 10 = disabilitato o 11 = non supportato. Un messaggio RCS scaduto non produce un evento DELIVERY. price è il costo totale del messaggio; gli eventi READ non hanno prezzo.
READ
{
"channel": "RCS",
"eventType": "READ",
"messageId": "uuid",
"destination": "+393401234567",
"eventDate": "2025-10-16T10:43:00Z"
}
INBOUND
{
"channel": "RCS",
"eventType": "INBOUND",
"messageId": "msg-id",
"source": "+393471488489",
"destination": "ag-2_ci5xnlho_agent",
"receivedDate": "2025-10-31T10:59:05.099Z",
"messageType": "TEXT",
"text": "Messaggio di risposta dell'utente"
}
source è il numero dell'utente e destination è l'id Google del tuo agente RCS (come ag-2_ci5xnlho_agent), non l'agentId numerico che invii. messageType: TEXT, IMAGE, AUDIO, VIDEO. Per media, il campo mediaKey contiene la chiave per il download via /api/files/{mediaKey}.
Authentication
- API Key: ApiKeyAuth
- HTTP: Basic Auth
API Key fornita da Qlara
Security Scheme Type: | apiKey |
|---|---|
Header parameter name: | X-Api-Key |
Credenziali username/password
Security Scheme Type: | http |
|---|---|
HTTP Authorization Scheme: | basic |
Contact Qlara: URL: https://qlara.ai