WhatsApp · JSON Structure

Whatsapp Business Management Api Template Component Definition Structure

TemplateComponentDefinition from WhatsApp API

Type: object Properties: 7 Required: 1

TemplateComponentDefinition is a JSON Structure definition published by WhatsApp, describing 7 properties, of which 1 is required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

type format text example buttons add_security_recommendation code_expiration_minutes

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/whatsapp/refs/heads/main/json-structure/whatsapp-business-management-api-template-component-definition-structure.json",
  "name": "TemplateComponentDefinition",
  "description": "TemplateComponentDefinition from WhatsApp API",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "HEADER",
        "BODY",
        "FOOTER",
        "BUTTONS"
      ],
      "example": "HEADER"
    },
    "format": {
      "type": "string",
      "enum": [
        "TEXT",
        "IMAGE",
        "VIDEO",
        "DOCUMENT",
        "LOCATION"
      ],
      "description": "Header format type",
      "example": "TEXT"
    },
    "text": {
      "type": "string",
      "description": "Component text content",
      "example": "Hello from WhatsApp!"
    },
    "example": {
      "type": "object",
      "description": "Example values for variables"
    },
    "buttons": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/TemplateButton"
      }
    },
    "add_security_recommendation": {
      "type": "boolean",
      "description": "Authentication templates only",
      "example": true
    },
    "code_expiration_minutes": {
      "type": "int32",
      "description": "Authentication templates only (1-90)",
      "minimum": 1,
      "maximum": 90,
      "example": 42
    }
  },
  "required": [
    "type"
  ]
}