Reseller administration API (7.0)

Download OpenAPI specification:Download

INTRODUCTION

This is not a public API: it is limited to resellers. Only corporate resellers (companies with a tax ID) that have been validated beforehand can use it. To be validated, request it from support: we check the company details and, if everything is in order, we enable it for you. Until it is enabled on your account, every call returns -2. How to request it, under Activation and security.

With this API a reseller manages its users (the accounts that hang from its own) from its own software, the same things it does by hand under Reseller users:



- Create new users. Each one receives a welcome email with the reseller's brand, from its email domain, with a link to choose a password.
- Change their details: name, company, tax ID (NIF/CIF), country and phone.
- Give them credits and take credits back.
- Validate their senders: a phone number (with a code that number receives) or an email domain (with some records in its DNS).
- Look up the list of its users, their senders and their email domains.
- Send on behalf of its users with its own keys, with each user's permission (see Sending on behalf of your users).
- Confirm its users' email and, when creating them, leave their certification and contracting details in place.
- Lend its own senders (SMS sender names and numbers) to its users for the messages it sends on their behalf.



It only acts on the users of the reseller making the call: with the ID of a user of another account the response is -5.

ACTIVATION AND SECURITY


1. Companies only. It is available only to corporate resellers: the account must belong to a company, with its company name and tax ID in Your details. It is not enabled for individuals.
2. You must be validated before using it. The API is not open for any account until support enables it. Request it from Support stating the public IP addresses your server will call from (one or several, or a small network). Support checks the company details and, if they are correct, enables it for those addresses. From any other address, or while it is not enabled, the response is -2, even if the user and key are right.
3. Only the account holder, with the API user and API Token of the main account. An authorised user (sub-account) or the key of a connection with an automation tool cannot use it.
4. Always over HTTPS and with POST. A GET request is rejected: your customers' data never travels in the address.
5. Everything is logged: every call, accepted or rejected, with the IP address it came from.

AUTHENTICATION

Same as the rest of our APIs: Basic authentication with your API user and your API Token, which you will find in your panel under Your details → Configure → Security.



Each request must include the header Authorization: Basic Base64StringAPI, where Base64StringAPI is the string UsuarioAPI:APIToken encoded in Base64. Almost every library does it for you if you give it the user and the key.

SENDING ON BEHALF OF YOUR USERS

You can send and query on behalf of one of your users with your own credentials, without knowing that user's: call the usual sending and query functions (those of our other APIs) with your API user and API Token, and add the ENNOMBREDE parameter with the user's ID (or the X-En-Nombre-De header).



- The request is handled as if the user made it: it is charged to their balance, with their senders, their opt-out list and their limits, and it stays among their messages. If you pay for the sending, give them the credits first with DistribuidorCreditos.
- The user's permission is required. Users you create through this API have it by default (the welcome email explains it to them). You can ask the others for it with DistribuidorUsuarios (ACCION=PEDIR_PERMISO): they receive an email with your brand and give it with a button. The user can give it or withdraw it whenever they want in their panel (Configuration > Security), where they also see what you have done on their behalf. Without permission, the response is -2.
- The same rules as in this API apply: only the account holder, from your authorised IP addresses and only with your users (with another one, -5). If the user is closed or blocked, -2.
- You can send with a sender of yours (your sender name or your number) if you have lent it to them with DistribuidorRemitentesCedidos. It is only valid in these requests: the user cannot use it on their own.
- It is accepted in the sending functions (SMS, certified SMS, RCS, WhatsApp, email, certified email, voice, omnichannel, OTP codes, contracts and identity verification), in their cancellations and date changes, in reports and results, in templates and in the balance query. Not in this reseller API nor in the integrations.
- Without ENNOMBREDE, everything works as always: the request is yours.

LIMITS

LimitHow much
Users on your accountOne for every €10 you have bought (for example, with €300 bought you can have 30 users). All your users count, those created in the panel and those created through the API. The user list tells you how many you have and how many you can have.
New users per day20 new users in 24 hours.
Codes to validate numbers50 in 24 hours. And at most 3 codes in one hour to the same number.
Requests60 per minute, adding up all the functions.
Emails to your users (to confirm their email or ask for permission)They count within the 50 codes per day. At most 3 in one hour to the same email and, to ask for permission, twice a day to the same user.
Requests on behalf of your users600 per minute.


If you need more, ask support: these limits can be raised account by account.

WHAT IS CHARGED


- The welcome email of each new user is charged in credits to your account, like any email. Without credits for that email the user is not created.
- The code to validate a number is charged to your account as an SMS (or as a call, if the number is a landline).
- Passing credits to a user costs nothing: they leave your balance and enter theirs.
- Emails to your users to confirm their email or ask for permission are charged to your account as an email.
- What you send on behalf of a user is charged to the user, from their balance, as if they sent it.

RESPONSE FORMAT

JSON by default. With the RESP parameter you can ask for TXT or XML.



You can send the parameters as a form or as a JSON body (Content-Type: application/json). Parameter names are not case-sensitive.



Every response includes Res. If it is negative, Error explains the reason, in Spanish:

ResWhat it means
1Done.
-1Wrong API user or API Token.
-2Not authorised: your account is not validated for this API (we have not enabled it), the request comes from an IP that is not on your list, you are not the account holder or the account is closed. In a request on behalf of a user, also: that user has not given you permission, is closed or blocked, or the function does not accept it.
-3A parameter is missing or not valid. Error says which.
-4Too many requests, or the same operation is already in progress. Wait a few seconds and retry.
-5That user does not exist or is not yours.
-6You have reached the user limit of your account or the daily limit of new users.
-7You do not have a validated email domain to write to your users (the welcome email, the one to confirm their email or the one asking for permission), or no credits to send it.
-8You do not have enough credits.
-9The user does not have that many credits to take back, or has too much negative balance (support reviews it).
-10That email already has an account.
-11The tax ID cannot be set: the Spanish Tax Agency does not match it with the company or the name, or it has been changed too many times.
-12The welcome email could not be sent, so the user has not been created. Try again later.
-13Validation code (of a number or of an email) wrong, expired or never requested.
-14Code or email limit: per number or email and hour, or per day.
-15The number is not valid, belongs to a country not supported or cannot be removed.
-16That domain cannot be used: it belongs to another account, the user already has its domain or it was not requested first.
-17That sender cannot be lent or withdrawn: it is not yours right now or it was not lent that way.
-20Internal error. Support has already been notified; try again later.

User list

/DistribuidorUsuarios

Without IDUSUARIO, it returns the list of your users, 100 at a time (PAGINA for the next ones), and your limit: how many users you have and how many you can have. You can look one up by its email (EMAIL) or by its tax ID (CIF), written in full.

With IDUSUARIO, it returns that user with the senders it can use right now and its email domains (validated and in progress). It also says whether its email is confirmed (CorreoVerificado), whether it has given you permission to send on its behalf (EnvioEnNombre) and its certification and contracting details (DatosCertificacion, or null if it has none).

Actions on that user, with ACCION. Those that write to the user do so from an email domain of yours, validated, with your brand, and are charged to your account as an email:
- ENVIAR_CODIGO_CORREO: sends an email to confirm the address is theirs, with a button (they confirm it themselves, without signing in to the panel) and a 6-digit code valid for 10 minutes, in case they read it out to you. If it is already confirmed, nothing is sent.
- VALIDAR_CORREO with CODIGO: checks that code. There are three attempts; after that, a new one must be requested.
- PEDIR_PERMISO: asks for permission to send on their behalf (see Sending on behalf of your users). They give it with a button. If they already have, nothing is sent.

With a confirmed email, the CNMC sender names (aliases) of their domain are assigned to them automatically. The email is also confirmed when the user chooses their password with the link in the welcome email.

Authorizations:
basicAuth
query Parameters
Idusuario
integer
Example: Idusuario=97801

ID of one of your users. Optional: without it, the list.

Email
string
Example: Email=cliente@ejemplo.es

Finds the user with this email, written in full. Not case-sensitive.

Cif
string
Example: Cif=B12345674

Finds the users with this tax ID, written in full. Hyphens or spaces do not matter.

Pagina
integer
Example: Pagina=1

Page of the list, 100 users each. Page 1 by default.

Accion
string
Example: Accion=ENVIAR_CODIGO_CORREO

Optional, with IDUSUARIO. Without it, the list or the user.
ENVIAR_CODIGO_CORREO - Sends an email to confirm their email, with a button and a code
VALIDAR_CORREO - Checks the CODIGO they received
PEDIR_PERMISO - Asks for permission to send on their behalf

Codigo
string
Example: Codigo=482913

With ACCION=VALIDAR_CORREO: the 6-digit code the user received.

Resp
string
Example: Resp=JSON

Response format.
JSON - The response is returned in JSON
XML - The response is returned in XML
TXT - The response is returned as plain text

Request Body schema:

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

Idusuario
integer
Email
string
Cif
string
Pagina
integer
Accion
string
Codigo
string
Resp
string

Responses

Response Schema: application/json
Res
required
integer <int32>

Result. The codes are in the introduction.

Total
integer

In the list: how many users match the search.

Pagina
integer

In the list: the page returned.

PorPagina
integer

In the list: users per page.

Usuarios
Array of arrays

In the list: your users. For each one: IdUsuario, Nombre, Apellidos, Empresa, CIF, Email, Pais (phone country code), Telefono, FechaAlta, Creditos and Baja (1 if the account is closed).

Limite
object

In the list: Maximo, how many users you can have; Actuales, how many you have; EurosPorUsuario, how many euros bought give the right to one user.

Usuario
object

With IDUSUARIO: that user, with the same details as in the list.

Remitentes
object

With IDUSUARIO: the senders it can use right now. AliasSMS and AliasRCS, the sender names (aliases) registered in the CNMC Alias Register that belong to it; Numericos, its validated numbers; RemitenteDefecto, the one used when a message does not state a sender.

DominiosEmail
object

With IDUSUARIO: its email domains. Validados (with Estado and Premium) and EnProceso (with Estado and Paso).

CorreoVerificado
integer

With IDUSUARIO: 1 if the user has confirmed the email is theirs.

EnvioEnNombre
integer

1 if they have given you permission to send on their behalf.

DatosCertificacion
object

With IDUSUARIO: their certification and contracting details (Logo is 1 if they have a logo), or null if they have none.

Verificado
integer

In ENVIAR_CODIGO_CORREO and VALIDAR_CORREO: 1 if the email is already confirmed.

Correo
string

In the actions: the user's email that was written to or confirmed.

Coste
number

In the actions that write to the user: credits charged to your account for the email.

CaducaMinutos
integer

In ENVIAR_CODIGO_CORREO: minutes the code is valid for.

Restan
integer

In VALIDAR_CORREO, with a wrong code: attempts left.

Mensaje
string

In the actions: what has been done (in Spanish).

Error
string

The reason, when Res is negative.

Request samples

Content type
Example
{
  • "Pagina": 1
}

Response samples

Content type
application/json
Example
{
  • "Res": 1,
  • "Total": 2,
  • "Pagina": 1,
  • "PorPagina": 100,
  • "Usuarios": [
    ],
  • "Limite": {
    }
}

Create a user

/DistribuidorCrearUsuario

Creates a user of your account. The user signs in to the panel with its email and immediately receives a welcome email with a link to choose its password (valid for 7 days, single use). Nobody else knows its password, not even you.

The email is sent from an email domain of yours, validated on your account (Standard or Premium), with your company name. If you have several, choose which with DOMINIOEMAIL. Without a validated domain you cannot create users through the API (-7): you can add one in your panel, under Configuration > Email.

The user is created completely or not at all: if the welcome email cannot be sent, no half-created account is left (-12) and you can repeat the call.

Tax ID. If it is Spanish, it is checked with the Spanish Tax Agency: a company's (CIF) must match the company name you send in EMPRESA; a person's (NIF or NIE), their name and surname. If it does not match, the user is not created (-11). It is optional: you can create the user without it and add it later.

There is a maximum number of users depending on what you have bought and a maximum of new users per day: see Limits. Disposable email addresses are not accepted.

Permission to send on their behalf. Users created through the API give you permission to send on their behalf by default (EnvioEnNombre); the welcome email explains it and tells them how to withdraw it. That email also carries a link so they can confirm their email without signing in to the panel.

Certification and contracting details. They are the ones shown in the certificates and contracts the user sends, and they are created with the user: the company and the tax ID are those of the account (the CIF, already checked with the Spanish Tax Agency); the contact phone and email, the ones you state in CERT_TELEFONO and CERT_EMAIL (otherwise, the account's), and the logo, if you state it in CERT_LOGO. Afterwards the user changes them in their panel: through the API they can only be set if the user has none (see DistribuidorModificarUsuario).

Authorizations:
basicAuth
query Parameters
Email
required
string
Example: Email=ana@talleresperez.es

The user's email. It is what they will sign in to the panel with and where the welcome email goes. Required. It must not already have an account.

Nombre
string
Example: Nombre=Ana

Name. The name or the surname must be sent (at least two letters).

Apellidos
string
Example: Apellidos=Pérez Gil

Surname.

Empresa
string
Example: Empresa=Talleres Pérez SL

Company name. With a Spanish CIF, it must be the one registered with the Spanish Tax Agency.

Cif
string
Example: Cif=B12345674

Tax ID: Spanish NIF, NIE or CIF, or the VAT number of another EU country. Outside Spain (another PAIS), that country's identifier. Optional.

Pais
string
Example: Pais=34

Phone country code of the user's country, without the + sign. 34 (Spain) by default.

Telefono
string
Example: Telefono=600111222

Contact phone, 6 to 15 digits. Optional. It does not make it a sender: for that, DistribuidorRemitenteMovil.

Dominioemail
string
Example: Dominioemail=midistribuidora.es

An email domain of yours, validated on your account, from which the welcome email is sent. Optional: if you do not state it, one of the validated ones.

Remitentedefecto
string
Example: Remitentedefecto=TALLERPEREZ

Only for resellers that answer themselves for their customers' sender names before the CNMC (otherwise it is ignored). Default sender: a name of up to 11 letters or digits, or a phone number.

Cert_telefono
string
Example: Cert_telefono=+34 911234567

Contact phone shown in their certificates and contracts, 6 to 15 digits. Optional: otherwise, the account's.

Cert_email
string
Example: Cert_email=administracion@talleresperez.es

Contact email shown in their certificates and contracts. Optional: otherwise, the account's.

Cert_logo
string
Example: Cert_logo=https://www.talleresperez.es/logo.png

https address of their logo for certificates and contracts: a PNG or JPG image of up to 300 KB and 2000 × 2000 pixels. It is downloaded and stored; if it cannot be, the user is created anyway and Aviso says so. Optional.

Resp
string
Example: Resp=JSON

Response format.
JSON - The response is returned in JSON
XML - The response is returned in XML
TXT - The response is returned as plain text

Request Body schema:

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

Email
required
string
Nombre
string
Apellidos
string
Empresa
string
Cif
string
Pais
string
Telefono
string
Dominioemail
string
Remitentedefecto
string
Cert_telefono
string
Cert_email
string
Cert_logo
string
Resp
string

Responses

Response Schema: application/json
Res
required
integer <int32>

Result. The codes are in the introduction.

IdUsuario
integer

ID of the user created. It is the one used in the other functions.

Usuario
object

The user's details as stored (name with capital initials, email in lower case, CIF without hyphens).

CorreoBienvenida
string

Domain the welcome email was sent from.

Maximo
integer

How many users you can have.

Actuales
integer

How many you have now.

EnvioEnNombre
integer

1: you can send on behalf of this user (see Sending on behalf of your users).

DatosCertificacion
object

Their certification and contracting details as stored (Logo is 1 if they have a logo).

Aviso
string

If part of the certification details could not be set (the logo, for example): what happened (in Spanish). The user has been created.

Error
string

The reason, when Res is negative.

Request samples

Content type
Example
{
  • "Email": "ana@talleresperez.es",
  • "Nombre": "Ana",
  • "Apellidos": "Pérez Gil",
  • "Empresa": "Talleres Pérez SL",
  • "CIF": "B12345674",
  • "Telefono": "600111222"
}

Response samples

Content type
application/json
Example
{
  • "Res": 1,
  • "IdUsuario": 97801,
  • "Usuario": {
    },
  • "CorreoBienvenida": "midistribuidora.es",
  • "Maximo": 30,
  • "Actuales": 3,
  • "EnvioEnNombre": 1,
  • "DatosCertificacion": {
    }
}

Change a user's details

/DistribuidorModificarUsuario

Changes the details of one of your users. Send only what changes; what you do not send stays as it is. To empty a field, send it empty.

All or nothing. If the tax ID cannot be set, none of the changes of that call are saved.

Tax ID. A Spanish one is checked with the Spanish Tax Agency against the company or the name of that same call: if the company name and the CIF change at the same time, send both together. There is a cap on tax ID changes per user (two every 30 days and five attempts per day). When it changes, the user can no longer use the CNMC sender names (aliases) that depended on the previous one: Aviso explains it and you receive an email with the details.

The user's email cannot be changed through the API: it is what they sign in to the panel with and where they recover their password. The user changes it in Your details.

Certification and contracting details (CERT_TELEFONO, CERT_EMAIL, CERT_LOGO): they are only set if the user has none (the company or the tax ID is missing). The company and the tax ID are those of their account, with the changes of that same call; if they already had something (their logo, for example), it is kept and only what is missing is filled in. If they already have details, the response is -3: the user changes them in their panel. If account details also change in the same call, those are saved anyway and Aviso says why the certification ones were not.

Authorizations:
basicAuth
query Parameters
Idusuario
required
integer
Example: Idusuario=97801

ID of one of your users. Required.

Nombre
string
Example: Nombre=Ana

New name.

Apellidos
string
Example: Apellidos=Pérez Gil

New surname.

Empresa
string
Example: Empresa=Talleres Pérez e Hijos SL

New company name.

Cif
string
Example: Cif=B12345674

New tax ID. If it is the same one written differently (with hyphens, in lower case), it is only stored properly written.

Pais
string
Example: Pais=34

Phone country code, without the + sign.

Telefono
string
Example: Telefono=611222333

Contact phone, 6 to 15 digits.

Remitentedefecto
string
Example: Remitentedefecto=TALLERPEREZ

Only for resellers that answer themselves for their customers' sender names before the CNMC (otherwise it is ignored). Default sender: a name of up to 11 letters or digits, or a phone number.

Cert_telefono
string
Example: Cert_telefono=+34 911234567

Only if they have no certification details: contact phone for their certificates and contracts. Otherwise, the account's.

Cert_email
string
Example: Cert_email=administracion@talleresperez.es

Only if they have no certification details: contact email for their certificates and contracts. Otherwise, the account's.

Cert_logo
string
Example: Cert_logo=https://www.talleresperez.es/logo.png

Only if they have neither certification details nor a logo: https address of their logo, PNG or JPG of up to 300 KB and 2000 × 2000 pixels.

Email
string
Example: Email=

Not accepted: if you send it, the response is -3 and nothing changes.

Resp
string
Example: Resp=JSON

Response format.
JSON - The response is returned in JSON
XML - The response is returned in XML
TXT - The response is returned as plain text

Request Body schema:

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

Idusuario
required
integer
Nombre
string
Apellidos
string
Empresa
string
Cif
string
Pais
string
Telefono
string
Remitentedefecto
string
Cert_telefono
string
Cert_email
string
Cert_logo
string
Email
string
Resp
string

Responses

Response Schema: application/json
Res
required
integer <int32>

Result. The codes are in the introduction.

Usuario
object

The user's details as stored.

Aviso
string

If, when changing the tax ID, the sender names the user can use have changed, or if the certification details could not be fully set: what happened (in Spanish).

DatosCertificacion
object

With CERT_*: their certification and contracting details as stored (Logo is 1 if they have a logo).

Error
string

The reason, when Res is negative.

Request samples

Content type
Example
{
  • "IdUsuario": 97801,
  • "Empresa": "Talleres Pérez e Hijos SL",
  • "CIF": "B12345674"
}

Response samples

Content type
application/json
Example
{
  • "Res": 1,
  • "Usuario": {
    }
}

Give or take credits

/DistribuidorCreditos

Moves credits from your account to one of your users (DAR) or returns them from that user to you (QUITAR).

- Never more than there are. If you do not have the credits you want to give, or the user does not have the ones you want to take back, nothing moves: whatever is there is not split. The response says so (-8 or -9) and includes the existing balance.
- Only with your users. With another account's user, -5.
- A user with more than 100 credits in negative cannot receive credits: support reviews it and has already been notified.
- Two simultaneous calls cannot spend the same balance twice.

Retries without duplicates. If your software does not receive the response (a network cut, a timeout), it cannot know whether the credits moved. Send with each operation a REFERENCIA of your own (for example, the order number): if you repeat the call with the same one, nothing moves again and the response is the first one, with "Repetida":1. If the first one did not go through (negative response), the reference stays free and you can repeat it.

Authorizations:
basicAuth
query Parameters
Idusuario
required
integer
Example: Idusuario=97801

ID of one of your users. Required.

Operacion
required
string
Example: Operacion=DAR

Required.
DAR - From your account to the user
QUITAR - From the user to your account

Creditos
required
string
Example: Creditos=150

How many credits. Greater than 0, with at most two decimals (point or comma): 150, 12.50. Required.

Referencia
string
Example: Referencia=PEDIDO-2026-0412

An ID of your own for this operation, so that a retry does not repeat it. Optional but recommended. Up to 64 letters and digits; . _ - : are also allowed. Case-sensitive.

Resp
string
Example: Resp=JSON

Response format.
JSON - The response is returned in JSON
XML - The response is returned in XML
TXT - The response is returned as plain text

Request Body schema:

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

Idusuario
required
integer
Operacion
required
string
Creditos
required
string
Referencia
string
Resp
string

Responses

Response Schema: application/json
Res
required
integer <int32>

Result. The codes are in the introduction.

Operacion
string

The operation carried out.

Creditos
number

The credits moved.

CreditosDistribuidor
number

Your balance after the operation (or the one you have, if you could not give).

CreditosUsuario
number

The user's balance after the operation (or the one it has, if they could not be taken back).

IdUsuario
integer

The user.

Referencia
string

The reference you sent.

Repetida
integer

Present, with value 1, when that reference had already been carried out: nothing has moved and the response is the one from then.

Error
string

The reason, when Res is negative.

Request samples

Content type
{
  • "IdUsuario": 97801,
  • "Operacion": "DAR",
  • "Creditos": "150",
  • "Referencia": "PEDIDO-2026-0412"
}

Response samples

Content type
application/json
Example
{
  • "Res": 1,
  • "Operacion": "DAR",
  • "Creditos": 150,
  • "CreditosDistribuidor": 850,
  • "CreditosUsuario": 150,
  • "IdUsuario": 97801,
  • "Referencia": "PEDIDO-2026-0412"
}

Validate phone numbers

/DistribuidorRemitenteMovil

Validates a phone number as a sender of one of your users, or removes it. A number is only validated with proof that it is theirs: it receives a code that has to be sent back.

How a number is validated:
1. ACCION=ENVIAR_CODIGO with the number. It receives a 6-digit code by SMS (if it is a Spanish landline, by a call that reads it out; calls between 9:00 and 22:00). It is charged to your account.
2. Your customer tells you the code.
3. ACCION=VALIDAR with the same number and the CODIGO. From then on the user can send with that number.

The code expires after 10 minutes and allows 3 attempts; after that a new one must be requested. It is only valid for that user and that number.

ACCION=LISTAR returns the senders the user can use right now, and ACCION=BORRAR removes a number. Numbers rented from the platform (voice numbers or numbers to receive replies) are not removed here: they stop being senders when they are cancelled.

Through the API, numbers from these countries can be validated: Spain (34), Portugal (351), Andorra (376), France (33), Italy (39), Germany (49), United Kingdom (44), Switzerland (41), Belgium (32), the Netherlands (31), Ireland (353) and Austria (43). For another country, contact Support.

Sender names (aliases, such as TALLERPEREZ) are not validated here: they depend on the CNMC Alias Register. To let your users use yours in what you send on their behalf, DistribuidorRemitentesCedidos.

Authorizations:
basicAuth
query Parameters
Idusuario
required
integer
Example: Idusuario=97801

ID of one of your users. Required.

Accion
required
string
Example: Accion=ENVIAR_CODIGO

Required.
LISTAR - The senders it can use right now
ENVIAR_CODIGO - Sends the code to the number
VALIDAR - Checks the code and adds the number
BORRAR - Removes the number

Prefijo
string
Example: Prefijo=34

Country code of the number, without the + sign. 34 by default.

Numero
string
Example: Numero=600111222

The number, without the country code (with it in front is also fine). Required except for LISTAR.

Codigo
string
Example: Codigo=482913

For VALIDAR: the 6-digit code the number has received.

Extension
string
Example: Extension=214

For ENVIAR_CODIGO to a landline with a switchboard: the extension to put the call through to.

Resp
string
Example: Resp=JSON

Response format.
JSON - The response is returned in JSON
XML - The response is returned in XML
TXT - The response is returned as plain text

Request Body schema:

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

Idusuario
required
integer
Accion
required
string
Prefijo
string
Numero
string
Codigo
string
Extension
string
Resp
string

Responses

Response Schema: application/json
Res
required
integer <int32>

Result. The codes are in the introduction.

Numero
string

The full number, with the country code.

Canal
string

For ENVIAR_CODIGO: SMS or VOZ (call).

Coste
number

For ENVIAR_CODIGO: credits it cost.

CaducaMinutos
integer

For ENVIAR_CODIGO: minutes the code is valid.

YaValidado
integer

For ENVIAR_CODIGO: 1 if the number was already a sender of the user (nothing is sent or charged).

Nuevo
integer

For VALIDAR: 1 if the number has just been added; 0 if it already was.

Restan
integer

For VALIDAR with a wrong code: attempts left.

EraDefecto
integer

For BORRAR: 1 if it was the default sender (it stops being so).

AliasSMS
Array of arrays

For LISTAR: sender names for SMS.

AliasRCS
Array of arrays

For LISTAR: sender names for RCS.

Numericos
Array of arrays

For LISTAR: validated numbers.

RemitenteDefecto
string

For LISTAR: the default sender.

Mensaje
string

What happened, in Spanish, to show it if you wish.

Error
string

The reason, when Res is negative.

Request samples

Content type
Example
{
  • "IdUsuario": 97801,
  • "Accion": "ENVIAR_CODIGO",
  • "Prefijo": "34",
  • "Numero": "600111222"
}

Response samples

Content type
application/json
Example
{
  • "Res": 1,
  • "Canal": "SMS",
  • "Numero": "34600111222",
  • "Coste": 1,
  • "CaducaMinutos": 10,
  • "Mensaje": "Le hemos enviado el código por SMS."
}

Validate email domains

/DistribuidorRemitenteEmail

Validates the email domain of one of your users (for example talleresperez.es) so that it can send emails from it. It is only validated with proof that the domain is theirs: some records in the domain's DNS, added by whoever manages it.

Step by step:
1. ACCION=SOLICITAR with the domain. The response includes in Registros a TXT record to prove the domain is theirs.
2. That record is added to the domain's DNS, exactly as given, and ACCION=COMPROBAR is called.
3. When the TXT is right, the response includes the records that sign the emails (DKIM, three CNAME), the one for bounces (a CNAME on mail.) and the recommended SPF and DMARC. They are added to the DNS and COMPROBAR is called again.
4. With everything in place, verification takes between 5 and 30 minutes: meanwhile, COMPROBAR answers PENDIENTE_VERIFICACION. When it answers ACTIVO, the user can already send from its domain.

Call COMPROBAR as many times as needed: each time it says which step it is at (Estado), which records have to be added and, if one is missing, which (Errores). DNS changes can take a while to show, sometimes hours. Always copy the name and value of each record from the response.

Each user can have one domain of this kind (Standard). A domain validated on another account cannot be requested. Premium domains are set up with support.

Authorizations:
basicAuth
query Parameters
Idusuario
required
integer
Example: Idusuario=97801

ID of one of your users. Required.

Accion
required
string
Example: Accion=SOLICITAR

Required.
LISTAR - Its validated domains and those in progress
SOLICITAR - Starts validating a domain
COMPROBAR - Checks the DNS and moves forward as far as possible

Dominio
string
Example: Dominio=talleresperez.es

The domain, without www or https://. Up to 35 characters. Required except for LISTAR.

Resp
string
Example: Resp=JSON

Response format.
JSON - The response is returned in JSON
XML - The response is returned in XML
TXT - The response is returned as plain text

Request Body schema:

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

Idusuario
required
integer
Accion
required
string
Dominio
string
Resp
string

Responses

Response Schema: application/json
Res
required
integer <int32>

Result. The codes are in the introduction. A domain that is not ready yet is not an error: Res is 1 and Estado says what is missing.

Dominio
string

The domain.

Estado
string

Which step it is at:

PENDIENTE_PROPIEDADThe TXT record proving the domain is theirs is missing.
PENDIENTE_DNSThe signature (DKIM) or bounce records are missing.
PENDIENTE_VERIFICACIONThe records are right; verification still has to finish (5 to 30 minutes).
ACTIVOValidated: it can already send from it.
Registros
Array of arrays

The records that must be added to the domain's DNS. For each one: Tipo (TXT or CNAME), Nombre, Valor and Para (what it is for, in Spanish). Copy them exactly.

Errores
Array of arrays

For COMPROBAR, if a record is missing or wrong: which ones.

Validados
Array of arrays

For LISTAR: its validated domains.

EnProceso
Array of arrays

For LISTAR: those in progress.

Mensaje
string

What to do now, in Spanish, to show it if you wish.

Error
string

The reason, when Res is negative.

Request samples

Content type
{
  • "IdUsuario": 97801,
  • "Accion": "SOLICITAR",
  • "Dominio": "talleresperez.es"
}

Response samples

Content type
application/json
Example
{
  • "Res": 1,
  • "Dominio": "talleresperez.es",
  • "Estado": "PENDIENTE_PROPIEDAD",
  • "Registros": [
    ],
  • "Mensaje": "Pon estos registros en el DNS del dominio y llama a ACCION=COMPROBAR. Los cambios de DNS pueden tardar en verse."
}

Lend your senders

/DistribuidorRemitentesCedidos

Lends your users senders that you can use: your sender names (aliases) in the CNMC Alias Register and your validated numbers. That way, when you send on behalf of a user (see Sending on behalf of your users), the message can go out with your own sender, even if the user has none.

- It is only valid in what you send on their behalf, with ENNOMBREDE: the sender is you. The user cannot use it from their panel or with their own keys: for them it is a non-validated sender.
- State it in the REMITENTE of each message. If you write it with different capitals, it goes out in its registered form.
- You can lend it to one user (IDUSUARIO) or to all yours (without IDUSUARIO).
- You can only lend what you can use at that moment, and it is checked again on every message: if a sender name stops being yours at the CNMC, it stops being valid for your users at once.
- SMS sender names and numbers. Not RCS: it always goes out with each account's RCS agent.

ACCION=LISTAR returns what you can lend and what you have lent (with IDUSUARIO, that user's, including what is lent to everyone).

Authorizations:
basicAuth
query Parameters
Accion
string
Example: Accion=CEDER

LISTAR by default.
LISTAR - What you can lend and what you have lent
CEDER - Lends a sender of yours
RETIRAR - Stops lending it

Remitente
string
Example: Remitente=MIDISTRIB

For CEDER and RETIRAR: the sender name or the number (with or without the country code).

Tipo
string
Example: Tipo=SMS

For CEDER and RETIRAR.
SMS - An SMS sender name
NUM - A number

Idusuario
integer
Example: Idusuario=97801

The user you lend it to or withdraw it from. Without it (or with 0), all your users. For LISTAR, to see one user's.

Resp
string
Example: Resp=JSON

Response format.
JSON - The response is returned in JSON
XML - The response is returned in XML
TXT - The response is returned as plain text

Request Body schema:

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

Accion
string
Remitente
string
Tipo
string
Idusuario
integer
Resp
string

Responses

Response Schema: application/json
Res
required
integer <int32>

Result. The codes are in the introduction.

Cedibles
object

For LISTAR: what you can lend right now. SMS, your sender names; NUM, your numbers.

Cedidos
Array of arrays

For LISTAR: what you have lent. For each one: Remitente, Tipo, IdUsuario (0 = all your users) and Fecha.

Remitente
string

For CEDER: the sender lent, in its registered form.

Tipo
string

For CEDER: SMS or NUM.

IdUsuario
integer

For CEDER: to whom (0 = all your users).

Retirado
integer

For RETIRAR: 1 if it has been withdrawn.

Mensaje
string

What has been done (in Spanish).

Error
string

The reason, when Res is negative.

Request samples

Content type
Example
{
  • "Accion": "CEDER",
  • "Remitente": "MIDISTRIB",
  • "Tipo": "SMS",
  • "IdUsuario": 97801
}

Response samples

Content type
application/json
Example
{
  • "Res": 1,
  • "Remitente": "MIDISTRIB",
  • "Tipo": "SMS",
  • "IdUsuario": 97801,
  • "Mensaje": "Cedido. Solo vale en los envíos que hagas en nombre de ese usuario por la API."
}