Omnichannel Sending API (7.0)

Download OpenAPI specification:Download

INTRODUCTION

OMNICHANNEL sending integration API: a single campaign can go out through SMS, RCS, Email, WhatsApp, Voice and Push using an ORDERED list of channels. Each recipient receives the message through the first channel of the list; if delivery fails, the system automatically retries through the next channel, with no action required from the integrator.

AUTHENTICATION

In your user account you will find the API User and the API Token, both are required to make REST API requests to the API functions. For security, requests must be made via POST using the secure HTTPS protocol.



To use Basic Authentication you must include a header in your requests of the form: Authorization: Basic Base64StringAPI, where Base64StringAPI is the Base64 encoding of the string APIUser:APIToken. You can find your API User and API Token in your user account under Your Data -> Configure Account.



To generate the Base64 encoded string, simply build the string APIUser:APIToken and encode it in base64 using any base64encode function.

THINGS TO KEEP IN MIND

Per-channel requirements: Every channel you include in the campaign must be available in your account:
- SMS: always available. Provide REMITENTE (sender) and MENSAJE (supports {{NAME}}-style variables).
- RCS: requires an active RCS Agent (IDAGENTE) and an RCS template created in the panel (IDPLANTILLA).
- WhatsApp: requires a connected WhatsApp Business account, a phone (IDTELEFONO) and a Meta-APPROVED template (IDPLANTILLA = template name).
- Email: requires your OWN VALIDATED domain (no default-domain sending), a SUBJECT (ASUNTO, mandatory) and a template (IDPLANTILLA) or a MENSAJEEMAIL body. Optionally NOMBREREMITENTE, the sender name the recipient sees next to the address; if omitted, the address itself is shown.
- Voice: phone call with Text-to-Speech. Requires one of your own ACTIVE numbers as REMITENTE (requested in the panel), the MENSAJE to read out and optionally LENGUAJE (TTS language, e.g. es) and DETECTARCONTESTADOR (answering machine detection).
- Push: alert to the devices linked from the panel (Alerts section). The destination is the device ALIAS: fixed in the channel (REF) or per recipient (REFPUSH variable inside its VARIABLES). Without an alias the channel is skipped for that recipient — it never alerts "every device of the account".

2FA/OTP service: If what you need is to send and validate one-time codes, use the dedicated 2FA/OTP API (same channel cascade plus code generation, validation, state webhook and anti-abuse). OTP requests show in the panel in this same campaign listing, tagged as OTP and with their own filter.

PRE-PRODUCTION validation: Before going live, make calls with VALIDARCANALES=SI: the system verifies the real configuration of every channel (templates in the database, validated domain, phone and approved templates in Meta...) and returns a descriptive error (Res -4) if anything is not correctly configured. This validation adds latency and is rate-limited: always use VALIDARCANALES=NO in production.


Retry cascade: The delivery status of each channel is reported by the carrier itself. When a channel reports a definitive delivery failure for a recipient, the system automatically retries through the next channel of the list that has not already failed for that destination. You can follow the status of every recipient (pending, sent, delivered, read, re-sent through another channel, failed) in the panel, under Omnichannel Sending → Campaigns and Statistics.


Variables: Template variables ({{NAME}}, {{CODE}}...) are sent per recipient in the VARIABLES array. Names are case-insensitive.


Request response: Most functions have a parameter called 'Resp'. This parameter defines the format of the returned response: TXT, JSON or XML. It is recommended to always set this parameter.

basicAuth

HTTP Basic authentication. Use your API User as the username and your API Token as the password (you will find them in your panel, under Your Data → Configure Account). The resulting header is Authorization: Basic base64(APIUser:APIToken). Most HTTP libraries build it automatically (curl -u, requests auth=, Ruby's basic_auth, etc.) without needing to encode the base64 by hand.

Security Scheme Type: HTTP
HTTP Authorization Scheme: basic

Send Omnichannel

/EnviarOmnicanal

Creates and launches an omnichannel campaign: define the ORDERED channel list (CANALES) and the recipients (DESTINATARIOS). Each recipient goes out through the first channel; if its delivery fails, the system automatically retries through the next channel of the list.

ATTENTION: use VALIDARCANALES=SI in pre-production to verify the channel configuration before sending.

Authorizations:
basicAuth
query Parameters
Canales
required
Array of strings
Example: Canales=[{"Tipo":"sms","Remitente":"MYCOMPANY","Mensaje":"Hi {{NAME}}, your order {{ORDER}} is ready"},{"Tipo":"email","Dominio":"mycompany.com","Asunto":"Your order {{ORDER}}","MensajeEmail":"Hi {{NAME}}, your order is ready."}]

ORDERED JSON array of channels. The order defines the cascade: the first channel is the main one and the rest are the retries. Each channel type can appear only once. Fields per element:
Tipo (required) - sms | rcs | email | whatsapp | voz | push
sms: Remitente (max 11 alphanumeric chars) and Mensaje (required, supports {{NAME}} variables).
rcs: IdAgente and IdPlantilla (numeric, from your panel).
whatsapp: IdTelefono (Meta phone_id) and IdPlantilla (approved template name).
email: Dominio (your own validated domain, required), Asunto (subject, required, supports variables), Remitente (address of the domain; defaults to envios@domain) and IdPlantilla (panel template) or MensajeEmail (basic HTML body).
voz (voice call): Remitente (your own active number, required), Mensaje (Text-to-Speech script, supports variables), Lenguaje (TTS language, default es — Spanish) and DetectarContestador (0|1, answering machine detection). The Mensaje also supports the voice assistant markers: (MP3:file) inserts an audio from your library, (PAUSA:seconds) a pause and (SPELL:text) spells the text letter by letter.
push: Titulo and/or Mensaje (support variables), Ref (FIXED alias of the linked device; when the alias is per recipient, use the REFPUSH variable inside its VARIABLES), Aplicacion (alert source, short slug, default api) and Nivel (critico | alto | normal | bajo). For example:


                  [
                    { "Tipo": "whatsapp", "IdTelefono": "572863982585983", "IdPlantilla": "order_notice" },
                    { "Tipo": "sms", "Remitente": "MYCOMPANY", "Mensaje": "Hi {{NAME}}, your order {{ORDER}} is ready" },
                    { "Tipo": "email", "Dominio": "mycompany.com", "Remitente": "notice@mycompany.com", "Asunto": "Your order {{ORDER}}", "MensajeEmail": "Hi {{NAME}}, your order is ready." }
]
Destinatarios
required
Array of strings
Example: Destinatarios=[{"Nombre":"Pedro Aicart","Telefono":"34600000001","Email":"pedro@example.com","Variables":[{"Nombre":"ORDER","Valor":"A-1234"}]}]

JSON array with the recipients. Each element accepts Nombre (optional), Telefono (international format without +, e.g. 34600000001), Email and Variables (array [{Nombre,Valor}] or plain object). You must provide phone and/or email according to the configured channels: if all channels are mobile channels (sms/rcs/whatsapp/voz) the phone is required; if the only channel is email, the email is required. With a push channel, the REFPUSH variable (alias of that recipient's linked device) is also a valid destination on its own. For example:


                  [
                    {
                        "Nombre": "Pedro Aicart",
                        "Telefono": "34600000001",
                        "Email": "pedro@example.com",
                        "Variables": [ { "Nombre": "ORDER", "Valor": "A-1234" } ]
                    }
]
Fecha
string
Example: Fecha=2026-08-01 10:30

Scheduled sending date and time in YYYY-MM-DD HH:mm format (CET/CEST). If omitted or empty, the campaign is sent immediately.

Intervaloprohibido
Array of strings
Example: Intervaloprohibido=[{"HoraInicio":"22:00","HoraFin":"09:00","Accion":"1"}]

Time window in which delivery must NOT happen (array of one object with HoraInicio, HoraFin and Accion: 1=postpone, 2=cancel). 00:00-00:00 = no restriction.

Referenciausuario
string
Example: Referenciausuario=July campaign

Free campaign reference for your listings (max 50 characters).

Eliminarduplicados
string
Enum: 0 1
Example: Eliminarduplicados=1

1 (default) removes duplicated recipients (same mobile or email) within the campaign. 0 keeps them.

Validarcanales
string
Enum: "NO" "SI"
Example: Validarcanales=NO

SI = validates the REAL configuration of every channel before creating the campaign (RCS agent and template in your account, validated email domain and template with HTML, WhatsApp Business account with the phone registered and the template APPROVED in Meta). Meant for PRE-PRODUCTION: it adds latency and is rate-limited per minute (Res -6 when exceeded). Use NO in production.

Resp
string
Enum: "TXT" "JSON" "XML"
Example: Resp=JSON

Response format of the call.
JSON - The response is returned as JSON
XML - The response is returned as XML
TXT - The response is returned as plain text

Request Body schema:

Parameters are sent in the body of the POST request, either as a JSON object (Content-Type application/json, RECOMMENDED) or as an application/x-www-form-urlencoded form. In the form format, array or object parameters are sent as a JSON-encoded string. Parameter names are case-insensitive. The detailed description of each parameter is in the parameters section of this operation.

Canales
required
Array of any
Destinatarios
required
Array of any
Fecha
string
Intervaloprohibido
Array of any
Referenciausuario
string
Eliminarduplicados
string
Validarcanales
string
Resp
string

Responses

Response Schema:
Array
Res
required
integer <int32>

Response of the requested function


>0 idEnvio of the created omnichannel campaign (correlates with the panel statistics).
-1 Authentication error.
-2 Not enough credits (you will also get Necesarios and Cred).
-3 Error in the request data (you will get an Error parameter with the description).
-4 Misconfigured channel (Error contains the channel and the reason; with VALIDARCANALES=SI the check includes templates, domain and Meta configuration).
-6 VALIDARCANALES=SI per-minute rate limit reached.

Error
string

When Res is negative, a description of the problem.

idEnvio
integer

Identifier of the omnichannel campaign (same as Res on success).

Destinatarios
integer

Number of processed recipients.

Alta
integer

Valid recipients registered in the campaign.

Duplicados
integer

Recipients discarded as duplicates (with ELIMINARDUPLICADOS=1).

Invalidos
integer

Recipients discarded for having neither a valid mobile nor a valid email.

Enviados
integer

Recipients queued in their first channel (0 if the campaign was scheduled).

Fallidos
integer

Recipients for which ALL channels failed at queueing time.

Pendientes
integer

Recipients not attempted yet (scheduled campaign, or campaign paused for lack of credits).

SinSaldo
integer

1 if sending stopped because of insufficient credits: the Pendientes recipients stay on hold and the campaign is retried automatically every hour (up to 7 days) as soon as there is balance.

CreditosUsados
number

Credits charged so far for this campaign (sum of what each queued message cost; only the channel actually used in each attempt is charged).

Programado
integer

1 if the campaign was scheduled (future FECHA); the system will launch it automatically.

Cred
number

Credits available in the account after the operation.

Request samples

Content type
{
  • "Canales": "[{\"Tipo\":\"sms\",\"Remitente\":\"MYCOMPANY\",\"Mensaje\":\"Hi {{NAME}}, your order {{ORDER}} is ready\"},{\"Tipo\":\"email\",\"Dominio\":\"mycompany.com\",\"Asunto\":\"Your order {{ORDER}}\",\"MensajeEmail\":\"Hi {{NAME}}, your order is ready.\"}]",
  • "Destinatarios": "[{\"Nombre\":\"Pedro Aicart\",\"Telefono\":\"34600000001\",\"Email\":\"pedro@example.com\",\"Variables\":[{\"Nombre\":\"ORDER\",\"Valor\":\"A-1234\"}]}]",
  • "Fecha": "2026-08-01 10:30",
  • "Intervaloprohibido": "[{\"HoraInicio\":\"22:00\",\"HoraFin\":\"09:00\",\"Accion\":\"1\"}]",
  • "Referenciausuario": "July campaign",
  • "Eliminarduplicados": "1",
  • "Validarcanales": "NO",
  • "Resp": "JSON"
}

Response samples

Content type
[
  • {
    }
]