{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postproxy-dev/json-schema/postproxy-dev-whats-app-template-schema.json",
  "title": "WhatsAppTemplate",
  "description": "A WhatsApp message template on the connected WhatsApp Business Account.",
  "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/WhatsAppTemplate",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Postproxy hashid"
    },
    "external_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Meta’s template id"
    },
    "profile_id": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "Lowercase letters, digits and underscores, starting with a letter. With language it identifies the template on Meta."
    },
    "language": {
      "type": "string",
      "description": "Meta language code, e.g. en_US, pt_BR, de"
    },
    "category": {
      "type": "string",
      "enum": [
        "UTILITY",
        "MARKETING",
        "AUTHENTICATION"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "APPROVED",
        "PENDING",
        "REJECTED",
        "PAUSED",
        "DISABLED",
        "IN_APPEAL",
        "PENDING_DELETION"
      ],
      "description": "Meta review status. Only APPROVED templates can be sent."
    },
    "parameter_format": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "POSITIONAL",
        "NAMED",
        null
      ]
    },
    "components": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Meta’s component array — HEADER, BODY, FOOTER, BUTTONS."
    },
    "message_send_ttl_seconds": {
      "type": "integer",
      "description": "Time-to-live for undelivered sends, when the template overrides Meta’s default."
    },
    "rejected_reason": {
      "type": "string",
      "description": "Present when Meta rejected the template."
    },
    "quality_score": {
      "type": "object",
      "additionalProperties": true,
      "description": "Meta’s quality score once scored, e.g. { \"score\": \"GREEN\" }."
    },
    "variable_count": {
      "type": "integer",
      "description": "How many variables a send of this template expects."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}