SMS Sending API / BULK SMS (7.0)

Download OpenAPI specification:Download

INTRODUCTION

Integration API for sending SMS messages from applications via https requests.

AUTHENTICATION

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.

COMPATIBILITY AND VERSIONS

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.

IMPORTANT NOTES

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.

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 SMS and Bulk SMS

/EnviarSMS

Function 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.

Authorizations:
basicAuth
query Parameters
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:


                  [
                    {
                        "Movil": "34600000001",
                         "Variable_1": "variable 1 (up to variable_10) for each recipient "
                     },
                     {
                         "Movil": "34600000002",
                         "Variable_1": "Variable_1 to personalize the message of the second recipient. Only the Movil is required in the array and, if variables are used, from Variable_1 to Variable_10"
                     }
                  ]
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).
0 - 'Do not use the service'
1 - Use Fail to Voice

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.
0 - Send in GSM 3.38 standard - Default - (see list of characters in appendix 1)
1 - Send in Unicode (supports any character)

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.
0 - 'I am sending in UTF8, no need to fix the encoding'
1 - fix special characters

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

Type of response to return as the result of the call.
ANT - (Deprecated). Kept for backward compatibility with previous versions
JSON - The response will be returned in JSON
XML - The response will be returned in XML
TXT - The response will be returned in Text format

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.

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

Responses

Response Schema:
Array
Res
required
integer <int32>

Response of the requested function
>0 Number of messages sent.
-1 Authentication error.
-2 Not enough credits.
-3 Error in the call data. Required parameters are missing. In this case, you will get an additional parameter called Error with the description of the error.

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.

Request samples

Content type
{
  • "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"
}

Response samples

Content type
[
  • {
    }
]

Reception of delivery reports and status changes of sent messages

https://{SuDominio}/path/de/su/script/de/recepción/de/reports

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

Authorizations:
basicAuth
Request Body schema:

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 SMSMASIVO

Resultado
required
integer

Status of the sent message indicated by the destination operator. The possible statuses are:

STATUS DESCRIPTION MEANING
`0` Awaiting delivery Meaning: The operator is waiting to receive the delivery confirmation from the mobile. If this status remains for more than 5-10 seconds, it normally indicates that the destination phone is turned off or out of coverage. The operator will attempt delivery as soon as the mobile becomes operational again.
`1` Scheduled Meaning: The message is scheduled. It will be sent at the time indicated in the [Fecha] section
`2` Awaiting delivery Meaning: The operator is waiting to receive the delivery confirmation from the mobile. If this status remains for more than 5-10 seconds, it normally indicates that the destination phone is turned off or out of coverage. The operator will attempt delivery as soon as the mobile becomes operational again.
`10` Awaiting delivery Meaning: The operator is waiting to receive the delivery confirmation from the mobile. If this status remains for more than 5-10 seconds, it normally indicates that the destination phone is turned off or out of coverage. The operator will attempt delivery as soon as the mobile becomes operational again.
`11` Delivered to the phone Meaning: The operator serving the mobile has delivered the message to the recipient.
`13` Delivered to the phone Meaning: The message has been delivered to the destination phone. In the event that the service is a Certified SMS, the system is certifying delivery and content. You can verify the delivery time in seconds and the date/time at which it was delivered. If the delivery time exceeds 5-10 seconds, the phone was probably turned off or out of coverage.
`14` Certified SMS Delivered and Certified Meaning: The Certified SMS has been delivered and Certified. You have a certificate in PDF format with Time stamping.
`15` Awaiting response in SMS Contract via YES/I Accept reply Meaning: In an SMS Contract, one of the contracting options is the YES/I Accept reply to the Certified SMS, closing a contract; the system has delivered the Certified SMS and is awaiting a reply from the receiver.
`16` Response received. Certifying Meaning: The response to the Certified SMS closing an SMS Contract has been received. The result is being certified.
`17` SMS Contract via certified response Meaning: The response has been received and the contract is available for download.
`50` The Network responds that the phone does not exist Meaning: The operator that was serving the mobile has indicated that the phone no longer exists or has been unsubscribed. It is advisable to contact the recipient to obtain their new mobile number.
`51` Delivery to the phone failed Meaning: There has been a repeated failure in delivery to this phone. As a quality measure, exclusively at MENSATEK, we retry deliveries several times at no additional cost to you, in this case to avoid temporary phone problems. In all likelihood this phone no longer exists.
`52` Delivery to the network failed Meaning: Error of the operator serving the mobile, Contact Support to check it.
`53` The message has expired. (The phone remains non-operational) Meaning: The mobile has been turned off for a prolonged period (16-72 hours depending on the operator). As a quality measure exclusively at MENSATEK, we retry delivery over several periods at no cost to you; if, after the operator repeatedly tells us that the phone remains off, this message appears. The Date data is the last delivery attempt.
`54` Number on Blacklist Meaning: The number is on the operator's blacklist or on your account's blacklist.
`55` Number Blocked Meaning: The number is blocked.
`70` Delivered to the phone. Delivery time not available Meaning: The message has been delivered by the operator serving the mobile but there is no specific data on the time of delivery due to a failure in mobile->Operator communication.
`101` The message has expired. (The phone remains non-operational) Meaning: The mobile has been turned off for a prolonged period (16-72 hours depending on the operator). As a quality measure exclusively at MENSATEK, we retry delivery over several periods at no cost to you; if, after the operator repeatedly tells us that the phone remains off, this message appears. The Date data is the last delivery attempt.
`102` User unsubscribed Meaning: The user is unsubscribed.
`103` The message has expired. (The phone remains non-operational) Meaning: The mobile has been turned off for a prolonged period (16-72 hours depending on the operator). As a quality measure exclusively at MENSATEK, we retry delivery over several periods at no cost to you; if, after the operator repeatedly tells us that the phone remains off, this message appears. The Date data is the last delivery attempt.
`104` The phone is not correct Meaning: The number is not correct, check the number and correct it.
`106` Delivered to the phone. Delivery time not available Meaning: The message has been delivered by the operator serving the mobile but there is no specific data on the time of delivery due to a failure in mobile->Operator communication.
`110` The phone does not exist Meaning: The operator that was serving the mobile has indicated that the phone no longer exists or has been unsubscribed. It is advisable to contact the recipient to obtain their new mobile number.
`111` Phone unsubscribed Meaning: The operator that was serving the mobile has indicated that the phone no longer exists or has been unsubscribed. It is advisable to contact the recipient to obtain their new mobile number.
`112` Phone without service Meaning: The operator that was serving the mobile has indicated that the phone no longer has service. It is advisable to contact the recipient to obtain their new mobile number.
`113` The message has expired. (The phone remains non-operational) Meaning: The mobile has been turned off for a prolonged period (16-72 hours depending on the operator). As a quality measure exclusively at MENSATEK, we retry delivery over several periods at no cost to you; if, after the operator repeatedly tells us that the phone remains off, this message appears. The Date data is the last delivery attempt.
`120` Failure in the destination SMSC Meaning: The SMSC of the destination operator has returned a serious error. It is probably a serious incident at the operator; the message is held to ensure deliveries.
`121` Congestion in the destination SMSC Meaning: The destination operator is congested. Mensatek (exclusive service) is retrying delivery through priority channels (this error is temporary and should be resolved quickly). 
`122` Failure in the destination SMSC Meaning: The SMSC of the destination operator has returned a serious error. It is probably a serious incident at the operator; the message is held to ensure deliveries.
`130` Error in the destination Phone Meaning: The operator that was serving the mobile has indicated that the phone no longer exists or has been unsubscribed. It is advisable to contact the recipient to obtain their new mobile number.
`123` Phone turned off or out of coverage Meaning: The operator serving the mobile indicates that the phone is turned off or out of coverage.
`124` Phone without SMS service Meaning: The operator serving the mobile indicates that the phone does not have an active SMS service.
`125` Phone Blocked or restricted Meaning: The operator serving the mobile indicates that this mobile has its services blocked or restricted.
`126` Phone busy Meaning: The operator serving the mobile indicates that this mobile cannot receive the message because the subscriber is busy.
`131` The Mobile has exceeded the memory capacity (the message does not fit) Meaning: There has been a repeated failure in delivery to this phone. As a quality measure, exclusively at MENSATEK, we retry deliveries several times at no additional cost to you, in this case to avoid temporary phone problems. 
`132` The Mobile cannot receive messages Meaning: There has been a repeated failure in delivery to this phone. As a quality measure, exclusively at MENSATEK, we retry deliveries several times at no additional cost to you, in this case to avoid temporary phone problems. If this error persists, in all likelihood this phone no longer exists.
`133` Failure in destination mobile (unsubscribed). Meaning: The operator that was serving the mobile has indicated that the phone no longer exists or has been unsubscribed. It is advisable to contact the recipient to obtain their new mobile number.
`134` Problem in the destination mobile. Retrying... Meaning: The mobile could not receive the message. The operator has indicated a temporary error of the terminal. As a quality measure exclusive to Mensatek, we will retry delivery several times at 15-minute intervals. We will only mark the message as failed if all delivery attempts are ultimately erroneous, in which case we will indicate the reason (normally a mobile with coverage problems or being unsubscribed).
`135` Problem in the destination network. Retrying... Meaning: The mobile could not receive the message. The operator has indicated an error. As a quality measure exclusive to Mensatek, we will retry delivery several times at 15-minute intervals. We will only mark the message as failed if all delivery attempts are ultimately erroneous, in which case we will indicate the reason (normally a mobile with problems or unsubscribed).
`136` Phone without service Meaning: The operator that was serving the mobile has indicated that the phone no longer has service or has been recently unsubscribed. It is advisable to contact the recipient to obtain their new mobile number.
`137` Phone unsubscribed Meaning: The operator that was serving the mobile has indicated that the phone no longer exists or has been unsubscribed. It is advisable to contact the recipient to obtain their new mobile number.
`140` Destination error, contact support Meaning: Contact support. There is a problem sending your messages to the destination operator/country.
`141` Destination error, contact support Meaning: Contact support. There is a problem sending your messages to the destination operator/country.
`150` The destination network has temporarily closed message delivery Meaning: Contact support. There is a problem sending your messages to the destination operator/country.
`160` SMS Contract. The user has accessed the Contract/PDF Meaning: In an SMS Contract in which a PDF is attached for signature, this status indicates that the recipient has accessed the document. 'Variables' is sent as a JSON string.
`161` SMS Contract. Contract Read Meaning: The recipient has read the document (has seen it through to the end).
`162` SMS Contract. Contract Accepted Meaning: The recipient/signer has accepted the contract.
`163` SMS Contract. Contract signed Meaning: The recipient has signed the contract.
`180` SMS Contract. Final Status. Contract Accepted by basic acceptance Meaning: The recipient has finalized the signature through explicit acceptance of the contract. The contract is available for download. 'Variables' is sent as a JSON string.
`181` SMS Contract. Final Status. Contract Accepted and signed with biometric signature Meaning: The recipient has accepted the contract and signed it with a biometric signature. The certified contract is available for download. 'Variables' is sent as a JSON string.
`190` SMS Contract. Contract rejected Meaning: The recipient has rejected the contract. 'Variables' is sent as a JSON string.
`195` SMS Contract. Contract expired Meaning: The contract has expired without finalizing the signature. 'Variables' is sent as a JSON string.
`1000` Awaiting delivery Meaning: The operator is waiting to receive the delivery confirmation from the mobile. If this status remains for more than 5-10 seconds, it normally indicates that the destination phone is turned off or out of coverage. The operator will attempt delivery as soon as the mobile becomes operational again.
`1001` Scheduled Meaning: The message is scheduled. It will be sent at the time indicated in the [Fecha] section
`1002` Sending Meaning: Delivering to the destination operator/Waiting for the destination operator to confirm receipt of the message in order to proceed to deliver it to the mobile.
`1003` Problem in the destination mobile. Retrying... Meaning: There has been a repeated failure in delivery to this phone. As a quality measure, exclusively at MENSATEK, we retry deliveries several times at no additional cost to you, in this case to avoid temporary phone problems. In all likelihood this phone no longer exists.
`5000` SMS Contract. GPS location of the signer. Meaning: Sent only in the event that the signer accepts the GPS location.
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.

Request samples

Content type
{
  • "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 replies to SMS if you have an exclusive number

https://{SuDominio}//path/de/su/script/de/recepción/de/sms

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

Authorizations:
basicAuth
Request Body schema:

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 SMSRECIBIDO regardless of whether it is a reply to an SMS, Certified SMS, SMS Contract or a message originated by the client.

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

Request samples

Content type
{
  • "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"
}

Cancel Scheduled SMS

/CancelarSMS

Function to cancel an SMS previously scheduled via the send function.

Authorizations:
basicAuth
query Parameters
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.
ANT - (Deprecated). Kept for backward compatibility with previous versions
JSON - The response will be returned in JSON
XML - The response will be returned in XML
TXT - The response will be returned in Text format

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.

Idmensaje
required
integer
Resp
string

Responses

Response Schema:
Array
Res
required
integer <int32>

Response of the requested function


>0 Number of recipients cancelled.
-1 Authentication error.
-2 Incorrect data (You can only cancel your own identifiers; if you try to cancel message identifiers of another user, it could be considered an attack and limit the access of your connection).
-3 Error in the call data. Required parameters are missing. In this case, you will get an additional parameter called Error with the description of the error.
-4 The message has already been sent/cannot be cancelled.
-5 The message has already been cancelled/cannot be cancelled.

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.

Request samples

Content type
{
  • "Idmensaje": "1283876988",
  • "Resp": "JSON"
}

Response samples

Content type
[
  • {
    }
]

Reschedule Scheduled SMS

/ReprogramarSMS

Function to reschedule an SMS previously scheduled via the send function to be processed in the future..

Authorizations:
basicAuth
query Parameters
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.
ANT - (Deprecated). Kept for backward compatibility with previous versions
JSON - The response will be returned in JSON
XML - The response will be returned in XML
TXT - The response will be returned in Text format

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.

Idmensaje
required
integer
Fecha
required
string
Resp
string

Responses

Response Schema:
Array
Res
required
integer <int32>

Response of the requested function


>0 Number of messages rescheduled.
-1 Authentication error.
-2 Incorrect data (You can only modify scheduled messages with identifiers sent from your account; if you try to modify message identifiers of another user, it could be considered an attack and limit the access of your connection).
-3 Error in the call data. Required parameters are missing. In this case, you will get an additional parameter called Error with the description of the error.
-4 The message has already been sent/cannot be rescheduled.
-5 The message is cancelled/cannot be rescheduled.
-6 The new date is not correct.
-7 The new date has already passed.

Cred
required
double

Credits remaining in the user account.

Request samples

Content type
{
  • "Idmensaje": "1283876988",
  • "Fecha": "2022-12-03 11:15",
  • "Resp": "JSON"
}

Response samples

Content type
[
  • {
    }
]

Simple SMS Report Query

/GetReportSMS

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.

Authorizations:
basicAuth
query Parameters
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.
ANT - (Deprecated). Kept for backward compatibility with previous versions
JSON - The response will be returned in JSON
XML - The response will be returned in XML
TXT - The response will be returned in Text format

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.

Idmensaje
integer
Resp
string

Responses

Response Schema:
Array
Res
required
integer <int32>

Response of the requested function


1 Successful operation.
-1 Authentication error.
-2 You do not have permission to query this message.
-3 Error in the call data. Required parameters are missing. In this case, you will get an additional parameter called Error with the description of the error.
-4 Error in response/You do not have permission to query this message.

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:
Fecha Date of the report
Tiempo : Delivery time to recipient
Telefono : Phone to which the report refers
Resultado : Numeric result (see statuses in the report reception callback)
Estado : Text of the Result

Example: [{'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'}]

Request samples

Content type
{
  • "Idmensaje": "1283876988",
  • "Resp": "JSON"
}

Response samples

Content type
[
  • {
    }
]

Upload a file to the library

/CargarFichero

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.

Authorizations:
basicAuth
query Parameters
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.
FILES (Recommended), it is assumed that the file is sent as a normal xwww-form-urlencoded POST
BASE64 Expects to receive the content of the file in the Contenido variable encoded in 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.
ANT - (Deprecated). Kept for backward compatibility with previous versions
JSON - The response will be returned in JSON
XML - The response will be returned in XML
TXT - The response will be returned in Text format

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.

Nombre
string
Tipo
required
string
Contenido
string
Autoborrado
string
Resp
string

Responses

Response Schema:
Array
Res
required
integer <int32>

Response of the requested function.
1 Correct
-1 Authentication error.
-3 Error in the call data. Required parameters are missing. In this case, you will get an additional parameter called Error with the description of the error.
-10 You have exceeded your file storage capacity, contact support to request more space.
-11 File format not supported, PDF, Excel, Word and VCF are supported. In the case of documents, PDF is recommended for maximum compatibility on phones.
-12 You indicated that you would send a file in BASE64 mode but you did not send the content.
-13 You indicated that you would send a file in FILES mode and the content did not arrive.
-15 You must specify Tipo FILES or BASE64.
-16 File too large, consult support to increase limits.
-17 An error has occurred while uploading the file.
-18 Trial accounts do not have file sending capability, contact support.

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.

Request samples

Content type
{
  • "Nombre": "mifichero.pdf",
  • "Tipo": "mifichero.pdf",
  • "Contenido": "JVBERi000000.............",
  • "Autoborrado": "Si",
  • "Resp": "JSON"
}

Response samples

Content type
[
  • {
    }
]

List Files in Library

/ListarFicheros

Function to list the files in the user's library. Returns an array/listing with the files within the user account.

Authorizations:
basicAuth
query Parameters
Resp
string
Enum: "TXT" "JSON" "XML"
Example: Resp=JSON

Type of response to return as the result of the call.
ANT - (Deprecated). Kept for backward compatibility with previous versions
JSON - The response will be returned in JSON
XML - The response will be returned in XML
TXT - The response will be returned in Text format

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.

Resp
string

Responses

Response Schema:
Array
Res
required
integer <int32>

Response of the requested function.
1 Correct
-1 Authentication error.
-3 Error in the call data. Required parameters are missing. In this case, you will get an additional parameter called Error with the description of the error.
-10 You have exceeded your file storage capacity, contact support to request more space.
-11 File format not supported, PDF, Excel, Word and VCF are supported. In the case of documents, PDF is recommended for maximum compatibility on phones.
-12 You indicated that you would send a file in BASE64 mode but you did not send the content.
-13 You indicated that you would send a file in FILES mode and the content did not arrive.
-15 You must specify Tipo FILES or BASE64.
-16 File too large, consult support to increase limits.
-17 An error has occurred while uploading the file.
-18 Trial accounts do not have file sending capability, contact support.

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:
Fecha Date the file was uploaded to the library
Nombre : Name of the file
Ext : Extension of the file

Cred
double

Credits remaining in the user account after the send.

Request samples

Content type
{
  • "Resp": "JSON"
}

Response samples

Content type
[
  • {
    }
]

Delete a file from the Library

/BorrarFichero

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.

Authorizations:
basicAuth
query Parameters
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.
ANT - (Deprecated). Kept for backward compatibility with previous versions
JSON - The response will be returned in JSON
XML - The response will be returned in XML
TXT - The response will be returned in Text format

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.

Nombre
required
string
Resp
string

Responses

Response Schema:
Array
Res
required
integer <int32>

Response of the requested function.
1 Correct
-1 Authentication error.
-2 The file does not exist.

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.

Request samples

Content type
{
  • "Nombre": "mifichero.pdf",
  • "Resp": "JSON"
}

Response samples

Content type
[
  • {
    }
]

Credits Query

/GetCreditos

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

Authorizations:
basicAuth
query Parameters
Resp
string
Enum: "TXT" "JSON" "XML"
Example: Resp=JSON

Type of response to return as the result of the call.
ANT - (Deprecated). Kept for backward compatibility with previous versions
JSON - The response will be returned in JSON
XML - The response will be returned in XML
TXT - The response will be returned in Text format

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.

Resp
string

Responses

Response Schema:
Array
Res
required
integer <int32>

Response of the requested function


1 The function concluded successfully.
-1 Authentication error.

Cred
required
double

Credits remaining in the user account after the send.

Request samples

Content type
{
  • "Resp": "JSON"
}

Response samples

Content type
[
  • {
    }
]

List SMS templates

/GetPlantillasSMS

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.

Authorizations:
basicAuth
query Parameters
Resp
string
Enum: "TXT" "JSON" "XML"
Example: Resp=JSON

Type of response to return as the result of the call.
JSON - The response will be returned in JSON
XML - The response will be returned in XML
TXT - The response will be returned in Text format

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.

Resp
string

Responses

Response Schema:
Array
Res
required
integer <int32>

Response of the requested function
1 Correct.
-1 Authentication error.
-3 Error in the call data.

Total
integer

Number of SMS templates returned.

Plantillas
object

Object with all the SMS templates of the account, in Nombre => Contenido format. The content is returned exactly as you edited it in the panel, including the special codes for variables, links, images, files, QRCODE, landings, etc.

Request samples

Content type
{
  • "Resp": "JSON"
}

Response samples

Content type
[
  • {
    }
]

Appendix 2 - Character Sets

You can use the standard GSM 3.38 alphabet (default) or the Unicode character set by sending Unicode=1 in the request

Unicode

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.

GSM 3.38

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