{
  "openapi": "3.1.0",
  "info": {
    "title": "API de MundoSMS (API REST v3)",
    "version": "2026-11-21",
    "summary": "Centralita, llamadas, SMS, VozPush, NumCheck y WhatsApp de MundoSMS",
    "description": "API REST en https://api.mundosms.es/v3/. En GET y DELETE los parámetros van en la query; en POST y PATCH, en el cuerpo JSON. Autenticación: `Authorization: Bearer <token>` y, si la clave exige firma, `X-Timestamp` (epoch en segundos o milisegundos, ±5 min) y `X-Signature = base64url(HMAC-SHA256(clave_privada, token + \".\" + timestamp + \".\" + MÉTODO + \" \" + ruta_con_query + \".\" + cuerpo))` sin relleno «=», con la ruta desde /v3/ y la query y el cuerpo TAL CUAL se envían; cada petición firmada vale una vez. Respuesta siempre JSON con `status`, `status_code` (texto) y `message`, y los datos en `data`; fechas «AAAA-MM-DD hh:mm:ss.mmm» en hora de Madrid con su gemela `_iso` (ISO 8601 con zona). Cada respuesta lleva `X-Request-Id`. Referencia completa, ejemplos y formulario de prueba: https://www.mundosms.es/api-v3",
    "contact": {
      "name": "MundoSMS",
      "url": "https://www.mundosms.es/contacto"
    }
  },
  "externalDocs": {
    "description": "Referencia de la API",
    "url": "https://www.mundosms.es/api-v3"
  },
  "servers": [
    {
      "url": "https://api.mundosms.es/v3"
    }
  ],
  "security": [
    {
      "bearer": [],
      "firma": []
    },
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Llamadas en curso e historial"
    },
    {
      "name": "Números y extensiones"
    },
    {
      "name": "Click2dial"
    },
    {
      "name": "Grabaciones, locuciones y diagramas"
    },
    {
      "name": "VozPush: llamadas automáticas"
    },
    {
      "name": "SMS"
    },
    {
      "name": "NumCheck"
    },
    {
      "name": "WhatsApp"
    }
  ],
  "paths": {
    "/calls/live": {
      "get": {
        "operationId": "get_calls_live",
        "summary": "llamadas en curso",
        "tags": [
          "Llamadas en curso e historial"
        ],
        "description": "**Permiso:** cualquiera de `read`, `voip`, `list_voiplivecalls` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-calls-live-llamadas-en-curso",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-calls-live-llamadas-en-curso"
        },
        "x-mundosms-method": "list_voiplivecalls",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "in",
                "out",
                "func"
              ],
              "description": "`all` (por defecto), `in`, `out` o `func`"
            }
          },
          {
            "name": "extension",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "solo las llamadas en las que participa esta extensión. Con ella, cada llamada lleva `other_party`: con quién habla la extensión"
            }
          },
          {
            "name": "number",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "solo las llamadas en las que aparece este número (origen, destino o alguna pata)"
            }
          },
          {
            "name": "from_datetime",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
              "description": "solo las que empezaron desde esta hora"
            }
          },
          {
            "name": "all_legs",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "`true`: también las llamadas que ya van como pata de otra, sueltas. Por defecto, solo las principales (como en `GET /v3/calls`)"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "1-500, 100 por defecto"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "integer"
                        },
                        "calls": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "client_id": {},
                              "type": {
                                "type": "string"
                              },
                              "from": {
                                "type": "string"
                              },
                              "to": {
                                "type": "string"
                              },
                              "party": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "date_start": {
                                "type": "string"
                              },
                              "date_start_iso": {
                                "type": "string"
                              },
                              "date_answer": {
                                "type": "string"
                              },
                              "date_answer_iso": {
                                "type": "string"
                              },
                              "date_bridged": {
                                "type": "string"
                              },
                              "date_bridged_iso": {
                                "type": "string"
                              },
                              "legs": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer"
                                    },
                                    "client_id": {},
                                    "type": {
                                      "type": "string"
                                    },
                                    "from": {
                                      "type": "string"
                                    },
                                    "to": {
                                      "type": "string"
                                    },
                                    "party": {
                                      "type": "string"
                                    },
                                    "state": {
                                      "type": "string"
                                    },
                                    "date_start": {
                                      "type": "string"
                                    },
                                    "date_start_iso": {
                                      "type": "string"
                                    },
                                    "date_answer": {
                                      "type": "string"
                                    },
                                    "date_answer_iso": {
                                      "type": "string"
                                    },
                                    "date_bridged": {},
                                    "date_bridged_iso": {}
                                  }
                                }
                              },
                              "other_party": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "has_more": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "1 results",
                  "data": {
                    "results": 1,
                    "calls": [
                      {
                        "id": 8812399,
                        "client_id": null,
                        "type": "in",
                        "from": "34600123456",
                        "to": "34910123456",
                        "party": "recepcion",
                        "state": "talking",
                        "date_start": "2026-11-20 11:02:10.031",
                        "date_start_iso": "2026-11-20T11:02:10.031+01:00",
                        "date_answer": "2026-11-20 11:02:14.540",
                        "date_answer_iso": "2026-11-20T11:02:14.540+01:00",
                        "date_bridged": "2026-11-20 11:02:14.602",
                        "date_bridged_iso": "2026-11-20T11:02:14.602+01:00",
                        "legs": [
                          {
                            "id": 5511203,
                            "client_id": null,
                            "type": "out",
                            "from": "34910123456",
                            "to": "recepcion",
                            "party": "recepcion",
                            "state": "talking",
                            "date_start": "2026-11-20 11:02:10.412",
                            "date_start_iso": "2026-11-20T11:02:10.412+01:00",
                            "date_answer": "2026-11-20 11:02:14.540",
                            "date_answer_iso": "2026-11-20T11:02:14.540+01:00",
                            "date_bridged": null,
                            "date_bridged_iso": null
                          }
                        ],
                        "other_party": "34600123456"
                      }
                    ],
                    "has_more": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter limit not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter limit not valid"
                    }
                  },
                  "e2": {
                    "summary": "Parameter number not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter number not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/calls/live/{type}/{id}/hangup": {
      "post": {
        "operationId": "post_calls_live_type_id_hangup",
        "summary": "colgar una llamada en curso",
        "tags": [
          "Llamadas en curso e historial"
        ],
        "description": "**Permiso:** cualquiera de `write`, `voip`, `action_voiplivecalls` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-calls-live-type-id-hangup-colgar-una-llamada-en-curso",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-calls-live-type-id-hangup-colgar-una-llamada-en-curso"
        },
        "x-mundosms-method": "action_voiplivecalls",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "in",
                "out",
                "func"
              ],
              "description": "`in`, `out` o `func` (en la ruta)"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "el `id` de la llamada (de `GET /v3/calls/live`) (en la ruta)"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "type": {
                          "type": "string"
                        },
                        "changed": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 8812399,
                    "type": "in",
                    "changed": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter type not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter type not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Call not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Call not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/calls": {
      "get": {
        "operationId": "get_calls",
        "summary": "historial de llamadas",
        "tags": [
          "Llamadas en curso e historial"
        ],
        "description": "**Permiso:** cualquiera de `read`, `voip`, `list_voipcalls` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-calls-historial-de-llamadas",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-calls-historial-de-llamadas"
        },
        "x-mundosms-method": "list_voipcalls",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all"
              ],
              "description": "`all` (por defecto): entrantes, salientes y funciones **sin padre** (las que empiezan solas, no las que son un paso de una llamada; esas salen con `include_related`), ordenadas por hora de inicio. O solo `in`, `out` o `func`"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "el `next_cursor` de la página anterior, tal cual (con cualquier `type`)"
            }
          },
          {
            "name": "from_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "description": "con `type` `in`, `out` o `func`: lo mismo que `cursor`, como número (por compatibilidad)"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "1-100, 20 por defecto"
            }
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "`asc` o `desc` (ver Paginación con cursor)"
            }
          },
          {
            "name": "from_datetime",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
              "description": "desde esta hora de inicio (incluida)"
            }
          },
          {
            "name": "to_datetime",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
              "description": "hasta esta hora de inicio (sin incluir)"
            }
          },
          {
            "name": "stop_at_ongoing",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "`true`: la página se **corta** antes de la primera llamada que siga en curso (no la quita: se para ahí), para que no te saltes ninguna a medias. Una que lleve más de 12 horas «en curso» (un registro que no se cerró) no la corta: sale con su estado. Exige `order: \"asc\"`"
            }
          },
          {
            "name": "number",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "las llamadas en las que este número es el origen o el destino"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "answered",
                "missed"
              ],
              "description": "`answered` o `missed`. **Entrantes:** `answered` = la atendió alguien (`attended_by`); `missed` = no la atendió nadie y ya colgó, aunque la centralita la descolgara para el menú o la cola. **Salientes:** por el estado, `answered` = contestó el destino (ver Estados de una llamada). Solo con `type` `in` u `out`"
            }
          },
          {
            "name": "extension",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "salientes: la extensión que llamó; entrantes: la que descolgó. Solo con `type` `in` u `out`"
            }
          },
          {
            "name": "did",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "entrantes: tu número al que llamaron; salientes: el número que se presentó. Solo con `type` `in` u `out`"
            }
          },
          {
            "name": "all_legs",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "`true`: también las patas internas de cada llamada (por defecto solo las principales)"
            }
          },
          {
            "name": "include_related",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "`true`: cada llamada trae sus relacionadas (desvíos, transferencias, funciones) en `related`"
            }
          },
          {
            "name": "include_xml",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "`true`: en las de función, el plan XML entero en `xml_plan` (es grande)"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "integer"
                        },
                        "calls": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "client_id": {},
                              "type": {
                                "type": "string"
                              },
                              "from": {
                                "type": "string"
                              },
                              "from_name": {},
                              "to": {
                                "type": "string"
                              },
                              "to_type": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "state_code": {
                                "type": "integer"
                              },
                              "date_start": {
                                "type": "string"
                              },
                              "date_start_iso": {
                                "type": "string"
                              },
                              "date_answer": {},
                              "date_answer_iso": {},
                              "date_end": {
                                "type": "string"
                              },
                              "date_end_iso": {
                                "type": "string"
                              },
                              "duration": {
                                "type": "integer"
                              },
                              "duration_ring": {
                                "type": "integer"
                              },
                              "pickup_extension": {},
                              "attended_by": {},
                              "last_attended_by": {},
                              "followup": {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "type": "integer"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "date": {
                                    "type": "string"
                                  },
                                  "date_iso": {
                                    "type": "string"
                                  },
                                  "extension": {
                                    "type": "string"
                                  },
                                  "callback_attempts": {
                                    "type": "integer"
                                  }
                                }
                              },
                              "credits": {
                                "type": "number"
                              },
                              "credits_total": {
                                "type": "number"
                              },
                              "bundle_id": {},
                              "callingcard_id": {},
                              "parent_type": {},
                              "parent_id": {}
                            }
                          }
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "next_from_id": {
                          "type": "integer"
                        },
                        "next_cursor": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "1 results",
                  "data": {
                    "results": 1,
                    "calls": [
                      {
                        "id": 8812001,
                        "client_id": null,
                        "type": "in",
                        "from": "34600123456",
                        "from_name": null,
                        "to": "34910123456",
                        "to_type": "landline",
                        "state": "no_answer",
                        "state_code": 3,
                        "date_start": "2026-11-18 17:40:22.113",
                        "date_start_iso": "2026-11-18T17:40:22.113+01:00",
                        "date_answer": null,
                        "date_answer_iso": null,
                        "date_end": "2026-11-18 17:40:52.907",
                        "date_end_iso": "2026-11-18T17:40:52.907+01:00",
                        "duration": 0,
                        "duration_ring": 30,
                        "pickup_extension": null,
                        "attended_by": null,
                        "last_attended_by": null,
                        "followup": {
                          "state": "called_back",
                          "id": 8812950,
                          "type": "out",
                          "date": "2026-11-18 17:52:10.120",
                          "date_iso": "2026-11-18T17:52:10.120+01:00",
                          "extension": "recepcion",
                          "callback_attempts": 1
                        },
                        "credits": 0.0,
                        "credits_total": 0.0,
                        "bundle_id": null,
                        "callingcard_id": null,
                        "parent_type": null,
                        "parent_id": null
                      }
                    ],
                    "has_more": false,
                    "next_from_id": 8812001,
                    "next_cursor": "8812001"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter type not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter type not valid"
                    }
                  },
                  "e2": {
                    "summary": "Parameter <nombre> not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter <nombre> not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Call not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Call not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_calls",
        "summary": "llamar desde una extensión",
        "tags": [
          "Click2dial"
        ],
        "description": "**Permiso:** cualquiera de `write`, `voip`, `click2dial` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-calls-llamar-desde-una-extension",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-calls-llamar-desde-una-extension"
        },
        "x-mundosms-method": "click2dial",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter extension not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter extension not valid"
                    }
                  },
                  "e2": {
                    "summary": "Parameter to not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter to not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Extension not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Extension not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  },
                  "e2": {
                    "summary": "Extension not registered",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Extension not registered"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  },
                  "e2": {
                    "summary": "Voice server unavailable",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Voice server unavailable"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "extension": {
                    "type": "string",
                    "description": "la extensión que suena primero"
                  },
                  "to": {
                    "type": "string",
                    "description": "el número al que se llama"
                  },
                  "from": {
                    "type": "string",
                    "description": "el número que verá el destino. Tiene que ser tuyo (un DID o un número verificado); si no, se presenta el de la extensión"
                  },
                  "extension_caller_id": {
                    "type": "string",
                    "description": "lo que ve la extensión en su pantalla mientras suena (por defecto, «Click2dial» y el destino)"
                  },
                  "url_callback": {
                    "type": "string",
                    "description": "se acepta (`https://`, pública, hasta 150 caracteres), pero **hoy no se envía ningún aviso**: consulta la llamada en `GET /v3/calls`"
                  }
                },
                "required": [
                  "extension",
                  "to"
                ]
              },
              "example": {
                "extension": "recepcion",
                "to": "34600123456",
                "from": "34910123456"
              }
            }
          }
        }
      }
    },
    "/calls/{type}/{id}": {
      "get": {
        "operationId": "get_calls_type_id",
        "summary": "una llamada por su `id` (sin paginación",
        "tags": [
          "Llamadas en curso e historial"
        ],
        "description": "una llamada por su `id` (sin paginación. Es parte de `GET /v3/calls` (historial de llamadas). **Permiso:** cualquiera de `read`, `voip`, `list_voipcalls` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-calls-historial-de-llamadas",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-calls-historial-de-llamadas"
        },
        "x-mundosms-method": "list_voipcalls",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "all"
              ],
              "description": "`all` (por defecto): entrantes, salientes y funciones **sin padre** (las que empiezan solas, no las que son un paso de una llamada; esas salen con `include_related`), ordenadas por hora de inicio. O solo `in`, `out` o `func`"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/calls/missed": {
      "get": {
        "operationId": "get_calls_missed",
        "summary": "llamadas perdidas por devolver",
        "tags": [
          "Llamadas en curso e historial"
        ],
        "description": "**Permiso:** cualquiera de `read`, `voip`, `list_voipcalls` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-calls-missed-llamadas-perdidas-por-devolver",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-calls-missed-llamadas-perdidas-por-devolver"
        },
        "x-mundosms-method": "list_voipcalls",
        "parameters": [
          {
            "name": "from_datetime",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
              "description": "desde (incluida). Por defecto, hace 7 días; como mucho, hace 31"
            }
          },
          {
            "name": "to_datetime",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
              "description": "hasta (sin incluir). Por defecto, ahora"
            }
          },
          {
            "name": "number",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "un número que llamó"
            }
          },
          {
            "name": "did",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "tu número al que llamaron"
            }
          },
          {
            "name": "include_returned",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "`true`: también los números ya atendidos, con quién y cómo. Por defecto, solo los pendientes"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "1-500, 100 por defecto"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "integer"
                        },
                        "numbers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "number": {
                                "type": "string"
                              },
                              "did": {
                                "type": "string"
                              },
                              "missed_count": {
                                "type": "integer"
                              },
                              "first_missed": {
                                "type": "string"
                              },
                              "first_missed_iso": {
                                "type": "string"
                              },
                              "last_missed": {
                                "type": "string"
                              },
                              "last_missed_iso": {
                                "type": "string"
                              },
                              "last_call_id": {
                                "type": "integer"
                              },
                              "followup": {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string"
                                  },
                                  "id": {},
                                  "type": {},
                                  "date": {},
                                  "date_iso": {},
                                  "extension": {},
                                  "callback_attempts": {
                                    "type": "integer"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "anonymous": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "1 results",
                  "data": {
                    "results": 1,
                    "numbers": [
                      {
                        "number": "34600123456",
                        "did": "34910123456",
                        "missed_count": 2,
                        "first_missed": "2026-11-20 09:58:02.410",
                        "first_missed_iso": "2026-11-20T09:58:02.410+01:00",
                        "last_missed": "2026-11-20 10:31:15.002",
                        "last_missed_iso": "2026-11-20T10:31:15.002+01:00",
                        "last_call_id": 8812001,
                        "followup": {
                          "state": "pending",
                          "id": null,
                          "type": null,
                          "date": null,
                          "date_iso": null,
                          "extension": null,
                          "callback_attempts": 1
                        }
                      }
                    ],
                    "has_more": false,
                    "anonymous": 3
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter from_datetime not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter from_datetime not valid"
                    }
                  },
                  "e2": {
                    "summary": "Parameter <nombre> not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter <nombre> not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/calls/{type}/{id}/recording": {
      "get": {
        "operationId": "get_calls_type_id_recording",
        "summary": "grabación de una llamada",
        "tags": [
          "Llamadas en curso e historial"
        ],
        "description": "**Permiso:** cualquiera de `read`, `voip`, `getrecording_voipcalls` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-calls-type-id-recording-grabacion-de-una-llamada",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-calls-type-id-recording-grabacion-de-una-llamada"
        },
        "x-mundosms-method": "getrecording_voipcalls",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "in",
                "out",
                "func"
              ],
              "description": "`in`, `out` o `func` (en la ruta)"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "el `id` de la llamada (en la ruta)"
            }
          },
          {
            "name": "mode_out",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inline",
                "download",
                "base64"
              ],
              "description": "`inline` (por defecto: el audio en la respuesta), `download` (el audio como descarga) o `base64` (JSON con el audio en base64)"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "mp3"
              ],
              "description": "`mp3`: convertido a MP3, que reproduce cualquier navegador. Sin él, el formato original (normalmente OGG/Opus)"
            }
          },
          {
            "name": "filename",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "el nombre del fichero, sin extensión"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien: JSON con mode_out base64; el audio tal cual con inline o download",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "type": {
                          "type": "string"
                        },
                        "client_id": {},
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string"
                        },
                        "size": {
                          "type": "integer"
                        },
                        "base64": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 8812345,
                    "type": "in",
                    "client_id": null,
                    "filename": "llamada_8812345.mp3",
                    "content_type": "audio/mpeg",
                    "size": 845120,
                    "base64": "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYxLjcuMTAw..."
                  }
                }
              },
              "audio/*": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "audio/*"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Call not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Call not found"
                    }
                  },
                  "e3": {
                    "summary": "Recording not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Recording not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/numbers": {
      "get": {
        "operationId": "get_numbers",
        "summary": "tus números",
        "tags": [
          "Números y extensiones"
        ],
        "description": "**Permiso:** cualquiera de `read`, `voip`, `get_voipdids` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-numbers-tus-numeros",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-numbers-tus-numeros"
        },
        "x-mundosms-method": "get_voipdids",
        "parameters": [
          {
            "name": "did",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "un número concreto"
            }
          },
          {
            "name": "include_xml",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "`true`: el plan de llamadas XML de cada número en `xml_plan` (es grande)"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "el `next_cursor` de la página anterior: la página siguiente"
            }
          },
          {
            "name": "from_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "description": "lo mismo que `cursor`, como número (por compatibilidad)"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "1-500, 100 por defecto"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "integer"
                        },
                        "dids": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "client_id": {},
                              "did": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "date_created": {
                                "type": "string"
                              },
                              "date_created_iso": {
                                "type": "string"
                              },
                              "date_expire": {},
                              "date_expire_iso": {},
                              "date_last_activity": {
                                "type": "string"
                              },
                              "date_last_activity_iso": {
                                "type": "string"
                              },
                              "calls_enabled": {
                                "type": "boolean"
                              },
                              "fax_enabled": {
                                "type": "boolean"
                              },
                              "sms_enabled": {
                                "type": "boolean"
                              },
                              "diagram_id": {
                                "type": "integer"
                              },
                              "sms_url": {},
                              "sms_email": {},
                              "fax_url": {},
                              "fax_email": {},
                              "fax_extension": {},
                              "monthly_cost_euro": {
                                "type": "number"
                              },
                              "monthly_cost_credits": {
                                "type": "number"
                              },
                              "minute_cost_landline": {
                                "type": "number"
                              },
                              "minute_cost_mobile": {
                                "type": "number"
                              },
                              "sms_cost": {
                                "type": "number"
                              },
                              "record_calls": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "next_from_id": {
                          "type": "integer"
                        },
                        "next_cursor": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "1 results",
                  "data": {
                    "results": 1,
                    "dids": [
                      {
                        "id": 4410,
                        "client_id": null,
                        "did": "34910123456",
                        "name": "Centralita Madrid",
                        "date_created": "2025-03-02 12:30:00.000",
                        "date_created_iso": "2025-03-02T12:30:00.000+01:00",
                        "date_expire": null,
                        "date_expire_iso": null,
                        "date_last_activity": "2026-11-20 11:02:10.000",
                        "date_last_activity_iso": "2026-11-20T11:02:10.000+01:00",
                        "calls_enabled": true,
                        "fax_enabled": false,
                        "sms_enabled": false,
                        "diagram_id": 3120,
                        "sms_url": null,
                        "sms_email": null,
                        "fax_url": null,
                        "fax_email": null,
                        "fax_extension": null,
                        "monthly_cost_euro": 1.95,
                        "monthly_cost_credits": 39.0,
                        "minute_cost_landline": 0.0,
                        "minute_cost_mobile": 0.0,
                        "sms_cost": 0.0,
                        "record_calls": true
                      }
                    ],
                    "has_more": false,
                    "next_from_id": 4410,
                    "next_cursor": "4410"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "DID not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "DID not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/numbers/{did}": {
      "get": {
        "operationId": "get_numbers_did",
        "summary": "uno de tus números",
        "tags": [
          "Números y extensiones"
        ],
        "description": "uno de tus números. Es parte de `GET /v3/numbers` (tus números). **Permiso:** cualquiera de `read`, `voip`, `get_voipdids` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-numbers-tus-numeros",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-numbers-tus-numeros"
        },
        "x-mundosms-method": "get_voipdids",
        "parameters": [
          {
            "name": "did",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "un número concreto"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_numbers_did",
        "summary": "cambiar un número",
        "tags": [
          "Números y extensiones"
        ],
        "description": "**Permiso:** cualquiera de `write`, `voip`, `set_voipdids` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#patch-v3-numbers-did-cambiar-un-numero",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#patch-v3-numbers-did-cambiar-un-numero"
        },
        "x-mundosms-method": "set_voipdids",
        "parameters": [
          {
            "name": "did",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "el número (en la ruta)"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "did": {
                          "type": "string"
                        },
                        "changed": {
                          "type": "boolean"
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 4410,
                    "did": "34910123456",
                    "changed": true,
                    "fields": [
                      "record_calls",
                      "diagram_id",
                      "sms_email"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter <campo> not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter <campo> not valid"
                    }
                  },
                  "e2": {
                    "summary": "Body not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Body not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "DID not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "DID not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "el nombre del número, de 5 a 45 caracteres"
                  },
                  "diagram_id": {
                    "type": "integer",
                    "description": "el diagrama (de tu cuenta, con plan) que atiende las llamadas. Deja de usar `xml_plan`"
                  },
                  "xml_plan": {
                    "type": "string",
                    "description": "el plan en XML (se comprueba antes de guardar). Deja de usar `diagram_id`. `diagram_id` y `xml_plan` a la vez dan 400"
                  },
                  "record_calls": {
                    "type": "boolean",
                    "description": "grabar las llamadas"
                  },
                  "sms_url": {
                    "type": "string",
                    "description": "URL `http://` o `https://` (hasta 100) a la que reenviar los SMS que lleguen al número; `\"\"` o `null` la quita. Hoy ningún número recibe SMS: se guarda, pero no se usa"
                  },
                  "sms_email": {
                    "type": "string",
                    "description": "correo (hasta 45) al que reenviar esos SMS; `\"\"` o `null` lo quita. Como `sms_url`, hoy no se usa"
                  },
                  "fax_url": {
                    "type": "string",
                    "description": "URL a la que reenviar los faxes; `\"\"` o `null` la quita"
                  },
                  "fax_email": {
                    "type": "string",
                    "description": "correo al que reenviar los faxes; `\"\"` o `null` lo quita"
                  },
                  "fax_extension": {
                    "type": "string",
                    "description": "extensión que recibe los faxes; `\"\"` o `null` la quita"
                  }
                }
              },
              "example": {
                "record_calls": false,
                "diagram_id": 3120,
                "sms_email": "recepcion@ejemplo.com"
              }
            }
          }
        }
      }
    },
    "/extensions": {
      "get": {
        "operationId": "get_extensions",
        "summary": "tus extensiones",
        "tags": [
          "Números y extensiones"
        ],
        "description": "**Permiso:** cualquiera de `read`, `voip`, `get_voipextensions` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-extensions-tus-extensiones",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-extensions-tus-extensiones"
        },
        "x-mundosms-method": "get_voipextensions",
        "parameters": [
          {
            "name": "extension",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "una extensión concreta"
            }
          },
          {
            "name": "include_status",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "`true`: el registro de cada extensión en `registration`. Por defecto, `true` con `extension` y `false` sin ella"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "integer"
                        },
                        "extensions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "client_id": {},
                              "extension": {
                                "type": "string"
                              },
                              "date_created": {
                                "type": "string"
                              },
                              "date_created_iso": {
                                "type": "string"
                              },
                              "date_last_activity": {
                                "type": "string"
                              },
                              "date_last_activity_iso": {
                                "type": "string"
                              },
                              "caller_id": {
                                "type": "string"
                              },
                              "caller_id_name": {
                                "type": "string"
                              },
                              "caller_id_number": {
                                "type": "string"
                              },
                              "comment": {},
                              "record_calls": {
                                "type": "boolean"
                              },
                              "password": {},
                              "registration": {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string"
                                  },
                                  "max_latency_ms": {
                                    "type": "number"
                                  },
                                  "connections_count": {
                                    "type": "integer"
                                  },
                                  "keepalive": {
                                    "type": "string"
                                  },
                                  "connections": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string"
                                        },
                                        "state": {
                                          "type": "string"
                                        },
                                        "host": {
                                          "type": "string"
                                        },
                                        "port": {
                                          "type": "integer"
                                        },
                                        "local_host": {
                                          "type": "string"
                                        },
                                        "local_port": {
                                          "type": "integer"
                                        },
                                        "server_host": {},
                                        "server_port": {},
                                        "protocol": {
                                          "type": "string"
                                        },
                                        "latency_ms": {
                                          "type": "number"
                                        },
                                        "user_agent": {
                                          "type": "string"
                                        },
                                        "date_last_keepalive": {
                                          "type": "string"
                                        },
                                        "date_last_keepalive_iso": {
                                          "type": "string"
                                        },
                                        "outbound_proxy": {}
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "1 results",
                  "data": {
                    "results": 1,
                    "extensions": [
                      {
                        "id": 20431,
                        "client_id": null,
                        "extension": "recepcion",
                        "date_created": "2025-03-02 12:41:07.000",
                        "date_created_iso": "2025-03-02T12:41:07.000+01:00",
                        "date_last_activity": "2026-11-20 11:02:14.000",
                        "date_last_activity_iso": "2026-11-20T11:02:14.000+01:00",
                        "caller_id": "\"Recepción\" <34910123456>",
                        "caller_id_name": "Recepción",
                        "caller_id_number": "34910123456",
                        "comment": null,
                        "record_calls": true,
                        "password": null,
                        "registration": {
                          "state": "registered",
                          "max_latency_ms": 31.4,
                          "connections_count": 1,
                          "keepalive": "ok",
                          "connections": [
                            {
                              "type": "sip",
                              "state": "reachable",
                              "host": "203.0.113.25",
                              "port": 5060,
                              "local_host": "192.168.1.30",
                              "local_port": 5060,
                              "server_host": null,
                              "server_port": null,
                              "protocol": "udp",
                              "latency_ms": 31.4,
                              "user_agent": "Yealink SIP-T54W 96.86.0.70",
                              "date_last_keepalive": "2026-11-20 11:05:00.000",
                              "date_last_keepalive_iso": "2026-11-20T11:05:00.000+01:00",
                              "outbound_proxy": null
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Extension not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Extension not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_extensions",
        "summary": "crear una extensión",
        "tags": [
          "Números y extensiones"
        ],
        "description": "**Permiso:** cualquiera de `write`, `voip`, `new_voipextensions` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-extensions-crear-una-extension",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-extensions-crear-una-extension"
        },
        "x-mundosms-method": "new_voipextensions",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "client_id": {},
                        "extension": {
                          "type": "string"
                        },
                        "password": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 20577,
                    "client_id": null,
                    "extension": "ventas2",
                    "password": "q8Rk2mXz7LwP"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter extension not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter extension not valid"
                    }
                  },
                  "e2": {
                    "summary": "Parameter caller_id not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter caller_id not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  },
                  "e3": {
                    "summary": "Caller ID not verified",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Caller ID not verified"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  },
                  "e2": {
                    "summary": "Extension already exists",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Extension already exists"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "extension": {
                    "type": "string",
                    "description": "el nombre de la extensión"
                  },
                  "caller_id": {
                    "type": "string",
                    "description": "el número que presenta, como `\"Texto\" <número>`; o, por separado, `caller_id_name` y `caller_id_number`"
                  },
                  "comment": {
                    "type": "string",
                    "description": "una nota"
                  },
                  "record_calls": {
                    "type": "boolean",
                    "description": "grabar sus llamadas (`true` por defecto)"
                  }
                },
                "required": [
                  "extension"
                ]
              },
              "example": {
                "extension": "ventas2",
                "caller_id_name": "Ventas",
                "caller_id_number": "34910123456",
                "record_calls": false
              }
            }
          }
        }
      }
    },
    "/extensions/{extension}": {
      "get": {
        "operationId": "get_extensions_extension",
        "summary": "una de tus extensiones",
        "tags": [
          "Números y extensiones"
        ],
        "description": "una de tus extensiones. Es parte de `GET /v3/extensions` (tus extensiones). **Permiso:** cualquiera de `read`, `voip`, `get_voipextensions` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-extensions-tus-extensiones",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-extensions-tus-extensiones"
        },
        "x-mundosms-method": "get_voipextensions",
        "parameters": [
          {
            "name": "extension",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "una extensión concreta"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_extensions_extension",
        "summary": "cambiar una extensión",
        "tags": [
          "Números y extensiones"
        ],
        "description": "**Permiso:** cualquiera de `write`, `voip`, `set_voipextensions` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#patch-v3-extensions-extension-cambiar-una-extension",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#patch-v3-extensions-extension-cambiar-una-extension"
        },
        "x-mundosms-method": "set_voipextensions",
        "parameters": [
          {
            "name": "extension",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "la extensión (en la ruta)"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "extension": {
                          "type": "string"
                        },
                        "changed": {
                          "type": "boolean"
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 20431,
                    "extension": "recepcion",
                    "changed": true,
                    "fields": [
                      "caller_id_number",
                      "record_calls"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter <campo> not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter <campo> not valid"
                    }
                  },
                  "e2": {
                    "summary": "Body not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Body not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  },
                  "e3": {
                    "summary": "Caller ID not verified",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Caller ID not verified"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Extension not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Extension not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "caller_id": {
                    "type": "string",
                    "description": "lo que presenta al llamar, entero: `\"Texto\" <número>`. O este, o sus partes"
                  },
                  "caller_id_number": {
                    "type": "string",
                    "description": "solo el número que presenta (el texto se conserva)"
                  },
                  "caller_id_name": {
                    "type": "string",
                    "description": "solo el texto que presenta (hasta 40, sin comillas ni `<` `>`; el número se conserva)"
                  },
                  "comment": {
                    "type": "string",
                    "description": "un comentario, hasta 45 caracteres"
                  },
                  "record_calls": {
                    "type": "boolean",
                    "description": "grabar sus llamadas"
                  }
                }
              },
              "example": {
                "caller_id_number": "34910123456",
                "record_calls": true
              }
            }
          }
        }
      }
    },
    "/callerid-validations": {
      "post": {
        "operationId": "post_callerid_validations",
        "summary": "verificar un número para presentarlo",
        "tags": [
          "Números y extensiones"
        ],
        "description": "**Permiso:** cualquiera de `write`, `voip`, `vozpush`, `callerid_validation` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-callerid-validations-verificar-un-numero-para-presentarlo",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-callerid-validations-verificar-un-numero-para-presentarlo"
        },
        "x-mundosms-method": "callerid_validation",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "number": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        },
                        "relaunched": {
                          "type": "boolean"
                        },
                        "code": {
                          "type": "string"
                        },
                        "attempts": {
                          "type": "integer"
                        },
                        "vozpush_id": {
                          "type": "integer"
                        },
                        "cost": {
                          "type": "number"
                        },
                        "balance": {
                          "type": "number"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "number": "34981123456",
                    "state": "in_progress",
                    "relaunched": false,
                    "code": "4821",
                    "attempts": 1,
                    "vozpush_id": 991203,
                    "cost": 0.05,
                    "balance": 120.35
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter number not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter number not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente, cuota o mensajes del mes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Insufficient credit",
                    "value": {
                      "status": "error",
                      "status_code": "5",
                      "message": "Insufficient credit"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  },
                  "e2": {
                    "summary": "Too many attempts",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many attempts"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "number": {
                    "type": "string",
                    "description": "el número que se verifica"
                  },
                  "url_callback": {
                    "type": "string",
                    "description": "URL tuya (`https://`, pública, hasta 250 caracteres) a la que avisamos cuando termina la llamada de verificación (qué llega)"
                  }
                },
                "required": [
                  "number"
                ]
              },
              "example": {
                "number": "34981123456"
              }
            }
          }
        }
      }
    },
    "/voicefiles/{id}": {
      "get": {
        "operationId": "get_voicefiles_id",
        "summary": "descargar una locución",
        "tags": [
          "Grabaciones, locuciones y diagramas"
        ],
        "description": "**Permiso:** cualquiera de `read`, `voip`, `vozpush`, `get_voicefile` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-voicefiles-id-descargar-una-locucion",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-voicefiles-id-descargar-una-locucion"
        },
        "x-mundosms-method": "get_voicefile",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "la locución (en la ruta)"
            }
          },
          {
            "name": "mode_out",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inline",
                "download",
                "base64"
              ],
              "description": "`inline` (por defecto), `download` o `base64`"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "mp3"
              ],
              "description": "`mp3`: convertida a MP3. Sin él, el formato en que se guardó"
            }
          },
          {
            "name": "filename",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "el nombre del fichero, sin extensión"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien: JSON con mode_out base64; el audio tal cual con inline o download",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "client_id": {},
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string"
                        },
                        "size": {
                          "type": "integer"
                        },
                        "base64": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 77120,
                    "client_id": null,
                    "filename": "bienvenida.mp3",
                    "content_type": "audio/mpeg",
                    "size": 48210,
                    "base64": "SUQzBAAAAAAA..."
                  }
                }
              },
              "audio/*": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "audio/*"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Voice file not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Voice file not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_voicefiles_id",
        "summary": "borrar una locución",
        "tags": [
          "Grabaciones, locuciones y diagramas"
        ],
        "description": "**Permiso:** cualquiera de `write`, `voip`, `vozpush`, `delete_voicefile` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#delete-v3-voicefiles-id-borrar-una-locucion",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#delete-v3-voicefiles-id-borrar-una-locucion"
        },
        "x-mundosms-method": "delete_voicefile",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "la locución (en la ruta)"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "deleted": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 77121,
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Voice file not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Voice file not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  },
                  "e2": {
                    "summary": "Voice file cannot be deleted",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Voice file cannot be deleted"
                    }
                  },
                  "e3": {
                    "summary": "Voice file cannot be deleted yet",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Voice file cannot be deleted yet"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/voicefiles": {
      "post": {
        "operationId": "post_voicefiles",
        "summary": "subir una locución",
        "tags": [
          "Grabaciones, locuciones y diagramas"
        ],
        "description": "**Permiso:** cualquiera de `write`, `voip`, `vozpush`, `upload_voicefile` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-voicefiles-subir-una-locucion",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-voicefiles-subir-una-locucion"
        },
        "x-mundosms-method": "upload_voicefile",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "client_id": {}
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 77121,
                    "client_id": null
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter file not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter file not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filetype": {
                    "type": "string",
                    "enum": [
                      "base64",
                      "url"
                    ],
                    "description": "`base64` (el audio va en `file`) o `url` (en `file` va una URL pública de la que lo descargamos)"
                  },
                  "file": {
                    "type": "string",
                    "description": "el audio en base64, o su URL"
                  },
                  "filename": {
                    "type": "string",
                    "description": "el nombre con el que se guarda"
                  }
                },
                "required": [
                  "filetype",
                  "file"
                ]
              },
              "example": {
                "filetype": "url",
                "file": "https://www.ejemplo.com/audios/bienvenida.mp3",
                "filename": "bienvenida"
              }
            }
          }
        }
      }
    },
    "/diagrams": {
      "get": {
        "operationId": "get_diagrams",
        "summary": "tus diagramas",
        "tags": [
          "Grabaciones, locuciones y diagramas"
        ],
        "description": "**Permiso:** cualquiera de `read`, `voip`, `vozpush`, `getdiagrams_voip` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-diagrams-tus-diagramas",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-diagrams-tus-diagramas"
        },
        "x-mundosms-method": "getdiagrams_voip",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "integer",
              "description": "un diagrama concreto"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "sin `id`: el `next_cursor` de la página anterior"
            }
          },
          {
            "name": "from_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "description": "lo mismo que `cursor`, como número (por compatibilidad)"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 50,
              "description": "sin `id`: 1-500, 50 por defecto"
            }
          },
          {
            "name": "mode_out",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "con `id`: `image_base64` (por defecto: la imagen del diagrama en `image_base64`), `image_inline` (la imagen tal cual) o `xml` (el plan en `xml_plan`)"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "integer"
                        },
                        "diagrams": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "client_id": {},
                              "date_created": {
                                "type": "string"
                              },
                              "date_created_iso": {
                                "type": "string"
                              },
                              "date_updated": {
                                "type": "string"
                              },
                              "date_updated_iso": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "comment": {},
                              "snapshot_width": {
                                "type": "integer"
                              },
                              "snapshot_height": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "next_from_id": {
                          "type": "integer"
                        },
                        "next_cursor": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "1 results",
                  "data": {
                    "results": 1,
                    "diagrams": [
                      {
                        "id": 3120,
                        "client_id": null,
                        "date_created": "2025-03-02 12:35:10.000",
                        "date_created_iso": "2025-03-02T12:35:10.000+01:00",
                        "date_updated": "2026-10-14 09:12:44.000",
                        "date_updated_iso": "2026-10-14T09:12:44.000+02:00",
                        "name": "Horario oficina",
                        "comment": null,
                        "snapshot_width": 1280,
                        "snapshot_height": 720
                      }
                    ],
                    "has_more": false,
                    "next_from_id": 3120,
                    "next_cursor": "3120"
                  }
                }
              },
              "image/*": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/*"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Diagram not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Diagram not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/diagrams/{id}": {
      "get": {
        "operationId": "get_diagrams_id",
        "summary": "uno de tus diagramas",
        "tags": [
          "Grabaciones, locuciones y diagramas"
        ],
        "description": "uno de tus diagramas. Es parte de `GET /v3/diagrams` (tus diagramas). **Permiso:** cualquiera de `read`, `voip`, `vozpush`, `getdiagrams_voip` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-diagrams-tus-diagramas",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-diagrams-tus-diagramas"
        },
        "x-mundosms-method": "getdiagrams_voip",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "un diagrama concreto"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              },
              "image/*": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/*"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/campaigns": {
      "post": {
        "operationId": "post_campaigns",
        "summary": "lanzar una campaña",
        "tags": [
          "VozPush: llamadas automáticas"
        ],
        "description": "**Permiso:** cualquiera de `write`, `vozpush`, `sendcall` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-campaigns-lanzar-una-campana",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-campaigns-lanzar-una-campana"
        },
        "x-mundosms-method": "sendcall",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "client_id": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        },
                        "cost": {
                          "type": "number"
                        },
                        "balance": {
                          "type": "number"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 991250,
                    "client_id": "recordatorio-1120",
                    "state": "in_progress",
                    "cost": 0.0,
                    "balance": 120.35
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameters not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameters not valid"
                    }
                  },
                  "e2": {
                    "summary": "Parameter xml_plan not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter xml_plan not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente, cuota o mensajes del mes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Insufficient credit",
                    "value": {
                      "status": "error",
                      "status_code": "5",
                      "message": "Insufficient credit"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  },
                  "e3": {
                    "summary": "Caller ID not verified",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Caller ID not verified"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Diagram not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Diagram not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "los destinatarios"
                  },
                  "diagram_id": {
                    "type": "integer",
                    "description": "el diagrama que siguen las llamadas"
                  },
                  "xml_plan": {
                    "type": "string",
                    "description": "el plan en XML (el que exporta el editor de diagramas del panel)"
                  },
                  "from": {
                    "type": "string",
                    "description": "el número que se presenta. Tiene que ser tuyo (un DID o un número verificado)"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "tu referencia (hasta 20 caracteres)"
                  },
                  "name": {
                    "type": "string",
                    "description": "para reconocerla en el panel"
                  },
                  "description": {
                    "type": "string",
                    "description": "para reconocerla en el panel"
                  },
                  "date_scheduled": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
                    "description": "cuándo lanzarla. Sin ella, ahora. (`date_start`, el nombre anterior, da 400: ahora `date_*` es la ventana)"
                  },
                  "date_window_start": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
                    "description": "días entre los que se puede llamar, `AAAA-MM-DD`"
                  },
                  "date_window_end": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
                    "description": "días entre los que se puede llamar, `AAAA-MM-DD`"
                  },
                  "time_window_start": {
                    "type": "string",
                    "pattern": "^\\d{2}:\\d{2}$",
                    "description": "horas entre las que se puede llamar"
                  },
                  "time_window_end": {
                    "type": "string",
                    "pattern": "^\\d{2}:\\d{2}$",
                    "description": "horas entre las que se puede llamar"
                  },
                  "weekdays": {
                    "oneOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "boolean"
                        },
                        "minItems": 7,
                        "maxItems": 7
                      },
                      {
                        "type": "string",
                        "pattern": "^[01](\\|[01]){6}$"
                      }
                    ],
                    "description": "qué días de la semana se puede llamar: siete `true`/`false`, de lunes a domingo. También vale el texto del panel, siete `1` o `0` separados por barras verticales"
                  },
                  "max_concurrent": {
                    "type": "integer",
                    "description": "llamadas a la vez"
                  },
                  "delay_calls": {
                    "type": "integer",
                    "description": "segundos entre llamada y llamada"
                  },
                  "retry_delay_min": {
                    "type": "integer",
                    "description": "minutos antes de reintentar un destinatario"
                  },
                  "max_no_answer": {
                    "type": "integer",
                    "description": "reintentos por motivo y en total"
                  },
                  "max_busy": {
                    "type": "integer",
                    "description": "reintentos por motivo y en total"
                  },
                  "max_unreachable": {
                    "type": "integer",
                    "description": "reintentos por motivo y en total"
                  },
                  "max_answering_machine": {
                    "type": "integer",
                    "description": "reintentos por motivo y en total"
                  },
                  "max_fax": {
                    "type": "integer",
                    "description": "reintentos por motivo y en total"
                  },
                  "max_total_retries": {
                    "type": "integer",
                    "description": "reintentos por motivo y en total"
                  },
                  "replace_vars": {
                    "type": "string",
                    "description": "personalización del plan por destinatario"
                  },
                  "var1": {
                    "type": "string",
                    "description": "personalización del plan por destinatario"
                  },
                  "var2": {
                    "type": "string",
                    "description": "personalización del plan por destinatario"
                  },
                  "var3": {
                    "type": "string",
                    "description": "personalización del plan por destinatario"
                  },
                  "var4": {
                    "type": "string",
                    "description": "personalización del plan por destinatario"
                  },
                  "var5": {
                    "type": "string",
                    "description": "personalización del plan por destinatario"
                  },
                  "var6": {
                    "type": "string",
                    "description": "personalización del plan por destinatario"
                  },
                  "var7": {
                    "type": "string",
                    "description": "personalización del plan por destinatario"
                  },
                  "var8": {
                    "type": "string",
                    "description": "personalización del plan por destinatario"
                  },
                  "url_callback": {
                    "type": "string",
                    "description": "URL tuya (`https://`, pública, hasta 250 caracteres) a la que avisamos cuando la campaña termina o se cancela (qué llega)"
                  },
                  "url_callback_single_failed": {
                    "type": "string",
                    "description": "URL tuya (hasta 250 caracteres) a la que avisamos cuando un destinatario falla del todo (por ejemplo, para mandarle un SMS) (qué llega)"
                  },
                  "skip_errors": {
                    "type": "boolean",
                    "description": "seguir aunque el plan tenga avisos; devolverlos en `xml_errors`"
                  },
                  "show_errors": {
                    "type": "boolean",
                    "description": "seguir aunque el plan tenga avisos; devolverlos en `xml_errors`"
                  }
                },
                "required": [
                  "to"
                ]
              },
              "example": {
                "to": [
                  "34600123456",
                  "34600123457"
                ],
                "diagram_id": 3120,
                "from": "34910123456",
                "client_id": "recordatorio-1120",
                "time_window_start": "09:00",
                "time_window_end": "20:00",
                "weekdays": [
                  true,
                  true,
                  true,
                  true,
                  true,
                  false,
                  false
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_campaigns",
        "summary": "la campaña con tu referencia (`?client_id=…`)",
        "tags": [
          "VozPush: llamadas automáticas"
        ],
        "description": "la campaña con tu referencia (`?client_id=…`). Es parte de `GET /v3/campaigns/{id}` (estado de una campaña). **Permiso:** cualquiera de `read`, `vozpush`, `getreport_call` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-campaigns-id-estado-de-una-campana",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-campaigns-id-estado-de-una-campana"
        },
        "x-mundosms-method": "getreport_call",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}": {
      "get": {
        "operationId": "get_campaigns_id",
        "summary": "estado de una campaña",
        "tags": [
          "VozPush: llamadas automáticas"
        ],
        "description": "**Permiso:** cualquiera de `read`, `vozpush`, `getreport_call` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-campaigns-id-estado-de-una-campana",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-campaigns-id-estado-de-una-campana"
        },
        "x-mundosms-method": "getreport_call",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "la campaña (en la ruta)"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "en `GET /v3/campaigns`: tu referencia, para buscar la campaña sin saber su `id`"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "client_id": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        },
                        "cost": {
                          "type": "number"
                        },
                        "answered_count": {
                          "type": "integer"
                        },
                        "failed_count": {
                          "type": "integer"
                        },
                        "date_last_update": {
                          "type": "string"
                        },
                        "date_last_update_iso": {
                          "type": "string"
                        },
                        "duration_total": {
                          "type": "integer"
                        },
                        "duration_functions": {
                          "type": "integer"
                        },
                        "duration_mobile": {
                          "type": "integer"
                        },
                        "duration_landline": {
                          "type": "integer"
                        },
                        "duration_sip": {
                          "type": "integer"
                        },
                        "results": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "to": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "recording_id": {},
                              "ivr_keys": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 991250,
                    "client_id": "recordatorio-1120",
                    "state": "finished",
                    "cost": 0.18,
                    "answered_count": 1,
                    "failed_count": 1,
                    "date_last_update": "2026-11-20 09:04:51.000",
                    "date_last_update_iso": "2026-11-20T09:04:51.000+01:00",
                    "duration_total": 74,
                    "duration_functions": 74,
                    "duration_mobile": 74,
                    "duration_landline": 0,
                    "duration_sip": 0,
                    "results": [
                      {
                        "to": "34600123456",
                        "state": "answered",
                        "recording_id": null,
                        "ivr_keys": "1"
                      },
                      {
                        "to": "34600123457",
                        "state": "no_answer",
                        "recording_id": null,
                        "ivr_keys": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Campaign not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Campaign not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  },
                  "e2": {
                    "summary": "Not possible in the current state",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not possible in the current state"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/pause": {
      "post": {
        "operationId": "post_campaigns_id_pause",
        "summary": "pausarla",
        "tags": [
          "VozPush: llamadas automáticas"
        ],
        "description": "pausarla. Es parte de `GET /v3/campaigns/{id}` (estado de una campaña). **Permiso:** cualquiera de `read`, `vozpush`, `getreport_call` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-campaigns-id-estado-de-una-campana",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-campaigns-id-estado-de-una-campana"
        },
        "x-mundosms-method": "getreport_call",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "la campaña (en la ruta)"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/resume": {
      "post": {
        "operationId": "post_campaigns_id_resume",
        "summary": "reanudarla",
        "tags": [
          "VozPush: llamadas automáticas"
        ],
        "description": "reanudarla. Es parte de `GET /v3/campaigns/{id}` (estado de una campaña). **Permiso:** cualquiera de `read`, `vozpush`, `getreport_call` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-campaigns-id-estado-de-una-campana",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-campaigns-id-estado-de-una-campana"
        },
        "x-mundosms-method": "getreport_call",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "la campaña (en la ruta)"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/cancel": {
      "post": {
        "operationId": "post_campaigns_id_cancel",
        "summary": "cancelarla",
        "tags": [
          "VozPush: llamadas automáticas"
        ],
        "description": "cancelarla. Es parte de `GET /v3/campaigns/{id}` (estado de una campaña). **Permiso:** cualquiera de `read`, `vozpush`, `getreport_call` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-campaigns-id-estado-de-una-campana",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-campaigns-id-estado-de-una-campana"
        },
        "x-mundosms-method": "getreport_call",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "la campaña (en la ruta)"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/calls/{to}/recording": {
      "get": {
        "operationId": "get_campaigns_id_calls_to_recording",
        "summary": "grabación de una llamada de VozPush",
        "tags": [
          "VozPush: llamadas automáticas"
        ],
        "description": "**Permiso:** cualquiera de `read`, `vozpush`, `getrecording_vozpush` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-campaigns-id-calls-to-recording-grabacion-de-una-llamada-de-vozpush",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-campaigns-id-calls-to-recording-grabacion-de-una-llamada-de-vozpush"
        },
        "x-mundosms-method": "getrecording_vozpush",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "la campaña (en la ruta)"
            }
          },
          {
            "name": "to",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "el destinatario (en la ruta)"
            }
          },
          {
            "name": "mode_out",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "inline",
                "download",
                "base64"
              ],
              "description": "`inline` (por defecto), `download` o `base64`"
            }
          },
          {
            "name": "filename",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "el nombre del fichero, sin extensión"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien: JSON con mode_out base64; el audio tal cual con inline o download",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              },
              "audio/*": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "audio/*"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "Call not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Call not found"
                    }
                  },
                  "e3": {
                    "summary": "Recording not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Recording not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sms": {
      "post": {
        "operationId": "post_sms",
        "summary": "enviar SMS",
        "tags": [
          "SMS"
        ],
        "description": "**Permiso:** cualquiera de `write`, `sms`, `sendsms` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-sms-enviar-sms",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-sms-enviar-sms"
        },
        "x-mundosms-method": "sendsms",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "client_id": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        },
                        "cost": {
                          "type": "number"
                        },
                        "balance": {
                          "type": "number"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 71234567,
                    "client_id": "cita-88123",
                    "state": "in_progress",
                    "cost": 0.14,
                    "balance": 120.21
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter to not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter to not valid"
                    }
                  },
                  "e2": {
                    "summary": "Parameter from not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter from not valid"
                    }
                  },
                  "e3": {
                    "summary": "Parameter client_id not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter client_id not valid"
                    }
                  },
                  "e4": {
                    "summary": "Parameter date_scheduled not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter date_scheduled not valid"
                    }
                  },
                  "e5": {
                    "summary": "Parameter route not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter route not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente, cuota o mensajes del mes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Insufficient credit",
                    "value": {
                      "status": "error",
                      "status_code": "5",
                      "message": "Insufficient credit"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  },
                  "e3": {
                    "summary": "RCS not enabled for this account",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "RCS not enabled for this account"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "los destinatarios"
                  },
                  "text": {
                    "type": "string",
                    "description": "el mensaje"
                  },
                  "from": {
                    "type": "string",
                    "description": "el remitente: de 1 a 11 caracteres"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "tu referencia, hasta 50 caracteres"
                  },
                  "date_scheduled": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
                    "description": "cuándo enviarlo; sin ella, ahora. Una fecha que no vale da 400 (no se envía)"
                  },
                  "url_callback": {
                    "type": "string",
                    "description": "URL tuya (`https://`, pública, hasta 150 caracteres) a la que avisamos del informe de entrega de cada destinatario (qué llega). Sin ella, la URL de avisos de tu cuenta, si la tienes"
                  },
                  "route": {
                    "type": "integer",
                    "description": "la ruta: 1, 2, 3 o 4"
                  },
                  "concatenated": {
                    "type": "boolean",
                    "description": "permitir mensajes de más de 160 caracteres (varias partes)"
                  },
                  "unicode": {
                    "type": "boolean",
                    "description": "enviar en Unicode (emojis, alfabetos no latinos; 70 caracteres por parte)"
                  },
                  "keep_sms_size": {
                    "type": "boolean",
                    "description": "no partir el mensaje: recortarlo a una parte"
                  },
                  "expire_secs": {
                    "type": "integer",
                    "description": "segundos tras los que el operador deja de intentarlo"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "sms",
                      "rcs_simple"
                    ],
                    "description": "`sms` (por defecto) o `rcs_simple`"
                  },
                  "replace_vars": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var1": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var2": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var3": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var4": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var5": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var6": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var7": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var8": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "gsmcharset_table": {
                    "type": "string",
                    "description": "tabla de caracteres"
                  },
                  "gsmcharset_extension": {
                    "type": "string",
                    "description": "tabla de caracteres"
                  }
                },
                "required": [
                  "to",
                  "text"
                ]
              },
              "example": {
                "to": [
                  "34600123456",
                  "34600123457"
                ],
                "text": "Tu cita es mañana a las 10:00. Responde NO para anularla.",
                "from": "Clinica",
                "client_id": "cita-88123"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_sms",
        "summary": "SMS enviados, uno por destinatario",
        "tags": [
          "SMS"
        ],
        "description": "**Permiso:** cualquiera de `read`, `sms`, `getreport` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-sms-sms-enviados-uno-por-destinatario",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-sms-sms-enviados-uno-por-destinatario"
        },
        "x-mundosms-method": "getreport",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "el `next_cursor` de la página anterior: la página siguiente"
            }
          },
          {
            "name": "from_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "description": "lo mismo que `cursor`, como número (por compatibilidad)"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 50,
              "description": "1-500, 50 por defecto"
            }
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "`asc` o `desc`"
            }
          },
          {
            "name": "from_datetime",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
              "description": "por hora de creación: desde (incluida) y hasta (sin incluir)"
            }
          },
          {
            "name": "to_datetime",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
              "description": "por hora de creación: desde (incluida) y hasta (sin incluir)"
            }
          },
          {
            "name": "number",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "un destinatario"
            }
          },
          {
            "name": "send_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "description": "los de un envío (el `id` que devolvió `POST /v3/sms`)"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "los del envío con esa referencia tuya"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "sent",
                "delivered",
                "failed"
              ],
              "description": "`pending`, `sent`, `delivered` o `failed`"
            }
          },
          {
            "name": "include_text",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "`true` (por defecto): con el texto de cada mensaje"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "integer"
                        },
                        "messages": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "send_id": {
                                "type": "integer"
                              },
                              "client_id": {
                                "type": "string"
                              },
                              "from": {
                                "type": "string"
                              },
                              "to": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "parts": {
                                "type": "integer"
                              },
                              "credits": {
                                "type": "number"
                              },
                              "state": {
                                "type": "string"
                              },
                              "error_code": {},
                              "date_created": {
                                "type": "string"
                              },
                              "date_created_iso": {
                                "type": "string"
                              },
                              "date_sent": {
                                "type": "string"
                              },
                              "date_sent_iso": {
                                "type": "string"
                              },
                              "date_accepted": {
                                "type": "string"
                              },
                              "date_accepted_iso": {
                                "type": "string"
                              },
                              "date_report": {
                                "type": "string"
                              },
                              "date_report_iso": {
                                "type": "string"
                              },
                              "date_operator": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "next_from_id": {},
                        "next_cursor": {}
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "1 results",
                  "data": {
                    "results": 1,
                    "messages": [
                      {
                        "send_id": 71234567,
                        "client_id": "cita-88123",
                        "from": "Clinica",
                        "to": "34600123456",
                        "text": "Tu cita es mañana a las 10:00. Responde NO para anularla.",
                        "parts": 1,
                        "credits": 0.07,
                        "state": "delivered",
                        "error_code": null,
                        "date_created": "2026-11-20 09:00:00.412",
                        "date_created_iso": "2026-11-20T09:00:00.412+01:00",
                        "date_sent": "2026-11-20 09:00:01.030",
                        "date_sent_iso": "2026-11-20T09:00:01.030+01:00",
                        "date_accepted": "2026-11-20 09:00:01.311",
                        "date_accepted_iso": "2026-11-20T09:00:01.311+01:00",
                        "date_report": "2026-11-20 09:00:04.870",
                        "date_report_iso": "2026-11-20T09:00:04.870+01:00",
                        "date_operator": "2026-11-20 09:00"
                      }
                    ],
                    "has_more": false,
                    "next_from_id": null,
                    "next_cursor": null
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter <nombre> not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter <nombre> not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sms/certified": {
      "post": {
        "operationId": "post_sms_certified",
        "summary": "enviar un SMS certificado",
        "tags": [
          "SMS"
        ],
        "description": "**Permiso:** cualquiera de `write`, `sms`, `sendsms_cert` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-sms-certified-enviar-un-sms-certificado",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-sms-certified-enviar-un-sms-certificado"
        },
        "x-mundosms-method": "sendsms_cert",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "client_id": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        },
                        "cost": {
                          "type": "number"
                        },
                        "balance": {
                          "type": "number"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 71234567,
                    "client_id": "cita-88123",
                    "state": "in_progress",
                    "cost": 0.14,
                    "balance": 120.21
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "los destinatarios"
                  },
                  "text": {
                    "type": "string",
                    "description": "el mensaje"
                  },
                  "from": {
                    "type": "string",
                    "description": "el remitente: de 1 a 11 caracteres"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "tu referencia, hasta 50 caracteres"
                  },
                  "date_scheduled": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
                    "description": "cuándo enviarlo; sin ella, ahora. Una fecha que no vale da 400 (no se envía)"
                  },
                  "url_callback": {
                    "type": "string",
                    "description": "URL tuya (`https://`, pública, hasta 150 caracteres) a la que avisamos del informe de entrega de cada destinatario (qué llega). Sin ella, la URL de avisos de tu cuenta, si la tienes"
                  },
                  "route": {
                    "type": "integer",
                    "description": "la ruta: 1, 2, 3 o 4"
                  },
                  "concatenated": {
                    "type": "boolean",
                    "description": "permitir mensajes de más de 160 caracteres (varias partes)"
                  },
                  "unicode": {
                    "type": "boolean",
                    "description": "enviar en Unicode (emojis, alfabetos no latinos; 70 caracteres por parte)"
                  },
                  "keep_sms_size": {
                    "type": "boolean",
                    "description": "no partir el mensaje: recortarlo a una parte"
                  },
                  "expire_secs": {
                    "type": "integer",
                    "description": "segundos tras los que el operador deja de intentarlo"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "sms",
                      "rcs_simple"
                    ],
                    "description": "`sms` (por defecto) o `rcs_simple`"
                  },
                  "replace_vars": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var1": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var2": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var3": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var4": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var5": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var6": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var7": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var8": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "gsmcharset_table": {
                    "type": "string",
                    "description": "tabla de caracteres"
                  },
                  "gsmcharset_extension": {
                    "type": "string",
                    "description": "tabla de caracteres"
                  },
                  "cert_name": {
                    "type": "string",
                    "description": "a nombre de quién se emite el certificado"
                  },
                  "cert_type": {
                    "type": "string",
                    "description": "el tipo de certificado (`D` por defecto)"
                  },
                  "cert_tax_id": {
                    "type": "string",
                    "description": "NIF/CIF del titular"
                  },
                  "cert_language": {
                    "type": "string",
                    "description": "idioma del certificado (`ES` por defecto)"
                  },
                  "cert_email": {
                    "type": "string",
                    "description": "correo al que se envía el certificado"
                  }
                },
                "required": [
                  "to",
                  "text",
                  "cert_name"
                ]
              }
            }
          }
        }
      }
    },
    "/sms/quote": {
      "post": {
        "operationId": "post_sms_quote",
        "summary": "calcular el coste antes de enviar",
        "tags": [
          "SMS"
        ],
        "description": "**Permiso:** cualquiera de `read`, `sms`, `quotesms` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-sms-quote-calcular-el-coste-antes-de-enviar",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-sms-quote-calcular-el-coste-antes-de-enviar"
        },
        "x-mundosms-method": "quotesms",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "cost": {
                          "type": "number"
                        },
                        "balance": {
                          "type": "number"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "cost": 0.14,
                    "balance": 120.35
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter to not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter to not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "los destinatarios"
                  },
                  "text": {
                    "type": "string",
                    "description": "el mensaje"
                  },
                  "from": {
                    "type": "string",
                    "description": "el remitente: de 1 a 11 caracteres"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "tu referencia, hasta 50 caracteres"
                  },
                  "date_scheduled": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
                    "description": "cuándo enviarlo; sin ella, ahora. Una fecha que no vale da 400 (no se envía)"
                  },
                  "url_callback": {
                    "type": "string",
                    "description": "URL tuya (`https://`, pública, hasta 150 caracteres) a la que avisamos del informe de entrega de cada destinatario (qué llega). Sin ella, la URL de avisos de tu cuenta, si la tienes"
                  },
                  "route": {
                    "type": "integer",
                    "description": "la ruta: 1, 2, 3 o 4"
                  },
                  "concatenated": {
                    "type": "boolean",
                    "description": "permitir mensajes de más de 160 caracteres (varias partes)"
                  },
                  "unicode": {
                    "type": "boolean",
                    "description": "enviar en Unicode (emojis, alfabetos no latinos; 70 caracteres por parte)"
                  },
                  "keep_sms_size": {
                    "type": "boolean",
                    "description": "no partir el mensaje: recortarlo a una parte"
                  },
                  "expire_secs": {
                    "type": "integer",
                    "description": "segundos tras los que el operador deja de intentarlo"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "sms",
                      "rcs_simple"
                    ],
                    "description": "`sms` (por defecto) o `rcs_simple`"
                  },
                  "replace_vars": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var1": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var2": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var3": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var4": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var5": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var6": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var7": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "var8": {
                    "type": "string",
                    "description": "un texto distinto para cada destinatario (abajo)"
                  },
                  "gsmcharset_table": {
                    "type": "string",
                    "description": "tabla de caracteres"
                  },
                  "gsmcharset_extension": {
                    "type": "string",
                    "description": "tabla de caracteres"
                  }
                },
                "required": [
                  "to",
                  "text"
                ]
              }
            }
          }
        }
      }
    },
    "/sms/sends": {
      "get": {
        "operationId": "get_sms_sends",
        "summary": "estado de tus envíos",
        "tags": [
          "SMS"
        ],
        "description": "**Permiso:** cualquiera de `read`, `sms`, `getreport` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-sms-sends-estado-de-tus-envios",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-sms-sends-estado-de-tus-envios"
        },
        "x-mundosms-method": "getreport",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "nuestros ids de envío, uno o varios, separados por comas"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "tus referencias, una o varias, separadas por comas"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "integer"
                        },
                        "sms": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "client_id": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "delivered": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "failed": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "results": 2,
                    "sms": [
                      {
                        "id": 71234567,
                        "client_id": "cita-88123",
                        "state": "completed",
                        "delivered": [
                          "34600123456"
                        ],
                        "failed": [
                          "34600123457"
                        ]
                      },
                      {
                        "id": 71234568,
                        "client_id": null,
                        "error": {
                          "status_code": "4",
                          "message": "SMS not found"
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter id not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter id not valid"
                    }
                  },
                  "e2": {
                    "summary": "Too many ids",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Too many ids"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "SMS not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "SMS not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sms/sends/{id}": {
      "get": {
        "operationId": "get_sms_sends_id",
        "summary": "uno solo, por su id",
        "tags": [
          "SMS"
        ],
        "description": "uno solo, por su id. Es parte de `GET /v3/sms/sends` (estado de tus envíos). **Permiso:** cualquiera de `read`, `sms`, `getreport` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-sms-sends-estado-de-tus-envios",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-sms-sends-estado-de-tus-envios"
        },
        "x-mundosms-method": "getreport",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "nuestros ids de envío, uno o varios, separados por comas"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sms/sends/{id}/send-now": {
      "post": {
        "operationId": "post_sms_sends_id_send_now",
        "summary": "enviar ya un envío programado",
        "tags": [
          "SMS"
        ],
        "description": "**Permiso:** cualquiera de `write`, `sms`, `scheduled_sendings` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-sms-sends-id-send-now-enviar-ya-un-envio-programado",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-sms-sends-id-send-now-enviar-ya-un-envio-programado"
        },
        "x-mundosms-method": "scheduled_sendings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "nuestro id del envío (en la ruta). Si solo tienes tu referencia, búscalo antes con `GET /v3/sms/sends?client_id=…`"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "client_id": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 71234570,
                    "client_id": "campana-black-friday",
                    "state": "in_progress"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  },
                  "e2": {
                    "summary": "SMS not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "SMS not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  },
                  "e2": {
                    "summary": "SMS already sent",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "SMS already sent"
                    }
                  },
                  "e3": {
                    "summary": "SMS already cancelled",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "SMS already cancelled"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sms/sends/{id}/cancel": {
      "post": {
        "operationId": "post_sms_sends_id_cancel",
        "summary": "cancelarlo: no sale y se devuelve el saldo",
        "tags": [
          "SMS"
        ],
        "description": "cancelarlo: no sale y se devuelve el saldo. Es parte de `POST /v3/sms/sends/{id}/send-now` (enviar ya un envío programado). **Permiso:** cualquiera de `write`, `sms`, `scheduled_sendings` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-sms-sends-id-send-now-enviar-ya-un-envio-programado",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-sms-sends-id-send-now-enviar-ya-un-envio-programado"
        },
        "x-mundosms-method": "scheduled_sendings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "nuestro id del envío (en la ruta). Si solo tienes tu referencia, búscalo antes con `GET /v3/sms/sends?client_id=…`"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sms/replies": {
      "get": {
        "operationId": "get_sms_replies",
        "summary": "respuestas a tus SMS",
        "tags": [
          "SMS"
        ],
        "description": "**Permiso:** cualquiera de `read`, `sms`, `getreport` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-sms-replies-respuestas-a-tus-sms",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-sms-replies-respuestas-a-tus-sms"
        },
        "x-mundosms-method": "getreport",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "el `next_cursor` de la página anterior: la página siguiente"
            }
          },
          {
            "name": "from_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "description": "lo mismo que `cursor`, como número (por compatibilidad)"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 50,
              "description": "1-500, 50 por defecto"
            }
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "`asc` o `desc`"
            }
          },
          {
            "name": "from_datetime",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
              "description": "por hora de recepción"
            }
          },
          {
            "name": "to_datetime",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?)?(Z|[+-]\\d{2}:?\\d{2})?$",
              "description": "por hora de recepción"
            }
          },
          {
            "name": "number",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "quien responde"
            }
          },
          {
            "name": "send_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "description": "las respuestas a un envío"
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "integer"
                        },
                        "replies": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "from": {
                                "type": "string"
                              },
                              "to": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "date_received": {
                                "type": "string"
                              },
                              "date_received_iso": {
                                "type": "string"
                              },
                              "reply_to": {
                                "type": "object",
                                "properties": {
                                  "send_id": {
                                    "type": "integer"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "next_from_id": {
                          "type": "integer"
                        },
                        "next_cursor": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "1 results",
                  "data": {
                    "results": 1,
                    "replies": [
                      {
                        "from": "34600123456",
                        "to": "34600999888",
                        "text": "NO",
                        "date_received": "2026-11-20 09:12:40.000",
                        "date_received_iso": "2026-11-20T09:12:40.000+01:00",
                        "reply_to": {
                          "send_id": 71234567
                        }
                      }
                    ],
                    "has_more": false,
                    "next_from_id": 30111,
                    "next_cursor": "30111"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter <nombre> not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter <nombre> not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/numchecks": {
      "post": {
        "operationId": "post_numchecks",
        "summary": "comprobar un número de móvil",
        "tags": [
          "NumCheck"
        ],
        "description": "**Permiso:** cualquiera de `write`, `numcheck`, `numcheck` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-numchecks-comprobar-un-numero-de-movil",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-numchecks-comprobar-un-numero-de-movil"
        },
        "x-mundosms-method": "numcheck",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "client_id": {
                          "type": "string"
                        },
                        "cost": {
                          "type": "number"
                        },
                        "balance": {
                          "type": "number"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": "success",
                  "status_code": "0",
                  "message": "OK",
                  "data": {
                    "id": 551230,
                    "client_id": "limpieza-nov",
                    "cost": 0.02,
                    "balance": 120.33
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros que faltan o no valen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Parameter number not valid",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Parameter number not valid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente, cuota o mensajes del mes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Insufficient credit",
                    "value": {
                      "status": "error",
                      "status_code": "5",
                      "message": "Insufficient credit"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "number": {
                    "type": "string",
                    "description": "el número, en formato internacional. Uno por petición"
                  },
                  "url_callback": {
                    "type": "string",
                    "description": "URL tuya (`https://`, pública, hasta 150 caracteres) a la que enviamos el resultado (qué llega)"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "tu referencia, hasta 30 caracteres"
                  }
                },
                "required": [
                  "number"
                ]
              },
              "example": {
                "number": "34600123456",
                "url_callback": "https://crm.ejemplo.com/numcheck",
                "client_id": "limpieza-nov"
              }
            }
          }
        }
      }
    },
    "/whatsapp/numbers": {
      "get": {
        "operationId": "get_whatsapp_numbers",
        "summary": "tus números",
        "tags": [
          "WhatsApp"
        ],
        "description": "**Permiso:** cualquiera de `whatsapp`, `whatsapp_numbers` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-whatsapp-numbers-tus-numeros",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-whatsapp-numbers-tus-numeros"
        },
        "x-mundosms-method": "whatsapp_numbers",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/whatsapp/templates": {
      "get": {
        "operationId": "get_whatsapp_templates",
        "summary": "plantillas y su estado",
        "tags": [
          "WhatsApp"
        ],
        "description": "**Permiso:** cualquiera de `whatsapp`, `whatsapp_templates` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-whatsapp-templates-plantillas-y-su-estado",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-whatsapp-templates-plantillas-y-su-estado"
        },
        "x-mundosms-method": "whatsapp_templates",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/whatsapp/messages": {
      "post": {
        "operationId": "post_whatsapp_messages",
        "summary": "enviar un mensaje",
        "tags": [
          "WhatsApp"
        ],
        "description": "**Permiso:** cualquiera de `whatsapp`, `whatsapp_send` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-whatsapp-messages-enviar-un-mensaje",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-whatsapp-messages-enviar-un-mensaje"
        },
        "x-mundosms-method": "whatsapp_send",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/whatsapp/messages/{message_id}": {
      "get": {
        "operationId": "get_whatsapp_messages_message_id",
        "summary": "estado de un mensaje",
        "tags": [
          "WhatsApp"
        ],
        "description": "**Permiso:** cualquiera de `whatsapp`, `whatsapp_status` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#get-v3-whatsapp-messages-message_id-estado-de-un-mensaje",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#get-v3-whatsapp-messages-message_id-estado-de-un-mensaje"
        },
        "x-mundosms-method": "whatsapp_status",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/whatsapp/campaigns": {
      "post": {
        "operationId": "post_whatsapp_campaigns",
        "summary": "crear un envío masivo",
        "tags": [
          "WhatsApp"
        ],
        "description": "**Permiso:** cualquiera de `whatsapp`, `whatsapp_campaign` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-whatsapp-campaigns-crear-un-envio-masivo",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-whatsapp-campaigns-crear-un-envio-masivo"
        },
        "x-mundosms-method": "whatsapp_campaign",
        "parameters": [
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/whatsapp/campaigns/{campaign_id}": {
      "get": {
        "operationId": "get_whatsapp_campaigns_campaign_id",
        "summary": "su estado",
        "tags": [
          "WhatsApp"
        ],
        "description": "su estado. Es parte de `POST /v3/whatsapp/campaigns` (crear un envío masivo). **Permiso:** cualquiera de `whatsapp`, `whatsapp_campaign` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-whatsapp-campaigns-crear-un-envio-masivo",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-whatsapp-campaigns-crear-un-envio-masivo"
        },
        "x-mundosms-method": "whatsapp_campaign",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/whatsapp/campaigns/{campaign_id}/pause": {
      "post": {
        "operationId": "post_whatsapp_campaigns_campaign_id_pause",
        "summary": "pausarlo",
        "tags": [
          "WhatsApp"
        ],
        "description": "pausarlo. Es parte de `POST /v3/whatsapp/campaigns` (crear un envío masivo). **Permiso:** cualquiera de `whatsapp`, `whatsapp_campaign` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-whatsapp-campaigns-crear-un-envio-masivo",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-whatsapp-campaigns-crear-un-envio-masivo"
        },
        "x-mundosms-method": "whatsapp_campaign",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/whatsapp/campaigns/{campaign_id}/resume": {
      "post": {
        "operationId": "post_whatsapp_campaigns_campaign_id_resume",
        "summary": "reanudarlo",
        "tags": [
          "WhatsApp"
        ],
        "description": "reanudarlo. Es parte de `POST /v3/whatsapp/campaigns` (crear un envío masivo). **Permiso:** cualquiera de `whatsapp`, `whatsapp_campaign` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-whatsapp-campaigns-crear-un-envio-masivo",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-whatsapp-campaigns-crear-un-envio-masivo"
        },
        "x-mundosms-method": "whatsapp_campaign",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/whatsapp/campaigns/{campaign_id}/cancel": {
      "post": {
        "operationId": "post_whatsapp_campaigns_campaign_id_cancel",
        "summary": "cancelarlo",
        "tags": [
          "WhatsApp"
        ],
        "description": "cancelarlo. Es parte de `POST /v3/whatsapp/campaigns` (crear un envío masivo). **Permiso:** cualquiera de `whatsapp`, `whatsapp_campaign` (o `all`).\n\nReferencia completa: https://www.mundosms.es/api-v3#post-v3-whatsapp-campaigns-crear-un-envio-masivo",
        "externalDocs": {
          "url": "https://www.mundosms.es/api-v3#post-v3-whatsapp-campaigns-crear-un-envio-masivo"
        },
        "x-mundosms-method": "whatsapp_campaign",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": ""
            }
          },
          {
            "$ref": "#/components/parameters/XTimestamp"
          }
        ],
        "responses": {
          "200": {
            "description": "Bien",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Respuesta"
                }
              }
            }
          },
          "401": {
            "description": "Autenticación: token, firma o X-Timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Missing Authorization header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Missing Authorization header"
                    }
                  },
                  "e2": {
                    "summary": "Authentication failure",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Authentication failure"
                    }
                  },
                  "e3": {
                    "summary": "Signed requests must include the X-Timestamp header",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Signed requests must include the X-Timestamp header"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Sin permiso, IP no admitida o número no verificado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Not allowed"
                    }
                  },
                  "e2": {
                    "summary": "IP not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "IP not allowed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No existe en tu cuenta, o la ruta no existe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Route not found",
                    "value": {
                      "status": "error",
                      "status_code": "4",
                      "message": "Route not found"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Método HTTP no admitido en esta ruta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Method not allowed",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Method not allowed"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Petición repetida o no posible en el estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Duplicated request",
                    "value": {
                      "status": "error",
                      "status_code": "3",
                      "message": "Duplicated request"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Demasiadas peticiones o intentos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "status_code": "7",
                      "message": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o el servidor de voz no responde",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "e1": {
                    "summary": "Internal error",
                    "value": {
                      "status": "error",
                      "status_code": "2",
                      "message": "Internal error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "El token de la clave de API (Claves de API → «Token»)"
      },
      "firma": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Signature",
        "description": "base64url(HMAC-SHA256(clave_privada, token + \".\" + X-Timestamp + \".\" + MÉTODO + \" \" + ruta_con_query + \".\" + cuerpo)) sin «=». Obligatoria si la clave exige firma"
      }
    },
    "parameters": {
      "XTimestamp": {
        "name": "X-Timestamp",
        "in": "header",
        "required": false,
        "description": "La hora actual (epoch Unix) en segundos o milisegundos, a menos de 5 minutos de la del servidor. Obligatoria con firma",
        "schema": {
          "type": "string",
          "pattern": "^\\d{9,14}$"
        }
      }
    },
    "schemas": {
      "Respuesta": {
        "type": "object",
        "required": [
          "status",
          "status_code",
          "message"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success",
              "error"
            ]
          },
          "status_code": {
            "type": "string",
            "description": "\"0\" bien; \"2\" interno; \"3\" parámetros, autenticación, permiso o conflicto; \"4\" no existe; \"5\" sin saldo; \"7\" demasiadas"
          },
          "message": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "data": {}
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "status",
          "status_code",
          "message"
        ],
        "properties": {
          "status": {
            "const": "error"
          },
          "status_code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "data": {}
        }
      }
    }
  }
}
