WhatsApp · JSON Structure

Whatsapp Cloud Api Template Parameter Structure

TemplateParameter from WhatsApp API

Type: object Properties: 10 Required: 1

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

Properties

type text payload coupon_code image video document location currency date_time

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-cloud-api-template-parameter-structure.json",
  "name": "TemplateParameter",
  "description": "TemplateParameter from WhatsApp API",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "text",
        "image",
        "video",
        "document",
        "location",
        "currency",
        "date_time",
        "payload",
        "coupon_code"
      ],
      "example": "text"
    },
    "text": {
      "type": "string",
      "example": "Hello from WhatsApp!"
    },
    "payload": {
      "type": "string",
      "example": "example_value"
    },
    "coupon_code": {
      "type": "string",
      "example": "example_value"
    },
    "image": {
      "$ref": "#/components/schemas/MediaObject"
    },
    "video": {
      "$ref": "#/components/schemas/MediaObject"
    },
    "document": {
      "$ref": "#/components/schemas/DocumentObject"
    },
    "location": {
      "$ref": "#/components/schemas/LocationMessage"
    },
    "currency": {
      "type": "object",
      "properties": {
        "fallback_value": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "amount_1000": {
          "type": "int32"
        }
      }
    },
    "date_time": {
      "type": "object",
      "properties": {
        "fallback_value": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "type"
  ]
}