CRADמפתחים
עברית

Submit an owned WhatsApp template edit

לפני שימוש חי — בדקו יכולות פרוסות, הרשאות ומוכנות של החיבור שלכם.

בדקו את היכולות הפרוסות, הרשאות המפתח ומוכנות העסק בסביבה שלכם. דוגמאות HTTP נלכדו בבדיקות מבודדות; הסימון local-unreleased שלהן אינו אומר שה־API אינו פועל, ואינו מאשר את החיבור שלכם. במסלול הלקוח מאמתים טלפון בתבנית WhatsApp שהעסק הגדיר; SMS אינו נתמך. רישום בידי אדמין מורשה הוא פעולה נפרדת ללא קוד.

PATCH/v1/management/whatsapp-templates/{templateId}

Behavior

Backend-only Management credential; no Origin header or caller-selected business/phone/WABA/token. Full replacement definition; name, language and category must stay unchanged. Editing eligibility/rate limits remain provider-controlled. Shared starters and arbitrary provider IDs are excluded. Requires whatsapp-templates:read and whatsapp-templates:write. Current connection and provider prerequisites are checked separately; a stored grant does not establish readiness.

Authentication

ManagementCredential

Credential rules

One server-only owner-issued wbm_ API key can carry both management and integration permissions. Additional permissions require an explicit owner-issued grant. GET /v1/management returns the management discovery view, which may be empty for a booking-only key. For credentials with appointments:read, this discovery view omits whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write to preserve calendar-client compatibility. Discover these grants through GET /v1/management/messaging-capabilities. Template/profile command authorization still uses the stored grants. Server-only owner-issued Management authority with explicit application permissions. Calling this API does not expand a credential's grants. contacts:read/write/block/sync/fields:read/fields:write are separate approvals for canonical business contacts; fields also require current typed owner grants. contacts:record remains contact recording/recovery only. These grants create no customer phone proof, booking authority, messaging consent or automatic synchronization. Hours/blocks retain their independent resource grants. booking-policy:read/write separately delegate whole-business booking settings, without schedule/provider grants; write requires read. They preserve existing appointments and create no duration-rewrite authority. Provider duration policy additionally requires explicit provider-booking-policy:read/write and exact current providerIds; booking-duration:rewrite is separately approved and does not itself grant policy read/write. Service catalogue requires explicit services:read/write, independent of provider/calendar/schedule resources; write requires read. These operations do not expand an existing credential's grants. Public presentation and reviewed service selection require explicit website-content:read/write; write requires read, independently from services:* and provider resources. Existing provider metadata/activity/assignment additionally requires providers:read/write and a nonempty explicit current providerIds grant; write requires read. This grants no provider creation, deletion, login, invitation or schedule authority. WhatsApp template/profile management requires separate whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write application scopes. Write requires its matching read scope. These grants require explicit owner approval; Meta OAuth permissions remain separate.

Required application permissions

whatsapp-templates:readwhatsapp-templates:write

Request

  • templateIdpath · stringRequired
    Format and constraints
    templateId schema
    {
      "type": "string",
      "format": "uuid"
    }
  • Idempotency-Keyheader · stringRequired

    Persist one UUID with the complete original request before dispatch. Reuse it for exact replay and recovery.

    Format and constraints
    Idempotency-Key schema
    {
      "type": "string",
      "format": "uuid"
    }
  • If-Matchheader · stringRequired

    Use the quoted ETag returned by the resource GET; this is not the operation UUID.

    Format and constraints
    If-Match schema
    {
      "type": "string",
      "pattern": "^\"[1-9][0-9]*\"$"
    }

Request body · required

application/json · WhatsappTemplateDefinition

Closed CRAD creation/editing contract. Meta review, eligibility and provider restrictions still apply. Authentication is standard COPY_CODE, without custom message text or header. The code-expiration footer does not create code generation, verification or expiry enforcement in CRAD. Examples default to [] when there are no body variables.

Exactly one of these variants must match.

  • oneOf 1objectSchema branch
    View branch fields and rules
    • namestringRequired in this branch

      minLength: 1pattern: "^[a-z][a-z0-9_]*$"maxLength: 80

    • languagestringRequired in this branch

      Allowed values: ["ar","en_US","he"]

    • categorystringRequired in this branch

      Allowed values: ["UTILITY","MARKETING"]

    • bodystringRequired in this branch

      Contiguous positional variables {{1}} through {{N}}; no skipped positions or named variables. At most 30 positions.

      minLength: 1maxLength: 1024

    • examplesarrayOptional in this branch

      Exactly one sample per positional variable, in order.

      maxItems: 30

      View nested fields
      • []stringArray item

        minLength: 1maxLength: 256

    • headeroneOf (object | object)Optional in this branch

      Exactly one of these variants must match.

      View nested fields
      • oneOf 1 · type = "text"objectSchema branch
        View branch fields and rules
        • typestringRequired in this branch

          Value: "text"

        • textstringRequired in this branch

          Fixed text; no placeholder delimiters.

          minLength: 1maxLength: 60

        • additionalPropertiesno value allowedSchema rule
      • oneOf 2 · type = "image"objectSchema branch
        View branch fields and rules
        • typestringRequired in this branch

          Value: "image"

        • uploadIdstring · uuidRequired in this branch
        • additionalPropertiesno value allowedSchema rule
    • footerstringOptional in this branch

      Fixed text; no placeholder delimiters.

      minLength: 1maxLength: 60

    • buttonsarrayOptional in this branch

      Ordered distinct QUICK_REPLY labels. At send time supply exactly this many opaque payloads.

      maxItems: 3uniqueItems: true

      View nested fields
      • []stringArray item

        minLength: 1maxLength: 25

    • additionalPropertiesno value allowedSchema rule
  • oneOf 2 · category = "AUTHENTICATION"objectSchema branch
    View branch fields and rules
    • namestringRequired in this branch

      minLength: 1pattern: "^[a-z][a-z0-9_]*$"maxLength: 80

    • languagestringRequired in this branch

      Allowed values: ["ar","en_US","he"]

    • categorystringRequired in this branch

      Value: "AUTHENTICATION"

    • authenticationobjectRequired in this branch
      View nested fields
      • addSecurityRecommendationbooleanRequired in this branch
      • codeExpirationMinutesintegerRequired in this branch

        minimum: 1maximum: 90

      • copyCodeTextstringRequired in this branch

        minLength: 1maxLength: 25

      • additionalPropertiesno value allowedSchema rule
    • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9_]*$",
          "maxLength": 80
        },
        "language": {
          "enum": [
            "ar",
            "en_US",
            "he"
          ]
        },
        "category": {
          "enum": [
            "UTILITY",
            "MARKETING"
          ]
        },
        "body": {
          "type": "string",
          "minLength": 1,
          "description": "Contiguous positional variables {{1}} through {{N}}; no skipped positions or named variables. At most 30 positions.",
          "maxLength": 1024
        },
        "examples": {
          "type": "array",
          "maxItems": 30,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "description": "Exactly one sample per positional variable, in order."
        },
        "header": {
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "type": {
                  "const": "text"
                },
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Fixed text; no placeholder delimiters.",
                  "maxLength": 60
                }
              },
              "required": [
                "type",
                "text"
              ]
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "type": {
                  "const": "image"
                },
                "uploadId": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "type",
                "uploadId"
              ]
            }
          ]
        },
        "footer": {
          "type": "string",
          "minLength": 1,
          "description": "Fixed text; no placeholder delimiters.",
          "maxLength": 60
        },
        "buttons": {
          "type": "array",
          "maxItems": 3,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 25
          },
          "description": "Ordered distinct QUICK_REPLY labels. At send time supply exactly this many opaque payloads."
        }
      },
      "required": [
        "name",
        "language",
        "category",
        "body"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9_]*$",
          "maxLength": 80
        },
        "language": {
          "enum": [
            "ar",
            "en_US",
            "he"
          ]
        },
        "category": {
          "const": "AUTHENTICATION"
        },
        "authentication": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "addSecurityRecommendation": {
              "type": "boolean"
            },
            "codeExpirationMinutes": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "copyCodeText": {
              "type": "string",
              "minLength": 1,
              "maxLength": 25
            }
          },
          "required": [
            "addSecurityRecommendation",
            "codeExpirationMinutes",
            "copyCodeText"
          ]
        }
      },
      "required": [
        "name",
        "language",
        "category",
        "authentication"
      ]
    }
  ],
  "description": "Closed CRAD creation/editing contract. Meta review, eligibility and provider restrictions still apply. Authentication is standard COPY_CODE, without custom message text or header. The code-expiration footer does not create code generation, verification or expiry enforcement in CRAD. Examples default to [] when there are no body variables."
}

Successful responses

200 · WhatsappTemplateOperation

Current authorized template or operation result. Inspect operation state and providerStatus where returned; acceptance is separate from Meta approval and message delivery.

Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · WhatsappTemplateOperation

succeeded records the submitted provider action, not template approval or message delivery. A missing/unknown/pending receipt is never permission to submit a new write. Reuse the original UUID/body; explicit reconciliation reads provider state without repeating a create/edit/delete.

  • operationIdstring · uuidRequired
  • statestringRequired

    Allowed values: ["pending","succeeded","rejected","unknown"]

  • requestobjectRequired
    View nested fields
    • actionstringRequired

      Allowed values: ["create","edit","delete"]

    • templateIdanyOf (string | null)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1string · uuidSchema branch
      • anyOf 2nullSchema branch
    • expectedVersioninteger | nullRequired

      minimum: 1

    • definitionanyOf (oneOf (object | object) | null)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1oneOf (object | object)Schema branch

        Closed CRAD creation/editing contract. Meta review, eligibility and provider restrictions still apply. Authentication is standard COPY_CODE, without custom message text or header. The code-expiration footer does not create code generation, verification or expiry enforcement in CRAD. Examples default to [] when there are no body variables.

        Exactly one of these variants must match.

        View branch fields and rules
        • oneOf 1objectSchema branch
          View branch fields and rules
          • namestringRequired in this branch

            minLength: 1pattern: "^[a-z][a-z0-9_]*$"maxLength: 80

          • languagestringRequired in this branch

            Allowed values: ["ar","en_US","he"]

          • categorystringRequired in this branch

            Allowed values: ["UTILITY","MARKETING"]

          • bodystringRequired in this branch

            Contiguous positional variables {{1}} through {{N}}; no skipped positions or named variables. At most 30 positions.

            minLength: 1maxLength: 1024

          • examplesarrayOptional in this branch

            Exactly one sample per positional variable, in order.

            maxItems: 30

            View nested fields
            • []stringArray item

              minLength: 1maxLength: 256

          • headeroneOf (object | object)Optional in this branch

            Exactly one of these variants must match.

            View nested fields
            • oneOf 1 · type = "text"objectSchema branch
              View branch fields and rules
              • typestringRequired in this branch

                Value: "text"

              • textstringRequired in this branch

                Fixed text; no placeholder delimiters.

                minLength: 1maxLength: 60

              • additionalPropertiesno value allowedSchema rule
            • oneOf 2 · type = "image"objectSchema branch
              View branch fields and rules
              • typestringRequired in this branch

                Value: "image"

              • uploadIdstring · uuidRequired in this branch
              • additionalPropertiesno value allowedSchema rule
          • footerstringOptional in this branch

            Fixed text; no placeholder delimiters.

            minLength: 1maxLength: 60

          • buttonsarrayOptional in this branch

            Ordered distinct QUICK_REPLY labels. At send time supply exactly this many opaque payloads.

            maxItems: 3uniqueItems: true

            View nested fields
            • []stringArray item

              minLength: 1maxLength: 25

          • additionalPropertiesno value allowedSchema rule
        • oneOf 2 · category = "AUTHENTICATION"objectSchema branch
          View branch fields and rules
          • namestringRequired in this branch

            minLength: 1pattern: "^[a-z][a-z0-9_]*$"maxLength: 80

          • languagestringRequired in this branch

            Allowed values: ["ar","en_US","he"]

          • categorystringRequired in this branch

            Value: "AUTHENTICATION"

          • authenticationobjectRequired in this branch
            View nested fields
            • addSecurityRecommendationbooleanRequired in this branch
            • codeExpirationMinutesintegerRequired in this branch

              minimum: 1maximum: 90

            • copyCodeTextstringRequired in this branch

              minLength: 1maxLength: 25

            • additionalPropertiesno value allowedSchema rule
          • additionalPropertiesno value allowedSchema rule
      • anyOf 2nullSchema branch
    • additionalPropertiesno value allowedSchema rule
  • templateobjectRequired

    Only templates created and registered for this business through this API. Shared starters and another business's resources cannot be edited/deleted even when a WABA is shared. Local accepted operation state is separate from Meta approval.

    View nested fields
    • idstring · uuidRequired
    • namestringRequired

      Provider name created as crad_<full tenant hex>_<requested name>.

      minLength: 1maxLength: 512

    • languagestringRequired

      Allowed values: ["ar","en_US","he"]

    • categorystringRequired

      Allowed values: ["UTILITY","MARKETING","AUTHENTICATION"]

    • versionintegerRequired

      minimum: 1

    • providerIdstring | nullRequired

      Informational provider identity; never accepted as an editable resource selector.

      pattern: "^[0-9]{1,40}$"

    • statusstringRequired

      pattern: "^[A-Z_]+$"maxLength: 40

    • definitiononeOf (object | object)Required

      Closed CRAD creation/editing contract. Meta review, eligibility and provider restrictions still apply. Authentication is standard COPY_CODE, without custom message text or header. The code-expiration footer does not create code generation, verification or expiry enforcement in CRAD. Examples default to [] when there are no body variables.

      Exactly one of these variants must match.

      View nested fields
      • oneOf 1objectSchema branch
        View branch fields and rules
        • namestringRequired in this branch

          minLength: 1pattern: "^[a-z][a-z0-9_]*$"maxLength: 80

        • languagestringRequired in this branch

          Allowed values: ["ar","en_US","he"]

        • categorystringRequired in this branch

          Allowed values: ["UTILITY","MARKETING"]

        • bodystringRequired in this branch

          Contiguous positional variables {{1}} through {{N}}; no skipped positions or named variables. At most 30 positions.

          minLength: 1maxLength: 1024

        • examplesarrayOptional in this branch

          Exactly one sample per positional variable, in order.

          maxItems: 30

          View nested fields
          • []stringArray item

            minLength: 1maxLength: 256

        • headeroneOf (object | object)Optional in this branch

          Exactly one of these variants must match.

          View nested fields
          • oneOf 1 · type = "text"objectSchema branch
            View branch fields and rules
            • typestringRequired in this branch

              Value: "text"

            • textstringRequired in this branch

              Fixed text; no placeholder delimiters.

              minLength: 1maxLength: 60

            • additionalPropertiesno value allowedSchema rule
          • oneOf 2 · type = "image"objectSchema branch
            View branch fields and rules
            • typestringRequired in this branch

              Value: "image"

            • uploadIdstring · uuidRequired in this branch
            • additionalPropertiesno value allowedSchema rule
        • footerstringOptional in this branch

          Fixed text; no placeholder delimiters.

          minLength: 1maxLength: 60

        • buttonsarrayOptional in this branch

          Ordered distinct QUICK_REPLY labels. At send time supply exactly this many opaque payloads.

          maxItems: 3uniqueItems: true

          View nested fields
          • []stringArray item

            minLength: 1maxLength: 25

        • additionalPropertiesno value allowedSchema rule
      • oneOf 2 · category = "AUTHENTICATION"objectSchema branch
        View branch fields and rules
        • namestringRequired in this branch

          minLength: 1pattern: "^[a-z][a-z0-9_]*$"maxLength: 80

        • languagestringRequired in this branch

          Allowed values: ["ar","en_US","he"]

        • categorystringRequired in this branch

          Value: "AUTHENTICATION"

        • authenticationobjectRequired in this branch
          View nested fields
          • addSecurityRecommendationbooleanRequired in this branch
          • codeExpirationMinutesintegerRequired in this branch

            minimum: 1maximum: 90

          • copyCodeTextstringRequired in this branch

            minLength: 1maxLength: 25

          • additionalPropertiesno value allowedSchema rule
        • additionalPropertiesno value allowedSchema rule
    • updatedAtstring · date-timeRequired
    • additionalPropertiesno value allowedSchema rule
  • errorCodestring | nullRequired

    pattern: "^[A-Z_0-9]{1,80}$"

  • replayedbooleanRequired
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "operationId": {
      "type": "string",
      "format": "uuid"
    },
    "state": {
      "enum": [
        "pending",
        "succeeded",
        "rejected",
        "unknown"
      ]
    },
    "request": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "enum": [
            "create",
            "edit",
            "delete"
          ]
        },
        "templateId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "expectedVersion": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        },
        "definition": {
          "anyOf": [
            {
              "oneOf": [
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "pattern": "^[a-z][a-z0-9_]*$",
                      "maxLength": 80
                    },
                    "language": {
                      "enum": [
                        "ar",
                        "en_US",
                        "he"
                      ]
                    },
                    "category": {
                      "enum": [
                        "UTILITY",
                        "MARKETING"
                      ]
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "description": "Contiguous positional variables {{1}} through {{N}}; no skipped positions or named variables. At most 30 positions.",
                      "maxLength": 1024
                    },
                    "examples": {
                      "type": "array",
                      "maxItems": 30,
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "description": "Exactly one sample per positional variable, in order."
                    },
                    "header": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "type": {
                              "const": "text"
                            },
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "description": "Fixed text; no placeholder delimiters.",
                              "maxLength": 60
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "type": {
                              "const": "image"
                            },
                            "uploadId": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "required": [
                            "type",
                            "uploadId"
                          ]
                        }
                      ]
                    },
                    "footer": {
                      "type": "string",
                      "minLength": 1,
                      "description": "Fixed text; no placeholder delimiters.",
                      "maxLength": 60
                    },
                    "buttons": {
                      "type": "array",
                      "maxItems": 3,
                      "uniqueItems": true,
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 25
                      },
                      "description": "Ordered distinct QUICK_REPLY labels. At send time supply exactly this many opaque payloads."
                    }
                  },
                  "required": [
                    "name",
                    "language",
                    "category",
                    "body"
                  ]
                },
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "pattern": "^[a-z][a-z0-9_]*$",
                      "maxLength": 80
                    },
                    "language": {
                      "enum": [
                        "ar",
                        "en_US",
                        "he"
                      ]
                    },
                    "category": {
                      "const": "AUTHENTICATION"
                    },
                    "authentication": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "addSecurityRecommendation": {
                          "type": "boolean"
                        },
                        "codeExpirationMinutes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 90
                        },
                        "copyCodeText": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        }
                      },
                      "required": [
                        "addSecurityRecommendation",
                        "codeExpirationMinutes",
                        "copyCodeText"
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "language",
                    "category",
                    "authentication"
                  ]
                }
              ],
              "description": "Closed CRAD creation/editing contract. Meta review, eligibility and provider restrictions still apply. Authentication is standard COPY_CODE, without custom message text or header. The code-expiration footer does not create code generation, verification or expiry enforcement in CRAD. Examples default to [] when there are no body variables."
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "action",
        "templateId",
        "expectedVersion",
        "definition"
      ]
    },
    "template": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "Provider name created as crad_<full tenant hex>_<requested name>.",
          "maxLength": 512
        },
        "language": {
          "enum": [
            "ar",
            "en_US",
            "he"
          ]
        },
        "category": {
          "enum": [
            "UTILITY",
            "MARKETING",
            "AUTHENTICATION"
          ]
        },
        "version": {
          "type": "integer",
          "minimum": 1
        },
        "providerId": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[0-9]{1,40}$",
          "description": "Informational provider identity; never accepted as an editable resource selector."
        },
        "status": {
          "type": "string",
          "pattern": "^[A-Z_]+$",
          "maxLength": 40
        },
        "definition": {
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "pattern": "^[a-z][a-z0-9_]*$",
                  "maxLength": 80
                },
                "language": {
                  "enum": [
                    "ar",
                    "en_US",
                    "he"
                  ]
                },
                "category": {
                  "enum": [
                    "UTILITY",
                    "MARKETING"
                  ]
                },
                "body": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Contiguous positional variables {{1}} through {{N}}; no skipped positions or named variables. At most 30 positions.",
                  "maxLength": 1024
                },
                "examples": {
                  "type": "array",
                  "maxItems": 30,
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": "Exactly one sample per positional variable, in order."
                },
                "header": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "type": {
                          "const": "text"
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Fixed text; no placeholder delimiters.",
                          "maxLength": 60
                        }
                      },
                      "required": [
                        "type",
                        "text"
                      ]
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "type": {
                          "const": "image"
                        },
                        "uploadId": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "type",
                        "uploadId"
                      ]
                    }
                  ]
                },
                "footer": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Fixed text; no placeholder delimiters.",
                  "maxLength": 60
                },
                "buttons": {
                  "type": "array",
                  "maxItems": 3,
                  "uniqueItems": true,
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 25
                  },
                  "description": "Ordered distinct QUICK_REPLY labels. At send time supply exactly this many opaque payloads."
                }
              },
              "required": [
                "name",
                "language",
                "category",
                "body"
              ]
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "pattern": "^[a-z][a-z0-9_]*$",
                  "maxLength": 80
                },
                "language": {
                  "enum": [
                    "ar",
                    "en_US",
                    "he"
                  ]
                },
                "category": {
                  "const": "AUTHENTICATION"
                },
                "authentication": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "addSecurityRecommendation": {
                      "type": "boolean"
                    },
                    "codeExpirationMinutes": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 90
                    },
                    "copyCodeText": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 25
                    }
                  },
                  "required": [
                    "addSecurityRecommendation",
                    "codeExpirationMinutes",
                    "copyCodeText"
                  ]
                }
              },
              "required": [
                "name",
                "language",
                "category",
                "authentication"
              ]
            }
          ],
          "description": "Closed CRAD creation/editing contract. Meta review, eligibility and provider restrictions still apply. Authentication is standard COPY_CODE, without custom message text or header. The code-expiration footer does not create code generation, verification or expiry enforcement in CRAD. Examples default to [] when there are no body variables."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "name",
        "language",
        "category",
        "version",
        "providerId",
        "status",
        "definition",
        "updatedAt"
      ],
      "description": "Only templates created and registered for this business through this API. Shared starters and another business's resources cannot be edited/deleted even when a WABA is shared. Local accepted operation state is separate from Meta approval."
    },
    "errorCode": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[A-Z_0-9]{1,80}$"
    },
    "replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "operationId",
    "state",
    "request",
    "template",
    "errorCode",
    "replayed"
  ],
  "description": "succeeded records the submitted provider action, not template approval or message delivery. A missing/unknown/pending receipt is never permission to submit a new write. Reuse the original UUID/body; explicit reconciliation reads provider state without repeating a create/edit/delete."
}

Errors and recovery

Error responses declared in the contract (11)

The preview contract shares generic error definitions across operations. This list is not an exhaustive list of runtime errors.

401 · Missing or invalid server credential.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
403 · Scope, credential, integration or business authority denied; browser Origin is refused.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
404 · Owned resource or usable same-purpose current-binding image not found.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
405 · Unsupported HTTP method.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
409 · Connection changed/blocked, conflicting operation UUID, unresolved write, expired claim or owner review required. No automatic provider redispatch.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
412 · If-Match refers to a stale profile digest or local template revision; fetch the current resource and review a new intended change.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
415 · Unsupported content type, MIME or file signature.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
422 · Invalid/unknown field, unsupported selector/query, UUID, precondition or template shape.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
428 · Required Idempotency-Key or If-Match is missing.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
429 · Credential/request or local template rate limit; honor Retry-After when supplied.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
503 · Configuration, provider or persistence unavailable; retain original operation identity because outcome may be uncertain.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}