Download OpenAPI specification:Download
API for integrating the sending of CERTIFIED SMS and CONTRACT SMS messages from applications through https requests.
In your user account you will find the API User and the API Token, both are required to make the REST API requests to the API functions. For security, requests must be made using POST and with 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 string APIUser:APIToken and encode it in base64 using any base64encode function.
Version 7 is compatible with previous versions of the API starting from version 3.3 with changes in the authentication method.
Version 1.0 – 1.5: Last updated 2004. Upgrading to version 3.3 or higher is recommended. Versions currently not supported. Contact support for migration assistance.
Version 2.0 – 2.3: last updated: 2009. Upgrading to versions 3.3 or higher is recommended. Versions currently not supported. Contact support for migration assistance.
Version 3.0 – 3.7: last updated: 2012. Versions supported and 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. Versions supported and 100% compatible with higher versions. We recommend upgrading to version 5 as it has more functions and possibilities. New features will be added to version 5.
Version 5.0: Release and last update: 2015. Version compatible with previous versions of the API starting from 3.3 (inclusive).
Version 5.1: Last updated: 2016. Version compatible with previous versions of the API starting from 3.3 (inclusive).
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. Ability to upload PDF and office files to send them in SMS and Certified SMS.
Version 5.8: Last updated: 2018. The possibility to send variables per recipient is added. These variables are used to personalize both the sent message and the links and Landing Pages.
Version 5.8.1: Last revision 2018. The possibility to send contracts in the Certified SMS through acceptance and biometric handwritten signature is included.
Version 5.8.2: Last revision 2019. The reception of statuses in contracts is added.
Version 5.8.2.2: Last revision 2020. The reception of CSV in the final statuses of the Contract SMS is added to facilitate its distribution among signers.
Version 6: Last revision 2021. New features. Certification of access to the attachments of the PDF.
Version 7: Last revision 2023. Authentication through API User and API Token. New features. Possibility of identifying the recipient and requesting acceptance/rejection of the Notification. Possibility of sending the PDF within the request, both for the contract, in the Contract SMS, and as an attachment to the Certified SMS.
Empty connections: It is important to keep in mind that a repeatedly erroneous connection will be treated by the system as spam and may temporarily block the connection.
It is advisable to avoid making repeated connections with erroneous data or fast 'empty' connections (without sending) 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 of the 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.
It is always recommended to define this parameter since all functions, for compatibility with previous versions of the API, respond by default (if this parameter is not defined) as they did in old versions. In these results from previous API versions, some of the variables included in this version of the API are omitted, and we consider them important to facilitate integration and account information.
In the included examples 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 the following:
- PROCESS 1: Sending Certified SMS or Contract SMS: Described in the EnviarSMSCERTIFICADO function of this document.
- PROCESS 2: Automatic reception of reports on your website (process described in the 'Reception of delivery reports' section.
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 Certified SMS and Contract SMS messages from applications. Definition of the required parameters.
ATTENTION: Check the real-time report reception section if you want to receive the status of the certified and contract messages sent in real time in a script on your website and be able to download the certificates interactively.
| Remitente required | string Example: Remitente=MIEMPRESA The phone number, company name or name of the person sending. If left blank, the default mobile phone or sender registered by the sending user in Mensatek will be sent as the sender. 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 recipients of the certified sms. You can add variables if you want to personalize the Message per recipient. For example:
|
| Mensaje required | string Example: Mensaje=To the attention of Ana, We send you this notification ....., click on the following link to see the full notification (FILE:2:notifica.pdf) Message that will be sent to the recipient(s). It can include Files, shortened Links, images, QRCODE, etc... To include attachments/files or any of these elements, check the documentation in Appendix 1. In Appendix 1 you will see how to incorporate PDF files, for example, in support of the notification or, in the case of Contract SMS, for signing. |
| Tipocontrato | integer Example: Tipocontrato=0 It is the Contract Type to be used in case of Contract SMS: the options are:
|
| Fecha | string Example: Fecha=2022-10-01 15:10 Date on which the sending is scheduled, the certified 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=Your reference 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 result of the sending. |
| Report | integer Example: Report=0 If you want to receive reports by email or in a script on your website (by enabling the API configuration in the user panel). |
| Idmensaje | integer Example: Idmensaje=1765987 Optional parameter. It is used to unify sendings 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, two messages with the same idMensaje code will not be allowed to be sent to the same mobile. |
| Contacto required | string Example: Contacto=EMPRESA S.L. Contact details of the sending person or company. |
| Telcontacto required | string Example: Telcontacto=900000000 Contact phone of the sending person or company. |
| Cifcontacto required | string Example: Cifcontacto=B00000000 CIF or NIF of the sending person or company. |
| Vpd | integer Example: Vpd=3 Validity period in days (1 to 20), delivery will be attempted for VPD days VPH hours and VPM minutes even if the recipient's phone remains off, after which the message will expire and delivery will no longer be attempted. |
| Vph | integer Example: Vph=0 Hours in the validity period (0 to 23), delivery will be attempted for VPD days VPH hours and VPM minutes even if the recipient's phone remains off, after which the message will expire and delivery will no longer be attempted. |
| Vpm | integer Example: Vpm=0 Minutes of the validity period (0 to 59), delivery will be attempted for VPD days VPH hours and VPM minutes even if the recipient's phone remains off, after which the message will expire and delivery will no longer be attempted. |
| Identificar | string Example: Identificar=CERTIFICADO-12345678E Only for Certified SMS: If you want to protect the notification/identify the recipient before they can access the attachments. The recipient identification options are:
|
| Aceptacion | integer Example: Aceptacion=10 Only for Certified SMS: If a number greater than 0 is indicated, the recipient will be asked to accept or reject the notification before accessing its content (they will only be able to access if they have previously accepted it). The number, a value between 0 to disable and 15, is the number of days after which the notification will expire if the recipient has not yet accepted or rejected it. |
| Unicode | integer Example: Unicode=0 Enable Unicode to be able to send any character outside the GSM standard.
|
| Fixutf8 | integer Example: Fixutf8=0 Sometimes, when developers use an encoding that is not UTF8, special characters may be interpreted incorrectly. If this happens, enable (set to 1) this parameter to fix it.
|
| Emailreport | string |
| 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 |
| Tipocontrato | integer |
| Fecha | string |
| Referenciausuario | string |
| Report | integer |
| Idmensaje | integer |
| Contacto required | string |
| Telcontacto required | string |
| Cifcontacto required | string |
| Vpd | integer |
| Vph | integer |
| Vpm | integer |
| Identificar | string |
| Aceptacion | integer |
| Unicode | integer |
| Fixutf8 | integer |
| Emailreport | 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. |
| 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 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 message sent (if the phone has been deactivated, delivery times, etc…). It will be received in the requests if you enable the 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 message sent (if the phone has been deactivated, delivery times, etc…). It will be received in the requests if you enable the real-time report reception in a script on your website/server. |
| Cred | double Credits remaining in the user account after the sending. |
| 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 sending. 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": "To the attention of Ana, We send you this notification ....., click on the following link to see the full notification (FILE:2:notifica.pdf)",
- "Tipocontrato": "0",
- "Fecha": "2022-10-01 15:10",
- "Referenciausuario": "Your reference",
- "Report": "0",
- "Idmensaje": "1765987",
- "Contacto": "EMPRESA S.L.",
- "Telcontacto": "900000000",
- "Cifcontacto": "B00000000",
- "Vpd": "3",
- "Vph": "0",
- "Vpm": "0",
- "Identificar": "CERTIFICADO-12345678E",
- "Aceptacion": "10",
- "Unicode": "0",
- "Fixutf8": "0",
- "Emailreport": "string",
- "Resp": "JSON"
}[- {
- "Res": "10",
- "Error": "Required parameter is missing",
- "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 enabling 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 message sent 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 objective is to distinguish between the reports of the different services). The services referred to in this specification may receive | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Resultado required | integer Status of the notification sent. The possible statuses are:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Remitente required | string Sender used in the sending. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Movil required | string Recipient's mobile that the report refers to. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Fecha required | string Date of the report (date on which the carrier that serves 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 sending function (idMensaje received in the sending function) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Referencia required | string User reference that was sent during the sending request. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| idReport | integer Unique identifier of the message. |
{- "Servicio": "SMSCERTIFICADO",
- "Resultado": "11",
- "Remitente": "TUEMPRESA",
- "Movil": "34600123456",
- "Fecha": "2020-12-03 11:14:24",
- "Segundos": "3",
- "idMensaje": "10573758",
- "Referencia": "Your reference if you indicated it",
- "idReport": "1234567890"
}REAL-TIME RECEPTION OF THE ACCESS EVENTS TO THE PDF ATTACHMENTS OF THE CERTIFIED SMS.
By enabling 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 the recipient performs an event on the attachment included in the Certified SMS.
You can configure the requests to be received 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 report you are receiving (the objective is to distinguish between the reports of the different services). In this case you will receive |
| Fichero required | string Name of the document that the event refers to. |
| TipoAdjunto required | string Type of protection of the attachment that the event refers to. It can be:
|
| Fecha required | string Date of the report (date on which the event occurs) |
| Telefono required | string Recipient's mobile that the report refers to |
| TipoEvento required | string Type of event being notified. The options are:
|
| idEnvio required | integer Unique identifier received as a response in the sending function (MsgId received in the sending function), it is equal to idMensaje and is used for compatibility with previous versions. |
| idMensaje required | integer Unique identifier received as a response in the sending function (MsgId received in the sending function) |
| Valor | string Value related to the type of event. |
| Referencia | string User reference that was sent during the sending request. |
| IP | string The IP from which the event occurred (for example the connection IP from which the document was accessed). |
| Puerto | integer Port from which the recipient accessed which, together with the IP, defines the connection. |
{- "Servicio": "EVENTOSSMSCERTIFICADO",
- "Fichero": "Nombrefichero.pdf",
- "TipoAdjunto": "1",
- "Fecha": "2020-12-03 11:14:24",
- "Telefono": "34600000000",
- "TipoEvento": "1",
- "idEnvio": "123433379",
- "idMensaje": "123433379",
- "Valor": "00000000T",
- "Referencia": "19927743TR",
- "IP": "127.0.0.1",
- "Puerto": "56678"
}RECEPTION OF THE SMS MESSAGES RECEIVED ON YOUR CONTRACTED NUMBER OR AS A REPLY TO YOUR BASIC CONTRACT SMS
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 the SMS message reception numbers is done through your sales representative and requires an identity verification. You can contract as many phone numbers as you wish. To know the coverage and the possibility of international reception, consult your sales representative.
In the sending of Contract SMS it is not necessary to contract a number; the system will take care of assigning a generic one from the pool of carrier numbers. To receive messages as a reply to normal SMS it is necessary to contract a number.
You can configure the requests to be received 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 the request is being received from. 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 carrier). |
| 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 MsgId returned in the sending function. |
| EsCert required | boolean In case of being a reply to a previously sent message, it indicates whether the original message was certified (it would be a Contract SMS) or not. |
| Referencia | string In case this message is a reply to a previously sent one, here you will receive the user reference of the message sent through the sending 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 a Certified SMS or Contract SMS previously scheduled through the sending function.
| Idmensaje required | integer Example: Idmensaje=1283876988 Identifier returned in the sending 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 that was effectively 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 a Certified SMS or a Contract SMS previously scheduled through the sending function to be processed in the future..
| Idmensaje required | integer Example: Idmensaje=1283876988 Identifier returned in the sending function. |
| Fecha required | string Example: Fecha=2022-12-03 11:15 New sending date. It is the date on which the message will be scheduled for sending. It must be after 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"
}
]Function with multiple utilities:
1.- If the parameters idMensaje and Telefono are sent, the PDF file with the certificate of the message sent to a mobile through the API is obtained. This function is usually executed with these parameters as a response to a report reception with a certified status (example result 14 -delivered and certified- in Certified SMS and 17, 160 or 181 -contract signed/perfected and certified- in case of Contract SMS). A report and PDF are downloaded if the Telefono is specified
If only the idMensaje parameter is sent, the report of all recipients (certified PDF) is obtained.
3.- Finally, if neither idMensaje nor Telefono is sent but FechaInicio and FechaFin are sent, the PDFs of all the Certified SMS and Contract SMS sent between those two dates are obtained.
| Idmensaje | integer Example: Idmensaje=1283876988 Identifier returned in the sending function. |
| Telefono | string Example: Telefono=34601234567 Recipient mobile for which the certified PDF is to be obtained. If not specified, a list will be obtained with all the recipients of the message and their respective Certified PDFs. |
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Type of response to return as the result of the call.
|
| Fechainicio | string Example: Fechainicio=2023-01-01 00:00 If the Start and End dates are included, the certificates generated between those two dates will be obtained. ATTENTION: This function is designed to be used very sporadically, so the system will block continuous requests. It is recommended to download the PDF individually as a response to the status change callback. |
| Fechafin | string Example: Fechafin=2023-01-02 00:00 If the Start and End dates are included, the certificates generated between those two dates will be obtained. ATTENTION: This function is designed to be used very sporadically, so the system will block continuous requests. It is recommended to download the PDF individually as a response to the status change callback. |
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 |
| Telefono | string |
| Resp | string |
| Fechainicio | string |
| Fechafin | string |
{- "Idmensaje": "1283876988",
- "Telefono": "34601234567",
- "Resp": "JSON",
- "Fechainicio": "2023-01-01 00:00",
- "Fechafin": "2023-01-02 00:00"
}In case of success, a zip file is downloaded. Content of the ZIP: - Certificates in PDF format - CSV file with the result of the certified message to each recipient.
Obtaining the report / status of a Certified SMS or Contract SMS identified by the idMensaje (message identifier) obtained in the sending function. It is recommended to use the 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 required | integer Example: Idmensaje=1283876988 Identifier returned in the sending 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
|
| 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':14,'Estado':'Entregado y Certificado'},{'Fecha':'2021-09-04 19:37:27','Tiempo':3,'Telefono':34656789012,'Resultado':14,'Estado':'Entregado y Certificado'}]"
}
]Function for uploading to the user's file Library so that files can be attached in a later sending of Certified SMS or Contract SMS. ATTENTION There is a limit on the number of files and on 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. The files are no longer necessary once the Certified PDF with the delivery or contracting result is generated, since they are kept in secure storage that does not affect the indicated quota and, therefore, can be safely deleted from the library from that moment on.
Likewise, the sendings of Contract SMS including the PDF as base 64 within the sending request, that is, including `(BASE64:2:base64contentofthePDF) within the text to be sent, do not affect this quota either since the system automatically deletes them from the library once the certified PDF is generated, remaining, as in the previous case, kept in each customer's individual secure space.
| 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. The names must include the extension and have a maximum of 15 characters (only letters and numbers). |
| 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 The user's file library has a storage and file number limit. A File is only necessary 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's library. If you want the system to automatically delete the file when certifying the message, enable this option. Do it 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 sending. |
{- "Nombre": "mifichero.pdf",
- "Tipo": "mifichero.pdf",
- "Contenido": "JVBERi000000.............",
- "Autoborrado": "Si",
- "Resp": "JSON"
}[- {
- "Res": "-10",
- "Nombre": "fichero.pdf",
- "Error": "Required parameter is missing",
- "Cred": "12000"
}
]Function to list the files in the user's library. It returns an array/list 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 sending. |
{- "Resp": "JSON"
}[- {
- "Res": "-10",
- "Error": "Required parameter is missing",
- "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 certificate has been created, in which case a copy will already have been saved in secure custody. Until that moment (creation of the Certified PDF with the result of the sending or contract) 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 sending. |
{- "Nombre": "mifichero.pdf",
- "Resp": "JSON"
}[- {
- "Res": "1",
- "Error": "Required parameter is missing",
- "Cred": "12000"
}
]Function that returns the number of credits in the account. It is a function of very sporadic use since most functions return in their responses the number of Credits remaining in the user. 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 sending. |
{- "Resp": "JSON"
}[- {
- "Res": "10",
- "Cred": "12000"
}
]SEND FILES, IMAGES, LINKS, QRCODE, SMS LANDING, ETC.. IN THE MESSAGE:
Links are sent following the guidelines below and specifying the Links=1 parameter.
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 file existing in the library.
BASE64 to include a PDF in the Certified SMS or Contract SMS. In this case, the content is the PDF encoded in Base64.
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 an external shortened link. The content, in this case, will be the link to which we must redirect.
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:FileName.pdf)
For example, the message would be: Hello, I send you the contract (FILE:2:contrato.pdf)
In this example a message would be sent with an attachment contrato.pdf
You have functions to upload files, obtain the list of available ones, delete the files you are no longer going to use, etc... if you prefer to upload the files to your online library and then use those files in the messages.
• INSERT FILES DIRECTLY : Insert the following code in the message:
(BASE64:2:base64 content of the PDF)
If you do not want to make two requests, one to upload the file to the library and another to send the Contract or certified SMS, send the attachment in base64 this way. In this case you do not have to worry about deleting the file from your library since the system automatically takes care of finalizing the process and safely keeping the file from then on.
• INSERT IMAGES: Insert the following code in the message:
(IMG:2:ImageName.jpg)
For example, the message would be: Hello, I send you my image (IMG:2:foto.jpg), I hope you like it.
• INSERT LINKS: Insert the following code in the message:
(LINK:2:http://www.dominio.com)
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 even emojis can be added. You must enable Unicode=1 in the request. Carriers charge one SMS for 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 keep in mind that the € takes up two characters (it is sent as a combination of two) and that the closed accents (tildes) are not in the standard (except for the é), so if they are included, they will be changed to the most similar character.
The characters allowed 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.- Only numbers (a mobile or landline in international format, e.g. +34600000000) up to 15 digits
2.- Only letters, numbers, & and underscore character up to 11 characters. E.g. MiRemitente