Download OpenAPI specification:Download
In your user account you will find the API User and the API Token, both are necessary to make the REST API requests to the API functions. For security, requests must be made via POST and over the secure HTTPS protocol.
To use Basic Authentication you must include a header in the requests of the type: 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 APIUser:APIToken string and encode it in base64 using any base64encode function.
Version 7 is backward compatible with API versions from 3.3 and higher by changing the authentication method
Version 1.0 – 1.5: Last updated 2004. Upgrading to version 3.3 or higher is recommended. Versions not currently supported. Contact support for help with the migration.
Version 2.0 – 2.3: last updated 2009. Upgrading to versions 3.3 or higher is recommended. Versions not currently supported. Contact support for help with the migration.
Version 3.0 – 3.7: last updated 2012. Supported versions, compatible with higher versions. Switching to the latest version is recommended. Direct migration (v5 compatible with these versions). Contact support for information about the version change.
Version 4.0 to 4.4: Last updated 2014. Supported versions, 100% compatible with higher versions. We recommend upgrading to version 5 as it offers more functions and possibilities. New features will be added to version 5.
Version 5.0: Release and last update 2015. Version compatible with previous API versions from 3.3 (included).
Version 5.1: Last updated 2016. Version compatible with previous API versions from 3.3 (included).
This revision also adds some utilities at the majority request of Customers.
Version 5.2 to 5.7: Last updated 2017. New features already present in the panel such as Fail2Voice, link shortener, qrCode, landings, etc… Ability to upload PDF and office files to send them in SMS and Certified SMS.
Version 5.8: Last updated 2018. The possibility of sending variables per recipient is added. These variables are used to personalize both the sent message and the links and Landing Pages.
Version 6: Last revised 2021. New features.
Version 7: Last revised 2023. Authentication via API User and API Token. New features.
Empty connections\: It is important to bear in mind that a repeatedly erroneous connection will be treated by the system as spam and may end up temporarily blocking the connection. It is advisable to avoid making repeated connections with erroneous data or quick 'empty' connections (without sending anything) with the same data to obtain the number of credits or the same report.
To obtain reports optimally in real time, it is recommended to configure the API in the panel to receive them in a script on your website.
Response of the requests:
Most functions have a parameter called 'Resp'. This parameter defines the format of the response that will be returned. It can be TXT, JSON, XML or undefined.
We always recommend defining this parameter since all functions, for backward compatibility with previous API versions, respond by default (if this parameter is not defined) as they did in older versions. In these results from previous API versions, some of the variables included in this API version are omitted, which we consider important to facilitate integration and account information.
In the examples included it is always assumed that you have defined the parameter. If you are working directly with API version >= 5, we will assume that you have defined the parameter in all requests.
Recommended operation
The recommended operation, being the simplest and at the same time the most professional, is as follows
- PROCESS 1: Sending SMS, described in the EnviarSMS function of this document and in the following graphic in the box shaded in blue.
- PROCESS 2: Automatic reception of reports on your website (process described in the 'Reception of delivery reports' section and in the following graphic inside the box shaded in green.
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.
basicFunction for sending SMS messages from applications. Definition of required and optional parameters.
ATTENTION: Check the real-time report reception section if you want to receive the status of the sent messages in real time in a script on your website.
| Remitente required | string Example: Remitente=MIEMPRESA The phone number, company name or name of the person sending. If left blank, the sender will be the mobile phone or default sender registered by the user sending the message. ATTENTION If it is alphanumeric the Maximum is 11 characters. |
| Destinatarios required | Array of arrays Example: Destinatarios=[{"Movil":"34600000000","Variable_1":"Pedro"},{"Movil":"34600000001","Variable_1":"Ana"}] JSON array with the SMS recipients. You can add variables if you want to personalize the Message per recipient. For example:
|
| Mensaje required | string Example: Mensaje=A la atención de Ana, te recordamos tu cita en la Clínica Ejemplo el próximo martes 23, pulse en el siguiente link para confirmar o cancelar la cita. (SMSLAND:2:idLanding) Message that will be sent to the recipient(s). It can include Files, shortened Links, unsubscribe link, images, QRCODE, Landings etc... To include attachments/files or any of these elements, review the documentation in Appendix 1. In Appendix 1 you will see how to incorporate Landings, surveys, qrcode, images, etc... |
| Fecha | string Example: Fecha=2022-10-01 15:10 Date on which the send is scheduled, the message will be sent on that date. Empty by default, which means send immediately. Format Year-Month-day hour:minute. The time reference is CET/CEST (Spain time zone). |
| Referenciausuario | string Example: Referenciausuario=Tu referencia Parameter used as a reference for the user. If you choose to receive the report at a URL, you will receive this parameter in the send result. |
| Report | integer Example: Report=0 If you want to receive reports by email or in a script on your website (by activating the API configuration in the user panel). |
| Idmensaje | integer Example: Idmensaje=1765987 Optional parameter. It is used to unify sends within the same message code (idMensaje). This way, you will be able to consult in the panels the delivery statistics of several grouped messages. This parameter corresponds to the Msgid/idMensaje obtained in a previous request. If you use this parameter, the sender will be forced to that of the first message sent (the one that returned the Msgid/idMensaje). Additionally, it will not be allowed to send two messages with the same idMensaje code to the same mobile. |
| Fail2voice | integer Example: Fail2voice=0 The Fail2Voice service allows converting the message into voice and delivering it as a call in cases where SMS delivery to the recipient is not possible (for example, the recipient is a landline number).
|
| Lenguajevoz | string Example: Lenguajevoz=0 (Only if Fail2Voice=1) Language into which the text message will be translated to voice. The list of possible languages is defined in the Voice message sending API (for example es-ES for Spanish. |
| Remitentevoz | integer Example: Remitentevoz=0 (Only if Fail2Voice=1) It is the calling phone. The sender of the call. It must be in international format and be validated in the Mensatek panels. Validation is a simple process that you will carry out in a few seconds and does not entail any cost for your mobile or landline. It is simply a security matter. |
| Unicode | integer Example: Unicode=0 Activate Unicode to be able to send any character outside the GSM standard.
|
| Obviarlistanegra | integer |
| Fixutf8 | integer Example: Fixutf8=0 Sometimes, when developers use an encoding that is not UTF8, special characters can be interpreted incorrectly. If this happens, activate (set to 1) this parameter to solve it.
|
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Type of response to return as the result of the call.
|
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.
| Remitente required | string |
| Destinatarios required | Array of any |
| Mensaje required | string |
| Fecha | string |
| Referenciausuario | string |
| Report | integer |
| Idmensaje | integer |
| Fail2voice | integer |
| Lenguajevoz | string |
| Remitentevoz | integer |
| Unicode | integer |
| Obviarlistanegra | integer |
| Fixutf8 | integer |
| Resp | string |
| Res required | integer <int32> Response of the requested function
|
| Error | string In case of Res -3, you will get a descriptive error of the problem in this parameter. |
| Destinatarios | Array of arrays Number of recipients. Only obtained if the 'Resp' parameter (response type) is specified and the result is positive (messages are sent) |
| Msgid | integer (For backward compatibility with previous versions, duplicate of idMensaje). Identifier of the message or group of messages sent. It serves, for example, as identification to obtain the report of the sent message (if the phone has been unsubscribed, delivery times, etc…). It will be received in the requests if you activate real-time report reception in a script on your website/server. |
| idMensaje | integer Identifier of the message or group of messages sent. It serves, for example, as identification to obtain the report of the sent message (if the phone has been unsubscribed, delivery times, etc…). It will be received in the requests if you activate real-time report reception in a script on your website/server. |
| Cred | double Credits remaining in the user account after the send. |
| Mensajes | integer Number of SMS messages sent. Only obtained if the 'Resp' parameter (response type) is specified and the result is positive (messages are sent) |
| NoEnviados | integer Number of messages not sent. Normally because the recipient is duplicated or because the mobile is not correct. Only obtained if the 'Resp' parameter (response type) is specified and the result is positive (messages are sent) |
| CreditosUsados | integer Number of credits used in the send. Only obtained if the 'Resp' parameter (response type) is specified and the result is positive (messages are sent). |
| CreditosNecesarios | integer Number of credits needed to send the message. Only if the message cannot be sent due to lack of credits. |
{- "Remitente": "MIEMPRESA",
- "Destinatarios": "[{\"Movil\":\"34600000000\",\"Variable_1\":\"Pedro\"},{\"Movil\":\"34600000001\",\"Variable_1\":\"Ana\"}]",
- "Mensaje": "A la atención de Ana, te recordamos tu cita en la Clínica Ejemplo el próximo martes 23, pulse en el siguiente link para confirmar o cancelar la cita. (SMSLAND:2:idLanding)",
- "Fecha": "2022-10-01 15:10",
- "Referenciausuario": "Tu referencia",
- "Report": "0",
- "Idmensaje": "1765987",
- "Fail2voice": "0",
- "Lenguajevoz": "0",
- "Remitentevoz": "0",
- "Unicode": "0",
- "Obviarlistanegra": 0,
- "Fixutf8": "0",
- "Resp": "JSON"
}[- {
- "Res": "10",
- "Error": "Falta parámetro obligatorio",
- "Destinatarios": "10",
- "Msgid": "12000",
- "idMensaje": "12000",
- "Cred": "12000",
- "Mensajes": "2",
- "NoEnviados": "0",
- "CreditosUsados": "18",
- "CreditosNecesarios": "18"
}
]REAL-TIME RECEPTION OF DELIVERY STATUSES IN A SCRIPT ON YOUR SERVER.
By activating the option to receive reports in real time in a script on your server from your user panel, you will receive a POST request with the indicated format each time each sent message changes status.
You can configure receiving the requests with basic authentication and in JSON or FORM-DATA format
Parámetros recibidos en su script en petición POST con la configuración especificada en su panel de usuario/configuración API.
| Servicio required | string Type of report you are receiving (the goal is to distinguish between the reports of the different services). The services referred to in this specification will receive | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Resultado required | integer Status of the sent message indicated by the destination operator. The possible statuses are:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Remitente required | string Sender used in the send. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Movil required | string Recipient to which the report refers. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Fecha required | string Date of the report (date on which the operator serving the destination mobile communicates the new status) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Segundos required | string Time elapsed until the status change (normally delivery time to the mobile) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| idMensaje required | integer Unique identifier received as a response in the send function (idMensaje received in the send function) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Referencia required | string User reference that was sent during the send request. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| idReport | integer Unique identifier of the message. |
{- "Servicio": "SMSMASIVO",
- "Resultado": "11",
- "Remitente": "TUEMPRESA",
- "Movil": "destino@dominio.com",
- "Fecha": "2020-12-03 11:14:24",
- "Segundos": "3",
- "idMensaje": "10573758",
- "Referencia": "Su referencia si la indicó",
- "idReport": "1234567890"
}RECEPTION OF SMS MESSAGES RECEIVED ON YOUR CONTRACTED NUMBER
The configuration of the address of the script (endpoint) where you want to receive a request for each message received on your number is done from the user panel. The contracting of SMS message reception numbers is done through your sales representative and requires identity verification. You can contract as many phone numbers as you wish. To find out about coverage and the possibility of international reception, consult your sales representative.
When sending SMS Contract it is not necessary to contract a number, the system will take care of assigning a generic one from the pool of operator numbers. To receive messages as a reply to normal SMS, it is necessary to contract a number.
You can configure receiving the requests with basic authentication and in JSON or FORM format
Parámetros recibidos en su script en petición POST con la configuración especificada en su panel de usuario/configuración API.
| Servicio required | string Type of service from which the request is being received. In this case it is always |
| timestamp required | integer Unix TimeStamp of the moment the SMS message is received on the number. |
| Fecha required | string Date of reception sent by the operator). |
| Movil required | string Mobile number that receives the message. |
| Remitente required | string Sender of the message, normally the mobile that sends the message. |
| Mensaje required | string Message received |
| idR required | integer identification of the original message if this is a reply to a sent one (internal identification) |
| idM required | integer Identification of the original message if this is a reply to a previously sent one. The idM matches the idMensaje returned in the send function. |
| EsCert required | boolean In the event of being a reply to a previously sent message, it indicates whether the original message was certified (it would be an SMS Contract) or not. |
| Referencia | string In the event that this message is a reply to a previously sent one, here you will receive the user reference of the message sent via the send function |
{- "Servicio": "SMSRECIBIDO",
- "timestamp": "1664795529",
- "Fecha": "2020-12-03 11:14:24",
- "Movil": "34600000000",
- "Remitente": "MIEMPRESA",
- "Mensaje": "MIEMPRESA",
- "idR": "56399876",
- "idM": "78334454",
- "EsCert": "true",
- "Referencia": "667887TR"
}Function to cancel an SMS previously scheduled via the send function.
| Idmensaje required | integer Example: Idmensaje=1283876988 Identifier returned in the send function. |
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Type of response to return as the result of the call.
|
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.
| Idmensaje required | integer |
| Resp | string |
| Res required | integer <int32> Response of the requested function
|
| IDMENSAJE | integer Number of the identifier of the message actually cancelled. |
| CRED required | double Credits remaining in the user account after the cancellation. |
| CREDR | double Credits recovered in the cancellation. |
{- "Idmensaje": "1283876988",
- "Resp": "JSON"
}[- {
- "Res": "1",
- "IDMENSAJE": "12000",
- "CRED": "12000",
- "CREDR": "9"
}
]Function to reschedule an SMS previously scheduled via the send function to be processed in the future..
| Idmensaje required | integer Example: Idmensaje=1283876988 Identifier returned in the send function. |
| Fecha required | string Example: Fecha=2022-12-03 11:15 New send date. It is the date on which the message will be scheduled to be sent. It must be later than the current date/time. The format must be YYYY-MM-DD HH:mm |
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Type of response to return as the result of the call.
|
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.
| Idmensaje required | integer |
| Fecha required | string |
| Resp | string |
| Res required | integer <int32> Response of the requested function
|
| Cred required | double Credits remaining in the user account. |
{- "Idmensaje": "1283876988",
- "Fecha": "2022-12-03 11:15",
- "Resp": "JSON"
}[- {
- "Res": "10",
- "Cred": "12000"
}
]Obtaining the report / status of an SMS identified by the idMensaje (message identifier) obtained in the send function. It is recommended to use report reception on your website since you will receive the status changes of the sent messages in real time. As you can send to more than one recipient, the result is received as an array of results depending on the chosen response.
| Idmensaje | integer Example: Idmensaje=1283876988 Identifier returned in the send function. |
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Type of response to return as the result of the call.
|
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.
| Idmensaje | integer |
| Resp | string |
| Res required | integer <int32> Response of the requested function
|
| Destinatarios required | integer Number of recipients in the message. |
| Cred | double Credits remaining in the user account. |
| Informe required | Array of arrays Array per recipient with the message data. The following parameters will be received:
|
{- "Idmensaje": "1283876988",
- "Resp": "JSON"
}[- {
- "Res": "10",
- "Destinatarios": "10",
- "Cred": "12000",
- "Informe": "[{'Fecha':'2021-09-04 19:37:21','Tiempo':3,'Telefono':34601234567,'Resultado':11,'Estado':'Entregado al teléfono'},{'Fecha':'2021-09-04 19:37:27','Tiempo':3,'Telefono':34656789012,'Resultado':11,'Estado':'Entregado al teléfono'}]"
}
]Function for uploading to the user's file Library so they can be attached in a later SMS send. ATTENTION There is a limit on the number of files and the space used per Customer. You can contact Support to increase it. In any case it is good practice to delete the file once it is no longer needed.
| Nombre | any Example: Nombre=mifichero.pdf Required only in case of Tipo=BASE64. Name, including the extension, with which the file will be renamed once uploaded. Names must include the extension and have a maximum of 15 characters (letters and numbers only). |
| Tipo required | any Example: Tipo=mifichero.pdf How the file is sent. The possible values are FILES or BASE64. |
| Contenido | any Example: Contenido=JVBERi000000............. Content of the file in Base64 if the Tipo is BASE64. |
| Autoborrado | any Example: Autoborrado=Si (Only useful for Certified SMS and SMS Contract). The user's file library has a storage and file number limit. A File is only needed until the message is certified. Once the message is certified, the file is copied to a secure location for safekeeping so it is accessible by the recipient without needing to keep it in the user library. If you want the system to automatically delete the file when certifying the message, activate this option. Do this only if the file is going to be used in a single Certified SMS/Contract. |
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Type of response to return as the result of the call.
|
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.
| Nombre | string |
| Tipo required | string |
| Contenido | string |
| Autoborrado | string |
| Resp | string |
| Res required | integer <int32> Response of the requested function.
|
| Nombre | string The new name of the file is included. Only if Res=1. |
| Error | string In case of Res -3, you will get a descriptive error of the problem in this parameter. |
| Cred | double Credits remaining in the user account after the send. |
{- "Nombre": "mifichero.pdf",
- "Tipo": "mifichero.pdf",
- "Contenido": "JVBERi000000.............",
- "Autoborrado": "Si",
- "Resp": "JSON"
}[- {
- "Res": "-10",
- "Nombre": "fichero.pdf",
- "Error": "Falta parámetro obligatorio",
- "Cred": "12000"
}
]Function to list the files in the user's library. Returns an array/listing with the files within the user account.
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Type of response to return as the result of the call.
|
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.
| Resp | string |
| Res required | integer <int32> Response of the requested function.
|
| Error | string In case of Res -3, you will get a descriptive error of the problem in this parameter. |
| Ficheros required | Array of arrays Array with the list of documents. The following parameters will be received:
|
| Cred | double Credits remaining in the user account after the send. |
{- "Resp": "JSON"
}[- {
- "Res": "-10",
- "Error": "Falta parámetro obligatorio",
- "Ficheros": "<code>[{'Fecha':'2021-09-04 19:37:21','Nombre':'nombre.pdf','Ext':'PDF'},{'Fecha':'2021-09-04 19:37:27','Nombre':'otro.docx','Ext':'DOCX'}]</code>",
- "Cred": "12000"
}
]Function to delete a file from the user's Library. ATTENTION you should only delete a file when the service has already finished (the file will no longer be accessed). Until that moment the file must be available in the user's library.
| Nombre required | any Example: Nombre=mifichero.pdf Name of the file to delete. |
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Type of response to return as the result of the call.
|
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.
| Nombre required | string |
| Resp | string |
| Res required | integer <int32> Response of the requested function.
|
| Error | string In case of Res -3, you will get a descriptive error of the problem in this parameter. |
| Cred | double Credits remaining in the user account after the send. |
{- "Nombre": "mifichero.pdf",
- "Resp": "JSON"
}[- {
- "Res": "1",
- "Error": "Falta parámetro obligatorio",
- "Cred": "12000"
}
]Function that returns the number of credits in the account. It is a function of very sporadic use since most functions return the number of Credits remaining for the user in their responses. Therefore, it is usually used simply as a functionality test or to obtain the number of credits occasionally
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Type of response to return as the result of the call.
|
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.
| Resp | string |
| Res required | integer <int32> Response of the requested function
|
| Cred required | double Credits remaining in the user account after the send. |
{- "Resp": "JSON"
}[- {
- "Res": "10",
- "Cred": "12000"
}
]Returns all the SMS templates configured in your account (those managed from the panel under Template Management), in a Nombre => Contenido object. It is useful for reusing the text of a template as the MENSAJE parameter of the EnviarSMS function from your application.
If you have two templates with the same Nombre, in the resulting object the oldest one will prevail (the last one written in the object). It is recommended to keep unique names for your templates.
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Type of response to return as the result of the call.
|
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.
| Resp | string |
| Res required | integer <int32> Response of the requested function
|
| Total | integer Number of SMS templates returned. |
| Plantillas | object Object with all the SMS templates of the account, in |
{- "Resp": "JSON"
}[- {
- "Res": "1",
- "Total": "2",
- "Plantillas": "{\"Bienvenida\":\"Hola (NOMBRE), gracias por darte de alta.\",\"Aviso cita\":\"Recordatorio: tienes una cita el (FECHA) a las (HORA).\"}"
}
]SEND FILES, IMAGES, LINKS, QRCODE, SMS LANDING, ETC.. IN THE MESSAGE:
Links are sent following the guidelines below and specifying the parameter Links=1.
The format is (LINK TYPE(required):PROTOCOL(required):CONTENT) where:
LINK TYPE: It can be any of the words described below:
FILE to include an attachment/file previously uploaded to the library with the "CargarFichero" function; content will be the name of the existing file in the library.
IMG to include an image previously uploaded to your image library in your account. Content will be the name of the image uploaded to your image library.
LINK to insert a shortened external link. The content, in this case, will be the link to which we should redirect.
SMSLAND to insert landings, the content in this case is the identifier of the landing. Remember that this landing can be personalized per recipient using the recipient variables (Variable_1 to Variable_10)
QRCODE Insert a QRCODE code in the message.
DATAMATRIX Insert a DATAMATRIX code in the message.
PDF417 Insert a PDF417 code in the message.
TICKET Insert an entry ticket or multi-use voucher.
PROTOCOL: It has the following possible values:
0 Do not include protocol
1 Include http:// before the link (non-secure connection protocol)
2 Include https:// before the link (secure connection protocol)
CONTENT: The content to insert (file, image, url, QRCode message, etc..)
• INSERT FILES FROM YOUR LIBRARY: Insert the following code in the message:
(FILE:2:NombreDelFichero.pdf)
For example, the message would be: Hola, te envío el contrato (FILE:2:contrato.pdf)
In this example a message would be sent with an attachment contrato.pdf
• INSERT IMAGES: Insert the following code in the message:
(IMG:2:NombreDeLaImagen.jpg)
For example, the message would be: Hola, te envío mi imagen (IMG:2:foto.jpg), espero que te guste.
• INSERT LINKS: Insert the following code in the message:
(LINK:2:http://www.dominio.com)
• INSERT SMS LANDINGS: Insert the following code in the message:
(SMSLAND:2:idLanding) Where idLanding is the identifier of the SMS Landing in your account.
• INSERT QRCODES: Insert the following code in the message: You can in turn insert links within the message.
(QRCODE:2:mensaje que habrá dentro del QRCODE)
• INSERT DATAMATRIX: Insert the following code in the message: You can in turn insert links within the message.
(DATAMATRIX:2:mensaje que habrá dentro del Código)
• INSERT PDF417: Insert the following code in the message: You can in turn insert links within the message.
(PDF417:2:mensaje que habrá en el Código)
• INSERT TICKETS/VOUCHERS/ENTRIES: It will be sent as a QRCode that, when read, can be used to manage entries or vouchers. Insert the following code in the message: (TICKET:2:número) where ‘número’ is an integer indicating the number of times the ticket can be used before being invalidated. For example a 10-trip voucher would be sent as (TICKET:2:10)
You can use the standard GSM 3.38 alphabet (default) or the Unicode character set by sending Unicode=1 in the request
It supports any character and you can even add emojis. You must activate Unicode=1 in the request. Operators charge one SMS up to 70 characters; if 70 characters are exceeded, one SMS is charged for every 67 characters.
The characters allowed in the message, if Unicode is not chosen, are those included in the GSM 3.38 standard (standard SMS alphabet). You must bear in mind that the € takes up two characters (it is sent as a combination of two) and that closed accents are not in the standard (except for é), so if included, they will be changed to the most similar character.
The characters supported in the standard are included in the table below; those in the extension table (further to the right) take up two characters and those in the first one (Basic on the left) take up 1 character.
For the sender we advise you:
1.- Numbers only (a mobile or landline in international format, e.g. +34600000000) up to 15 digits
2.- Letters, numbers, & and underscore character only, up to 11 characters. E.g. MiRemitente