Fuente: https://crm.begraffic.com/docs/api
Índice para agentes: [llms.txt](https://crm.begraffic.com/llms.txt)

# PUT /api/v1/messaging/whatsapp/templates/{name}

URL base: https://crm.begraffic.com. Autenticación: Authorization: Bearer <CLAVE_V1_bcrm_...>.

Definición OpenAPI de la operación (los bloques schema son esquemas, no cuerpos de ejemplo):

```json
{
  "operationId": "messaging.templates.upsert",
  "summary": "Crear una plantilla de WhatsApp",
  "description": "Crea la plantilla `name` (+ `language`) en la WABA del número indicado (o del predeterminado) y la envía a revisión de Meta: 201 con `status` PENDING. Si ya existe con el mismo contenido, 200 con la actual (repetir es seguro); si existe con OTRO contenido, 409 `conflict` (Be CRM no la edita: editar una aprobada la devuelve a revisión). Si Meta la rechaza al crearla, 400 `invalid_request` con su motivo en `message`. Pasa los `example` a Meta: los exige para cada variable del cuerpo y para la parte variable de una URL. Queda visible en el panel como «Creada por API». Admite cabecera de texto, de ubicación o multimedia (IMAGE, VIDEO, DOCUMENT), variables posicionales o con nombre (`parameterFormat: NAMED`), botones de respuesta rápida, URL, teléfono y copiar código (cupón), ofertas por tiempo limitado, carruseles (CAROUSEL, 2–10 tarjetas) y plantillas de autenticación (botón OTP); las reglas de Meta se comprueban antes de llamarla (400 con el motivo). El archivo de ejemplo de una cabecera multimedia (también la de cada tarjeta) va por enlace https público en `example.header_url`: Be CRM lo descarga (sin redirecciones; tipos y tamaños de Meta) y lo sube a Meta; si no se puede descargar o no vale, 400 `invalid_request` con el motivo. El estado definitivo llega con la aprobación de Meta (consúltalo con `GET /api/v1/messaging/whatsapp/templates?name=`).",
  "tags": [
    "Conversaciones"
  ],
  "x-scope": "whatsapp_templates:write",
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "parameters": [
    {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[a-z0-9_]{1,512}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "description": "Clave única por operación (≤ 255 caracteres). Repetir la misma petición devuelve la misma respuesta durante 24 h; con otro cuerpo, 422.",
      "schema": {
        "type": "string",
        "maxLength": 255
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Correcto.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "wabaId": {
                    "type": "string"
                  },
                  "components": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "rejectedReason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "qualityRating": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "requestedCategory": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pendingCategory": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "category": {
                            "type": "string"
                          },
                          "effectiveAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "category",
                          "effectiveAt"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdVia": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "api",
                          "panel"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdBy": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "language",
                  "status",
                  "category",
                  "wabaId",
                  "components",
                  "rejectedReason",
                  "qualityRating",
                  "requestedCategory",
                  "pendingCategory",
                  "createdVia",
                  "createdBy",
                  "description"
                ]
              }
            }
          }
        }
      }
    },
    "201": {
      "description": "Creado.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "wabaId": {
                    "type": "string"
                  },
                  "components": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "rejectedReason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "qualityRating": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "requestedCategory": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pendingCategory": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "category": {
                            "type": "string"
                          },
                          "effectiveAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "category",
                          "effectiveAt"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdVia": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "api",
                          "panel"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdBy": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "language",
                  "status",
                  "category",
                  "wabaId",
                  "components",
                  "rejectedReason",
                  "qualityRating",
                  "requestedCategory",
                  "pendingCategory",
                  "createdVia",
                  "createdBy",
                  "description"
                ]
              }
            }
          }
        }
      }
    },
    "400": {
      "description": "`invalid_request`: Petición inválida (cuerpo, parámetros o consulta).",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "`unauthorized`: Falta la clave, no existe, está revocada o caducó.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "`insufficient_scope`: La clave no tiene el alcance que exige la ruta. `feature_disabled`: La función está desactivada en el workspace.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "409": {
      "description": "`conflict`: Conflicto con el estado actual (p. ej. ya existe). `idempotency_in_progress`: Otra petición con la misma Idempotency-Key se está procesando.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "422": {
      "description": "`idempotency_key_reused`: La Idempotency-Key ya se usó con otra petición.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "429": {
      "description": "`rate_limited`: Demasiadas llamadas (límite por clave y minuto). Ver `Retry-After`.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "`internal`: Error interno.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "503": {
      "description": "`unavailable`: Servicio no disponible temporalmente.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  },
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "language": {
              "type": "string",
              "pattern": "^[a-z]{2,3}(_[A-Z]{2})?$"
            },
            "category": {
              "type": "string",
              "enum": [
                "UTILITY",
                "MARKETING",
                "AUTHENTICATION"
              ]
            },
            "description": {
              "type": "string",
              "maxLength": 500
            },
            "phoneNumberId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[^/]+$"
            },
            "allowCategoryChange": {
              "type": "boolean"
            },
            "parameterFormat": {
              "type": "string",
              "enum": [
                "POSITIONAL",
                "NAMED"
              ]
            },
            "messageSendTtlSeconds": {
              "type": "integer",
              "minimum": 30,
              "maximum": 2592000
            },
            "components": {
              "minItems": 1,
              "maxItems": 5,
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "HEADER"
                      },
                      "format": {
                        "type": "string",
                        "enum": [
                          "TEXT",
                          "LOCATION",
                          "IMAGE",
                          "VIDEO",
                          "DOCUMENT"
                        ]
                      },
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 60
                      },
                      "example": {
                        "type": "object",
                        "properties": {
                          "header_text": {
                            "maxItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "header_text_named_params": {
                            "maxItems": 1,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "param_name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 60
                                },
                                "example": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "param_name",
                                "example"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "header_url": {
                            "type": "string",
                            "maxLength": 2000,
                            "pattern": "^https:\\/\\/[^\\s]+$",
                            "description": "Enlace https PÚBLICO del archivo de ejemplo (imagen JPG/PNG ≤ 5 MB, vídeo MP4 ≤ 9 MB, documento PDF ≤ 9 MB). Be CRM lo descarga (sin redirecciones, 15 s como mucho) y lo sube a Meta; se propone como cabecera al enviar."
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "format"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "BODY"
                      },
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "add_security_recommendation": {
                        "type": "boolean"
                      },
                      "example": {
                        "type": "object",
                        "properties": {
                          "body_text": {
                            "maxItems": 1,
                            "type": "array",
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "body_text_named_params": {
                            "maxItems": 30,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "param_name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 60
                                },
                                "example": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "param_name",
                                "example"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "FOOTER"
                      },
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 60
                      },
                      "code_expiration_minutes": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 90
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "BUTTONS"
                      },
                      "buttons": {
                        "minItems": 1,
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "QUICK_REPLY"
                                },
                                "text": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 25
                                }
                              },
                              "required": [
                                "type",
                                "text"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "URL"
                                },
                                "text": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 25
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2000
                                },
                                "example": {
                                  "maxItems": 1,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 2000
                                  }
                                }
                              },
                              "required": [
                                "type",
                                "text",
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "PHONE_NUMBER"
                                },
                                "text": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 25
                                },
                                "phone_number": {
                                  "type": "string",
                                  "minLength": 5,
                                  "maxLength": 20
                                }
                              },
                              "required": [
                                "type",
                                "text",
                                "phone_number"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "COPY_CODE"
                                },
                                "example": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 15,
                                  "description": "Código de ejemplo del cupón (letras y números)."
                                }
                              },
                              "required": [
                                "type",
                                "example"
                              ],
                              "additionalProperties": false,
                              "description": "Botón «Copiar código» (cupón). El código real va en cada envío (`coupon_code`)."
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "REQUEST_CONTACT_INFO"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false,
                              "description": "Botón «Compartir contacto» (Marketing o Utilidad): el usuario manda su teléfono con un toque; útil con usuarios que escriben con nombre de usuario (BSUID). Sin texto: lo pone WhatsApp."
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "OTP"
                                },
                                "otp_type": {
                                  "type": "string",
                                  "enum": [
                                    "COPY_CODE",
                                    "ONE_TAP"
                                  ]
                                },
                                "text": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 25
                                },
                                "autofill_text": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 25
                                },
                                "supported_apps": {
                                  "minItems": 1,
                                  "maxItems": 5,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "package_name": {
                                        "type": "string",
                                        "minLength": 3,
                                        "maxLength": 224
                                      },
                                      "signature_hash": {
                                        "type": "string",
                                        "minLength": 11,
                                        "maxLength": 11
                                      }
                                    },
                                    "required": [
                                      "package_name",
                                      "signature_hash"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "type",
                                "otp_type"
                              ],
                              "additionalProperties": false,
                              "description": "Solo AUTHENTICATION: botón del código (copiar o autocompletar en Android)."
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "type",
                      "buttons"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "LIMITED_TIME_OFFER"
                      },
                      "limited_time_offer": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 16
                          },
                          "has_expiration": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "text"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "limited_time_offer"
                    ],
                    "additionalProperties": false,
                    "description": "Oferta por tiempo limitado (MARKETING): la caducidad va en cada envío."
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "CAROUSEL"
                      },
                      "cards": {
                        "minItems": 2,
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "components": {
                              "minItems": 2,
                              "maxItems": 3,
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "HEADER"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "IMAGE",
                                          "VIDEO"
                                        ]
                                      },
                                      "example": {
                                        "type": "object",
                                        "properties": {
                                          "header_url": {
                                            "type": "string",
                                            "maxLength": 2000,
                                            "pattern": "^https:\\/\\/[^\\s]+$",
                                            "description": "Enlace https PÚBLICO del archivo de ejemplo (imagen JPG/PNG ≤ 5 MB, vídeo MP4 ≤ 9 MB, documento PDF ≤ 9 MB). Be CRM lo descarga (sin redirecciones, 15 s como mucho) y lo sube a Meta; se propone como cabecera al enviar."
                                          }
                                        },
                                        "required": [
                                          "header_url"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "format",
                                      "example"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "BODY"
                                      },
                                      "text": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1024
                                      },
                                      "example": {
                                        "type": "object",
                                        "properties": {
                                          "body_text": {
                                            "maxItems": 1,
                                            "type": "array",
                                            "items": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            }
                                          },
                                          "body_text_named_params": {
                                            "maxItems": 30,
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "param_name": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 60
                                                },
                                                "example": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "param_name",
                                                "example"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "BUTTONS"
                                      },
                                      "buttons": {
                                        "minItems": 1,
                                        "maxItems": 2,
                                        "type": "array",
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "QUICK_REPLY"
                                                },
                                                "text": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 25
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "text"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "URL"
                                                },
                                                "text": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 25
                                                },
                                                "url": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 2000
                                                },
                                                "example": {
                                                  "maxItems": 1,
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 2000
                                                  }
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "text",
                                                "url"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "PHONE_NUMBER"
                                                },
                                                "text": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 25
                                                },
                                                "phone_number": {
                                                  "type": "string",
                                                  "minLength": 5,
                                                  "maxLength": 20
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "text",
                                                "phone_number"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "COPY_CODE"
                                                },
                                                "example": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 15,
                                                  "description": "Código de ejemplo del cupón (letras y números)."
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "example"
                                              ],
                                              "additionalProperties": false,
                                              "description": "Botón «Copiar código» (cupón). El código real va en cada envío (`coupon_code`)."
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "REQUEST_CONTACT_INFO"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": false,
                                              "description": "Botón «Compartir contacto» (Marketing o Utilidad): el usuario manda su teléfono con un toque; útil con usuarios que escriben con nombre de usuario (BSUID). Sin texto: lo pone WhatsApp."
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "OTP"
                                                },
                                                "otp_type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "COPY_CODE",
                                                    "ONE_TAP"
                                                  ]
                                                },
                                                "text": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 25
                                                },
                                                "autofill_text": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 25
                                                },
                                                "supported_apps": {
                                                  "minItems": 1,
                                                  "maxItems": 5,
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "package_name": {
                                                        "type": "string",
                                                        "minLength": 3,
                                                        "maxLength": 224
                                                      },
                                                      "signature_hash": {
                                                        "type": "string",
                                                        "minLength": 11,
                                                        "maxLength": 11
                                                      }
                                                    },
                                                    "required": [
                                                      "package_name",
                                                      "signature_hash"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "otp_type"
                                              ],
                                              "additionalProperties": false,
                                              "description": "Solo AUTHENTICATION: botón del código (copiar o autocompletar en Android)."
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "buttons"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "components"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "type",
                      "cards"
                    ],
                    "additionalProperties": false,
                    "description": "Carrusel (MARKETING): 2–10 tarjetas con la MISMA forma (cabecera imagen o vídeo, texto en todas o en ninguna y los mismos botones). El BODY de la plantilla va encima del carrusel."
                  }
                ]
              }
            }
          },
          "required": [
            "language",
            "category",
            "components"
          ],
          "additionalProperties": false
        }
      }
    }
  }
}
```
