CRADالمطوّرون
العربية

List this business's API-managed WhatsApp templates

قبل الاستخدام الفعلي — افحص القدرات المنشورة والصلاحيات وجاهزية ربطك.

تحقّق من القدرات المنشورة وصلاحيات المفتاح وجاهزية النشاط في بيئتك. أمثلة HTTP مسجّلة من اختبارات معزولة؛ وصفها local-unreleased لا يعني أن API غير عامل ولا يُثبت جاهزية ربطك. في مسار العميل يُتحقق من الهاتف بقالب واتساب أعدّه النشاط؛ SMS غير مدعوم. التسجيل بواسطة مسؤول مخوّل عملية منفصلة دون رمز.

GET/v1/management/whatsapp-templates

Behavior

Backend-only Management credential; no Origin header or caller-selected business/phone/WABA/token. Lists retained tenant-owned resources for the bound WABA, not every provider template and not the sending catalogue. Requires whatsapp-templates:read. Current connection and provider prerequisites are checked separately; a stored grant does not establish readiness. On successful reads, status and providerStatus reflect a fresh Meta observation, providerCheckedAt dates it, and submissionStatus preserves the stored submission state. When Meta has no matching resource, providerStatus is null and status is the stored state of a template that never reached Meta (LOCAL_PENDING, LOCAL_REJECTED, LOCAL_UNKNOWN), DELETED for a deleted one, or UNKNOWN for a stored Meta ID that Meta no longer lists; unavailable or incomplete provider reads return 503 PROVIDER_UNAVAILABLE. This observation neither reconciles operations nor certifies approval of an attempted local definition. Use the approved sending catalogue for current message content. List pagination stays scoped to this business; no client per-template refresh loop is needed.

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:read

Request

  • cursorquery · stringOptional
    Format and constraints
    cursor schema
    {
      "type": "string",
      "format": "uuid"
    }
  • limitquery · integerOptional
    Format and constraints
    limit schema
    {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 50
    }

Successful responses

200 · WhatsappOwnedTemplateList

Authorized template resource(s) with current provider status, observation time and separate stored submission status. No template mutation or operation reconciliation.

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

application/json · WhatsappOwnedTemplateList

  • itemsarrayRequired

    maxItems: 100

    View nested fields
    • []objectArray item
      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

        Current Meta status observed during this GET when the template exists at Meta. Otherwise the stored state of a template that never reached Meta (LOCAL_PENDING, LOCAL_REJECTED, LOCAL_UNKNOWN), DELETED, or UNKNOWN for a stored Meta ID that Meta no longer lists. It does not certify approval of the local definition or version.

        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
      • providerStatusstring | nullRequired

        Current Meta status, or null when a complete lookup found no matching resource. Provider errors or incomplete lookups return 503 instead of a stale result.

      • providerCheckedAtstring · date-timeRequired

        Time of this provider observation; updatedAt remains the local submission update time.

      • submissionStatusstringRequired

        Stored submission result, retained independently of current provider approval. A rejected edit can retain an attempted definition while the earlier provider content remains APPROVED.

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

      • additionalPropertiesno value allowedSchema rule
  • nextCursoranyOf (string | null)Required

    At least one of these variants must match.

    View nested fields
    • anyOf 1string · uuidSchema branch
    • anyOf 2nullSchema branch
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "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,
            "description": "Current Meta status observed during this GET when the template exists at Meta. Otherwise the stored state of a template that never reached Meta (LOCAL_PENDING, LOCAL_REJECTED, LOCAL_UNKNOWN), DELETED, or UNKNOWN for a stored Meta ID that Meta no longer lists. It does not certify approval of the local definition or version."
          },
          "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"
          },
          "providerStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "Current Meta status, or null when a complete lookup found no matching resource. Provider errors or incomplete lookups return 503 instead of a stale result."
          },
          "providerCheckedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time of this provider observation; updatedAt remains the local submission update time."
          },
          "submissionStatus": {
            "type": "string",
            "pattern": "^[A-Z_]+$",
            "maxLength": 40,
            "description": "Stored submission result, retained independently of current provider approval. A rejected edit can retain an attempted definition while the earlier provider content remains APPROVED."
          }
        },
        "required": [
          "id",
          "name",
          "language",
          "category",
          "version",
          "providerId",
          "status",
          "definition",
          "updatedAt",
          "providerStatus",
          "providerCheckedAt",
          "submissionStatus"
        ]
      }
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "items",
    "nextCursor"
  ]
}

Errors and recovery

Error responses declared in the contract (8)

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"
  ]
}
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"
  ]
}
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"
  ]
}