Download OpenAPI specification:Download
REST integration API for sending contracts and documents for electronic signature from your applications. This is version 4 (v4), fully compatible with requests in the previous v3 format, but extended with the following new capabilities:
Summary of v4 new features:
1. Omnichannel channels in cascade: instead of a single notification channel (SMS/Email/SMS-cert), you can now define an ordered list of channels (SMS, Email, RCS, WhatsApp). The system will try the first one and, if it fails, automatically move to the next, giving you maximum delivery reliability. Each time you force the contracting process to continue, the system will additionally rotate the channels in order to ensure deliveries and maximize reliability.
2. Sequential authorization groups: documents the signer must review and accept before reaching the contract to sign (accept NDA, GDPR, etc. before signing the contract). Up to 3 sequential groups (Group 1 → Group 2 → Group 3 → Contract). The system will generate one certificate per authorization group, another for the contract that make up the signer copies, and a global one including all evidence, interactions and documents (copy for the sender).
3. Multiple boxes per document: up to 10 signature boxes of Signer type and 10 of Sender type per PDF, distributed throughout the document as you wish, not just one as in v3.
4. OTP per specific channel: the OTP code can be sent through the channel you choose (SMS, Email, RCS or WhatsApp), not only SMS. Also alternately, if the first channel does not reach the signer for any reason (for example WhatsApp is selected and the signer does not have it installed) the system will continue with the next configured channel.
5. Multi-send: in a single request you can create N independent contracts, each with its own list of signers and its own variables (useful for personalized bulk sending).
Legacy compatibility: if your current integration sends v3 requests to this v4 endpoint, they will work exactly the same without modifications. The system automatically detects the format and applies the appropriate behavior. This lets you migrate to v4 whenever you wish, without rush or only if you need any of the new features.
Version 1.0 – 1.7: Last updated 2017. Unsupported versions. Contact support for migration help.
Version 2.0 – 2.55: Last updated 2021. Functional but migrating to v3 or higher is recommended.
Version 3.0 – 3.1: Last updated 2023. Full support. Coexists with v4.
Version 4.0: This version (2026). Adds omnichannel channels, sequential authorizations, multiple boxes, OTP per selectable channel and multi-send. 100% backward compatible with v3.
In your user account you will find the API User and the API Token, both required to make REST requests. Requests, for security, must be made via POST over HTTPS (TLS ≥ 1.2).
To use HTTP Basic Authentication you must include a header of the type:
Authorization: Basic Base64StringAPI
where Base64StringAPI is the Base64 encoding of the string UsuarioAPI: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 concatenate UsuarioApi:APIToken and encode it with any base64_encode function.
All requests to this API are made via POST . It supports two formats for the parameters and will accept them in both formats:
1.- You can make them in JSON format in the body. The header must include Content-Type: application/json.
2.- You can make them as Form Data. In this case the header must include Content-Type: application/x-www-form-urlencoded.
The RESP parameter indicates the response format. Possible values: JSON (recommended), XML or TXT. If not specified, TXT is assumed for compatibility with old versions of the API.
SMS: text message to the signer's mobile.EMAIL: email to the signer's email. You can use the default domain or your own domain validated in your account under the 'Transactional Email' section.RCS: RCS (Rich Communication Services) message to the signer's mobile. Requires an RCS agent and template configured in the panel.WHATSAPP: WhatsApp message to the signer's mobile. Requires a WhatsApp Business account (WABA) and a template configured in the panel.Cascade: the CANALESFIRMA array is an ordered list. The system will try the first channel; if the send fails (deactivated phone, invalid number, rejected template, etc.), it will automatically move to the next. If all fail, the send is marked as failed and can be retried manually or wait for the reminder.
Rotating reminders: if you configure automatic reminders, each one will use the next channel in the cascade (not the same one already used previously). This maximizes the probability of reaching the signer.
Replaceable variables in messages and templates (all these formats are equivalent, you can use the one you prefer): {{LINK}}, [LINK], (LINK), ###LINK###. The available variables are:
{{LINK}} — unique signing link for that signer.
{{NOMBRE}} — signer's name.
{{NIF}} — signer's NIF.
{{EMAIL}} — signer's email.
{{MOVIL}} — signer's mobile.
{{TIPODOCUMENTO}} — the value you pass in TIPODOCUMENTO (default 'contract').
TIPOFIRMA=OTP, the system will send the signer a one-time code (5-digit PIN) that must be entered before signing. By default it is sent via SMS to the signer's mobile (legacy v3 API behavior). In v4 you can configure CANALESOTP with the same structure as CANALESFIRMA to send the OTP through the channel/template you prefer.
The replaceable variable specific to the PIN is: {{CODE}}. The template for the channels configured for OTP must contain it mandatorily.
CONTRATO (default): the main document to sign. Accepts signature boxes for the signer and the sender.AUTORIZACION: a document the signer must review and accept before reaching the contract to sign. They are grouped into up to 3 sequential groups through GRUPOAUT (1, 2 or 3). The signer must first accept all of those in Group 1, then those of Group 2, then those of Group 3 and, finally, sign the document of type CONTRATO.STAMPFIRMAFIRMANTE) and another for the sender (STAMPFIRMAEMISOR). In v4 you can define up to 10 boxes of each type in each document through the new plural parameters STAMPFIRMASFIRMANTE and STAMPFIRMASEMISOR (arrays of strings with the same format as the singular: pag,x,y,tamx,tamy,H|V).
If you only need one box, keep using the legacy singulars. If you send both (singular and plural) the plural prevails.
If the JSON includes the ENVIOS field (array of objects), the root-level FIRMANTES and PERSONALIZACION fields are ignored and each object in ENVIOS generates an independent contract. The response returns a Contratos array with one object per contract created.
CERTIFICACION object with EMPRESA, CIF, TELEFONO and/or LOGO, that data replaces — only in that contract — the certification data configured in your account: the Company and the CIF appear as 'Contract sender' in the PDF certificate and in the signing process, the Phone is shown to the signer during the process, and the Logo (https URL to svg/png) takes priority over the logo in your configuration on the signing page.
All fields are optional: send only the ones you want to override; the rest still comes from your account configuration.
Empty connections: A repeated erroneous connection will be treated by the system as spam and may end up temporarily blocking the connection. Avoid making repeated connections with erroneous data or fast 'empty' connections (without sends) with the same data to obtain the number of credits or the same report.
To obtain reports optimally in real time, configuring the API in the panel to receive them in a script on your website (webhooks) is recommended.
Response of requests:
Most functions have a RESP parameter that defines the response format (JSON, XML or TXT). Always defining it as JSON for maximum clarity is recommended. If not defined, functions respond by default in TXT format for compatibility with old versions.
Recommended workflow:
- PROCESS 1: Send a signing request with the /EnviarContrato function.
- PROCESS 2: Automatic reception of status changes on your website (configurable in the panel — see the 'Automatic event reception' section in this document).
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.
basicMain function of the API. Creates a contract (or several, if you use ENVIOS) and sends the signing request to the signer(s) through the configured channels.
This is the most complete function of the API. It supports both the legacy v3 format (a single channel defined by MEDIOCOMUNICACION, singular boxes, a single send) and the new v4 format (omnichannel cascade with CANALESFIRMA/CANALESOTP, multiple boxes, authorizations by groups, multi-send).
The system automatically detects which format the client uses and applies the appropriate behavior. It is perfectly valid to mix legacy and new parameters in the same request (for example: send modern CANALESFIRMA but keep using singular STAMPFIRMAFIRMANTE).
ATTENTION: review the event reception section at the end if you want to receive the status of contracts and signer interactions in real time in a script on your server.
| Firmantes | Array of arrays Example: Firmantes=[{"Nombre":"Pedro Pérez","NIF":"00000000T","Email":"destinatario@eldominio.com","Telefono":"34600000001","Orden":1}] JSON array with the signers' data. Use this parameter when you are only going to send ONE contract. To send several contracts in a single request, use
|
| Envios | Array of strings Example: Envios=[{"Firmantes":[{"Nombre":"Juan","NIF":"11111111H","Telefono":"34611111111","Email":"juan@a.com","Orden":1}],"Variables":{"importe":"100€"}}] NEW in v4. JSON array to create multiple independent contracts in a single request. Each object in the array generates a contract.
|
| Flujotrabajo | string Example: Flujotrabajo=238754787 Identifier of a workflow previously saved in your panel. It has predefined documents, templates, signature type, etc. and you just need to define the signers in the request. |
| Firmasemisor | Array of arrays Example: Firmasemisor=[{"ID":1865998}] JSON array with the sender signatures (yours) saved in your account that you want to stamp on the signed documents. The system adds your signature and certificates to the document at the end of the process, completing the legal document. The boxes where they are stamped are defined with
|
| Documentos | Array of arrays Example: Documentos=[{"Tipo":"PDF","Nombre":"Contrato","Contenido":"JVBERi0xLj...","Aceptacion":"SI","TipoDoc":"CONTRATO","StampFirmaFirmante":"1,80,500,180,80,H"}] JSON array with the list of contract documents. Each element represents a PDF, a panel template or a checkbox.
|
| Documentossolicitados | Array of arrays Example: Documentossolicitados=[{"Texto":"Adjunte copia del DNI","Firmante":0}] JSON array with documents the signer must ATTACH when signing (e.g. ID copy, receipt, etc.). Each element defines a descriptive text and which signer it is requested from.
|
| Personalizacion | string Example: Personalizacion={"importe":"100€","plazo":"30 días"} Replaceable variables in templates and messages. It must be a JSON string with a flat object of key/value pairs. The keys are normalized to lowercase and accessed in templates as
|
| Tipofirma | string Enum: 1 2 3 4 Example: Tipofirma=BIOMETRICA Type of signature to apply. IMPORTANT: you must use the TEXT, not the number.
|
| Plantillafirma | string Enum: 0 1 Example: Plantillafirma=UNIFICADO NEW. Environment/template of the signing process that the signer sees.
|
| Remitente | string Example: Remitente=FIRMA Sender identifier (3-11 alphanumeric characters). Used in legacy SMS and as a fallback if you do not specify REMITENTE in each SMS channel. |
| Mensaje | string Example: Mensaje=Hello [NOMBRE], sign the [TIPODOCUMENTO] here: [LINK] Legacy v3. SMS/Email text when |
| Mediocomunicacion | string Enum: 1 2 3 Example: Mediocomunicacion=SMS Legacy v3. Single notification channel. Ignored if you send CANALESFIRMA; instead use CANALESFIRMA to define one or several channels.
|
| Tipodocumento | string Example: Tipodocumento=Contrato Document type (free text, max 50 chars). It is substituted in the |
| Verificacionidentidad | string Enum: "NO" "SI" Example: Verificacionidentidad=NO
|
| Minparecidoverificacion | integer |
| Referenciausuario | string Example: Referenciausuario=PEDIDO-2026-00123 Integrator's internal reference (max 200 chars). It is returned in the reports and allows associating the contract with your external system. Accepts letters, digits, spaces and the characters |
| Accesible | string Enum: "NO" "SI" Example: Accesible=SI
|
| Alternamedios | string Enum: "NO" "SI" Example: Alternamedios=SI
|
| Recordatorios | integer Example: Recordatorios=3 Number of automatic reminders to send to the signer if they have not signed (1-10). Each reminder uses the next channel in the cascade (rotation). |
| Fechalimite | string Example: Fechalimite=2026-12-31 23:59 Signing deadline date in format |
| Idioma | string Enum: "es" "pt" "en" Example: Idioma=es Language of the interface the signer will see on the signing screen. |
| Minimocheck | integer Example: Minimocheck=0 If there are CHECKBOXES in DOCUMENTOS, the minimum number of boxes the signer must check in order to sign. Between 0 and the total number of checkboxes. |
| Maximocheck | integer Example: Maximocheck=10 If there are CHECKBOXES in DOCUMENTOS, the maximum number of boxes the signer can check. Must be ≥ MINIMOCHECK. |
| Mensajeautorizacion | string Example: Mensajeautorizacion=Antes de firmar el contrato debe revisar y aceptar los documentos de autorización. NEW v4. Informative message (max 1000 chars) shown to the signer in a popup window when reaching the first authorization document. Useful to explain to the signer what they are going to review before signing the contract. Ignored if there are no documents with TipoDoc=AUTORIZACION. |
| Validarcanales | string Enum: "NO" "SI" Example: Validarcanales=NO NEW v4. Activates the deep validation of the channels (CANALESFIRMA and CANALESOTP) before creating the contract. Possible values:
|
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Type of response to return as the result of the call.
|
| Canalesfirma | Array of strings Example: Canalesfirma=[{"TIPO":"SMS","REMITENTE":"FIRMA","MENSAJE":"Firma: {{LINK}}"}] NEW in v4. JSON array with the ordered list of channels through which to send the signing request. The system will try the first one; if it fails, it will move to the next automatically (cascade). If you configure reminders, each one will use the next available channel (rotation).
|
| Canalesotp | Array of strings Example: Canalesotp=[{"TIPO":"SMS","REMITENTE":"FIRMA","MENSAJE":"Código: {{CODE}}"}] NEW in v4. JSON array with the channels through which to send the OTP code (5-digit PIN) when
|
| Certificacion | object Example: Certificacion={"EMPRESA":"Inmobiliaria Cliente Final SL","CIF":"B00000000","TELEFONO":"+34910000000","LOGO":"https://www.clientefinal.com/img/logo.svg"} NEW in v4. JSON object with the sender certification data, designed for companies that send signing requests on behalf of their clients. The data sent here replaces — only in this contract — the certification data configured in your account (Your Data → Configure Account).
|
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.
| Firmantes | Array of any |
| Envios | Array of any |
| Flujotrabajo | string |
| Firmasemisor | Array of any |
| Documentos | Array of any |
| Documentossolicitados | Array of any |
| Personalizacion | string |
| Tipofirma | string |
| Plantillafirma | string |
| Remitente | string |
| Mensaje | string |
| Mediocomunicacion | string |
| Tipodocumento | string |
| Verificacionidentidad | string |
| Minparecidoverificacion | integer |
| Referenciausuario | string |
| Accesible | string |
| Alternamedios | string |
| Recordatorios | integer |
| Fechalimite | string |
| Idioma | string |
| Minimocheck | integer |
| Maximocheck | integer |
| Mensajeautorizacion | string |
| Validarcanales | string |
| Resp | string |
| Canalesfirma | Array of any |
| Canalesotp | Array of any |
| Certificacion | object |
| Res required | integer <int32> Result of the operation.
|
| ContratoId | string Contract identifier (CSV — Secure Verification Code). Together with ReportID it is used for subsequent calls to other API functions. It also arrives in the real-time events. |
| ReportId | integer Internal reports identifier. Together with ContratoID it is used for subsequent calls (e.g. download of the certified PDF, force resend, etc.). |
| Cred | integer Credits remaining in the account after the send. |
| Firmantes | integer Number of signers of the contract. |
| Documentos | integer Number of documents sent (TEMPLATES + PDFs + CHECKBOXES). |
| Contratos | Array of arrays NEW v4. Only present if you used |
"{\n \"RESP\": \"JSON\",\n \"TIPOFIRMA\": \"BIOMETRICA\",\n \"REFERENCIAUSUARIO\": \"PEDIDO-2026-00123\",\n \"CERTIFICACION\": {\n \"EMPRESA\": \"Inmobiliaria Cliente Final SL\",\n \"CIF\": \"B00000000\",\n \"TELEFONO\": \"+34910000000\",\n \"LOGO\": \"https://www.clientefinal.com/img/logo.svg\"\n },\n \"CANALESFIRMA\": [\n {\"TIPO\": \"SMS\", \"REMITENTE\": \"FIRMA\", \"MENSAJE\": \"Hello {{NOMBRE}}, sign your contract: {{LINK}}\"},\n {\"TIPO\": \"EMAIL\", \"DOMINIO\": \"__pordefecto__\", \"ASUNTOEMAIL\": \"Signature request\", \"MENSAJEEMAIL\": \"Click to sign your contract: {{LINK}}\"}\n ],\n \"FIRMANTES\": [\n {\"Nombre\": \"Pedro Aicart\", \"NIF\": \"00000000T\", \"Email\": \"pedro@dominio.com\", \"Telefono\": \"34600000002\", \"Orden\": 1}\n ],\n \"DOCUMENTOS\": [\n {\"Tipo\": \"PDF\", \"Nombre\": \"Contrato de servicio\", \"Contenido\": \"JVBERi0xLjQK_BASE64_DEL_PDF_AQUI\", \"StampFirmasFirmante\": [\"1,80,500,180,80,V\"]}\n ]\n}\n"[- {
- "Res": "1",
- "ContratoId": "ASYYFRE5492-HN776TFD",
- "ReportId": "1994779988",
- "Cred": "12000",
- "Firmantes": "2",
- "Documentos": "3",
- "Contratos": "[{\"ContratoId\":\"...\",\"ReportID\":123,\"Firmantes\":1,\"Documentos\":2}]"
}
]REAL-TIME RECEPTION OF THE STATUS OF EACH CONTRACT 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 contract 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 Report type. For this API you will receive | ||||||||||||||||||||||||
| ContratoID | string Contract identifier (CSV). | ||||||||||||||||||||||||
| ReportID | integer Internal reports identifier. | ||||||||||||||||||||||||
| Resultado required | integer Contract status. Possible statuses:
| ||||||||||||||||||||||||
| FechaEnvio | string Date on which the contract was sent. | ||||||||||||||||||||||||
| FechaFirma | string Date on which the contract was signed (if it has been signed). | ||||||||||||||||||||||||
| NumFirmantes required | string Number of signers of the contract. | ||||||||||||||||||||||||
| NumFirmados | string Number of signers who have already signed. | ||||||||||||||||||||||||
| Referencia | string REFERENCIAUSUARIO you sent in the original request. | ||||||||||||||||||||||||
| TipoFirma | integer Signature type of the contract (numeric):
| ||||||||||||||||||||||||
| CanalUsado | string NEW v4. Channel through which the last message was sent to the signer. Possible: |
{- "Servicio": "CONTRATACION",
- "ContratoID": "ASYYFRE5492-HN776TFD",
- "ReportID": "299846332",
- "Resultado": "11",
- "FechaEnvio": "2026-05-03 10:10",
- "FechaFirma": "2026-05-03 11:30",
- "NumFirmantes": "2",
- "NumFirmados": "1",
- "Referencia": "PEDIDO-2026-00123",
- "TipoFirma": "3",
- "CanalUsado": "sms"
}Forces the immediate continuation of the signing flow. Its typical use is to resend the request to the current signer when they do not respond. If you configured a channel cascade in CANALESFIRMA, this resend will use the NEXT channel in the cascade (rotation). Limited to 2 executions per day per signing process.
| Contratoid required | string Example: Contratoid=ASYYFRE5492-HN776TFD ContratoID returned in the send function. |
| Reportid required | integer Example: Reportid=1283876988 ReportID returned in the send function. |
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Response format: |
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.
| Contratoid required | string |
| Reportid required | integer |
| Resp | string |
| Res required | integer <int32>
|
| Cred | integer Remaining credits. |
| CanalUsado | string NEW v4. Channel through which the resend was attempted. |
{- "Contratoid": "ASYYFRE5492-HN776TFD",
- "Reportid": "1283876988",
- "Resp": "JSON"
}[- {
- "Res": "1",
- "Cred": "12000",
- "CanalUsado": "email"
}
]Downloads the certificate of the signed contract or the signer copy. It is normally executed in response to the reception of the report with status 101/1014 (Signed and Certified).
Type of file returned depending on DOC:
DOC=CERTIFICADO → ALWAYS returns a PDF (certificado_S.pdf) with the complete evidence of the process. Content-Type: application/pdf, suggested name contrato.pdf.DOC=FIRMANTE → can return PDF or ZIP depending on the contract:
copiafirmantes.pdf), a single document with the signed contract. Content-Type: application/pdf, name contrato.pdf.copiafirmantes.zip) with one PDF per authorization group (grupo_autorizacion_N_certificado.pdf) plus the contract PDF (contrato_certificado.pdf). Content-Type: application/zip, name contrato.zip.Content-Type header of the response to know whether you received application/pdf or application/zip and process accordingly. The API client must be prepared for both formats.
| Contratoid required | string Example: Contratoid=ASYYFRE5492-HN776TFD ContratoID returned in the send function. |
| Reportid required | integer Example: Reportid=1283876988 ReportID returned in the send function. |
| Doc | string Enum: "CERTIFICADO" "FIRMANTE" Example: Doc=CERTIFICADO Type of document to download:
|
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Response format when there is an error: |
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.
| Contratoid required | string |
| Reportid required | integer |
| Doc | string |
| Resp | string |
{- "Contratoid": "ASYYFRE5492-HN776TFD",
- "Reportid": "1283876988",
- "Doc": "CERTIFICADO",
- "Resp": "JSON"
}PDF (certificate or signer copy without groups).
Returns the number of credits in the account. Occasional function since most functions return the balance in the response.
| Resp | string Enum: "TXT" "JSON" "XML" Example: Resp=JSON Response format: |
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>
|
| Cred required | double Credits remaining in the account. |
{- "Resp": "JSON"
}[- {
- "Res": "1",
- "Cred": "12000"
}
]CANALESFIRMA field with an array of channels instead of or in addition to MEDIOCOMUNICACION.TipoDoc:'AUTORIZACION' and GrupoAut: 1|2|3 to the relevant documents.StampFirmaFirmante (singular) to StampFirmasFirmante (array of strings).ENVIOS instead of FIRMANTES + PERSONALIZACION.CANALESOTP when you use TIPOFIRMA=OTP.CERTIFICACION with {EMPRESA, CIF, TELEFONO, LOGO} so the contract is certified with your client's identity instead of the one configured in your account.| v3 | v4 |
|---|---|
MEDIOCOMUNICACION:'SMS' + MENSAJE + REMITENTE | CANALESFIRMA:[{TIPO:'SMS', REMITENTE:'...', MENSAJE:'... {{LINK}}'}] |
STAMPFIRMAFIRMANTE:'1,80,500,180,80,H' | STAMPFIRMASFIRMANTE:['1,80,500,180,80,H'] |
| Only the direct contract could be signed | TipoDoc:'AUTORIZACION' + GrupoAut:1 adds prior steps |
créditos = PRECIO_FIJO_CONTRATO (11)
+ nFirmantes × FIRMANTE (3)
+ nFirmantesConVerifica × VERIFICAR_IDENTIDAD (20)
+ nCheckboxes × CHECKBOX (1)
+ (hayDocumentosSolicitados ? PRECIO_FIJO_SOLICITUD_DOCUMENTOS (11) : 0)
+ nGruposAutorizacionDistintos × PRECIO_FIJO_AUTORIZACIONES (7)
+ extras según MEDIOCOMUNICACION (legacy):
SMS: PRO_CREDITOS_MENSAJE
EMAIL: 0
SMSCERTIFICADO: CREDITOS_CERTIFICADO + CREDITOS_PARTE_CERTIFICADO
A contract with 2 signers, 1 PDF, 2 checkboxes, no identity verification, no requested documents, no authorizations, sent via legacy SMS:
11 + 2×3 + 0 + 2×1 + 0 + 0 + 2×PRO_CREDITOS_MENSAJE = 19 + 2×SMS
A contract with 1 signer, 1 PDF, 0 checkboxes, with authorizations from Group 1 and Group 3 (2 different groups), without legacy SMS (uses CANALESFIRMA):
11 + 1×3 + 0 + 0 + 0 + 2×7 = 28 credits. Each channel in the cascade is charged when it is sent (not when creating the contract).
| Code | Meaning | When |
|---|---|---|
1 | OK | Successful operation. |
-1 | Auth/IP | Invalid credentials or unauthorized IP. |
-2 | No credits | The Necesarios field indicates how many are needed. |
-3 | Parameters | The Error field describes the specific problem. |
-4 a -6 | INSERT contract | Internal error on insert (contact support). |
-7 a -9 | INSERT signers | Internal error inserting signers. |
-10 a -14 | INSERT documents | Internal error inserting documents. |
-15 | ACEPTACION=SI requires 1 PDF | If you activate acceptance scroll, there must be exactly ONE PDF. |
-16 | Non-existent PDF | The referenced PDF does not exist in your account. |
-20 a -22 | INSERT requests | Error inserting documents requested from the signer. |
-23 | NEW v4 Invalid channel | Structure/type of a channel in CANALESFIRMA or CANALESOTP is incorrect. The Error field details which one. |
-24 | NEW v4 Deep channel validation failed | Only if VALIDARCANALES=SI. Indicates that a channel passed the structural validation but failed when validating against external sources (template non-existent in DB, without {{LINK}}/{{CODE}}, WhatsApp template not approved in Meta, etc.). The Error field says which channel and which specific problem. |
-25 | NEW v4 Email domain not validated | The DOMINIO of an Email channel is not DNS-validated in your account. |
-26 | NEW v4 WABA not configured | WhatsApp Business is not configured in your account. |
-27 | NEW v4 Invalid GRUPOAUT | GrupoAut must be 1, 2 or 3 and only applies with TipoDoc=AUTORIZACION. |
-29 | NEW v4 VALIDARCANALES rate limit | Only if VALIDARCANALES=SI. You have exceeded 10 requests per minute and per user. The response includes Reintentar (seconds until you can retry) and Limite (requests/min allowed). Go back to VALIDARCANALES=NO for bulk sends. |
{
"RESP": "JSON",
"TIPOFIRMA": "BIOMETRICA",
"MEDIOCOMUNICACION": "SMS",
"REMITENTE": "FIRMA",
"MENSAJE": "Firma aquí: [LINK]",
"FIRMANTES": [{"Nombre":"Juan","NIF":"00000000T","Telefono":"34600000001","Email":"j@a.com","Orden":1}],
"DOCUMENTOS": [{"Tipo":"CHECKBOX","Texto":"Acepto","Inicial":"OFF","Final":"ON"}]
}
Important: the domain su-dominio.com must be registered and validated in your Transactional Email panel. If you do not have it validated the send will fail with Res=-25; in that case use example 2b with __pordefecto__.
{
"RESP": "JSON",
"TIPOFIRMA": "BIOMETRICA",
"CANALESFIRMA": [
{"TIPO":"SMS","REMITENTE":"FIRMA","MENSAJE":"Firma: {{LINK}}"},
{"TIPO":"EMAIL","DOMINIO":"su-dominio.com","REMITENTE":"contratos@su-dominio.com","IDPLANTILLA":12345,"ASUNTOEMAIL":"Firma"}
],
"FIRMANTES": [{"Nombre":"Juan","NIF":"00000000T","Telefono":"34600000001","Email":"j@a.com","Orden":1}],
"DOCUMENTOS": [{"Tipo":"PDF","Nombre":"Contrato","Contenido":"JVBERi0xLj...","Aceptacion":"SI","StampFirmaFirmante":"1,80,500,180,80,H"}]
}
Use the __pordefecto__ token when you do NOT have a validated own domain. The system will send from the generic domain (it does not require DNS/prior validation).
{
"RESP": "JSON",
"TIPOFIRMA": "BIOMETRICA",
"CANALESFIRMA": [
{"TIPO":"SMS","REMITENTE":"FIRMA","MENSAJE":"Firma: {{LINK}}"},
{"TIPO":"EMAIL","DOMINIO":"__pordefecto__","ASUNTOEMAIL":"Firma","MENSAJEEMAIL":"Click {{LINK}}"}
],
"FIRMANTES": [{"Nombre":"Juan","NIF":"00000000T","Telefono":"34600000001","Email":"j@a.com","Orden":1}],
"DOCUMENTOS": [{"Tipo":"PDF","Nombre":"Contrato","Contenido":"JVBERi0xLj...","Aceptacion":"SI","StampFirmaFirmante":"1,80,500,180,80,H"}]
}
{
"RESP": "JSON",
"TIPOFIRMA": "BIOMETRICA",
"MENSAJEAUTORIZACION": "Antes de firmar revise NDA y RGPD.",
"CANALESFIRMA": [{"TIPO":"SMS","REMITENTE":"FIRMA","MENSAJE":"Firma: {{LINK}}"}],
"FIRMANTES": [{"Nombre":"Juan","NIF":"00000000T","Telefono":"34600000001","Email":"j@a.com","Orden":1}],
"DOCUMENTOS": [
{"Tipo":"PDF","Nombre":"NDA","Contenido":"JVBERi0xLj...","TipoDoc":"AUTORIZACION","GrupoAut":1},
{"Tipo":"PDF","Nombre":"RGPD","Contenido":"JVBERi0xLj...","TipoDoc":"AUTORIZACION","GrupoAut":2},
{"Tipo":"PDF","Nombre":"Contrato","Contenido":"JVBERi0xLj...","TipoDoc":"CONTRATO","Aceptacion":"SI","StampFirmaFirmante":"1,80,500,180,80,H"}
]
}
Reminder: the domain su-dominio.com must be validated in your Transactional Email panel. If it is not, replace the EMAIL block with {"TIPO":"EMAIL","DOMINIO":"__pordefecto__","ASUNTOEMAIL":"OTP","MENSAJEEMAIL":"Your code is {{CODE}}"} to use the generic domain.
{
"RESP": "JSON",
"TIPOFIRMA": "OTP",
"CANALESFIRMA": [{"TIPO":"SMS","REMITENTE":"FIRMA","MENSAJE":"Firma: {{LINK}}"}],
"CANALESOTP": [
{"TIPO":"SMS","REMITENTE":"FIRMA","MENSAJE":"Your code: {{CODE}}"},
{"TIPO":"EMAIL","DOMINIO":"su-dominio.com","REMITENTE":"otp@su-dominio.com","IDPLANTILLA":67890,"ASUNTOEMAIL":"OTP"}
],
"FIRMANTES": [{"Nombre":"Juan","NIF":"00000000T","Telefono":"34600000001","Email":"j@a.com","Orden":1}],
"DOCUMENTOS": [{"Tipo":"CHECKBOX","Texto":"Acepto","Inicial":"OFF","Final":"ON"}]
}
{
"RESP": "JSON",
"TIPOFIRMA": "BIOMETRICA",
"CANALESFIRMA": [{"TIPO":"SMS","REMITENTE":"FIRMA","MENSAJE":"Hello {{NOMBRE}}: {{LINK}}"}],
"ENVIOS": [
{"Firmantes":[{"Nombre":"Juan","NIF":"11111111H","Telefono":"34611111111","Email":"j@a.com","Orden":1}],"Variables":{"importe":"100€"}},
{"Firmantes":[{"Nombre":"Ana","NIF":"22222222J","Telefono":"34622222222","Email":"a@a.com","Orden":1}],"Variables":{"importe":"250€"}}
],
"DOCUMENTOS": [{"Tipo":"PLANTILLA","Plantilla":"1234-5678","Nombre":"Contrato","Aceptacion":"SI"}]
}
The response of example 5 will contain a Contratos field with 2 objects (one per contract created).
An agency sends the contract on behalf of its client 'Inmobiliaria Cliente Final SL': the PDF certificate and the signing process show the client's identity and logo instead of the ones configured in the agency's account.
{
"RESP": "JSON",
"TIPOFIRMA": "BIOMETRICA",
"CANALESFIRMA": [{"TIPO":"SMS","REMITENTE":"FIRMA","MENSAJE":"Firma: {{LINK}}"}],
"CERTIFICACION": {
"EMPRESA": "Inmobiliaria Cliente Final SL",
"CIF": "B00000000",
"TELEFONO": "+34910000000",
"LOGO": "https://www.clientefinal.com/img/logo.svg"
},
"FIRMANTES": [{"Nombre":"Juan","NIF":"00000000T","Telefono":"34600000001","Email":"j@a.com","Orden":1}],
"DOCUMENTOS": [{"Tipo":"PLANTILLA","Plantilla":"1234-5678","Nombre":"Contrato","Aceptacion":"SI"}]
}