{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postproxy-dev/json-schema/postproxy-dev-whats-app-template-create-request-schema.json",
  "title": "WhatsAppTemplateCreateRequest",
  "description": "Creates a custom template from components, or copies one of Meta’s pre-approved library templates.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postproxy-dev-whats-app-api-openapi.yml#/components/schemas/WhatsAppTemplateCreateRequest",
  "type": "object",
  "required": [
    "name",
    "category",
    "language"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Lowercase letters, digits and underscores, starting with a letter. Unique per language on the account."
    },
    "category": {
      "type": "string",
      "enum": [
        "UTILITY",
        "MARKETING",
        "AUTHENTICATION"
      ],
      "description": "Case-insensitive."
    },
    "language": {
      "type": "string"
    },
    "components": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Required for a custom template. Meta’s component array; a component with variables needs an example for review."
    },
    "parameter_format": {
      "type": "string",
      "enum": [
        "POSITIONAL",
        "NAMED"
      ],
      "description": "Defaults to POSITIONAL."
    },
    "message_send_ttl_seconds": {
      "type": "integer",
      "description": "AUTHENTICATION 30–900, UTILITY 30–43200, MARKETING 43200–2592000. -1 keeps Meta’s default on AUTHENTICATION or UTILITY."
    },
    "library_template_name": {
      "type": "string",
      "description": "Required to copy a Meta library template; components is then not needed. A library copy is approved immediately."
    },
    "library_template_body_inputs": {
      "type": "object",
      "additionalProperties": true
    },
    "library_template_button_inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    }
  }
}