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

List campaign templates

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

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

GET/v1/management/campaign-templates

הודיעו ללקוח יחיד שמסמך מוכן

בקשו תבנית פעם אחת עם Idempotency-Key שמור. עקבו אחר receipt.request.requestId דרך /template-requests/{requestId}; שחזרו תגובה שאבדה דרך /template-request-operations/{savedUuid}. בקשה במצב done מתעדת טיפול של הצוות, ולא אישור של Meta.

בחרו את השם והשפה בפועל מתוך /campaign-templates רק כשהתבנית במצב APPROVED והערך supported הוא true. שלחו כפרמטר כתובת כניסה לפורטל שמחייב הזדהות; אל תכללו פרטים רפואיים, תוכן מסמך או אסימוני גישה והתחברות בהודעה או בכתובת. קבלו הרשאה נפרדת להודעות על מסמכים: הסכמה לעדכוני תור אינה הסכמה גורפת למסמכים. כבדו בקשות הסרה.

הרשאות לשלב הזה

campaigns:read

המשך לתהליך ההודעות של הקליניקה

Behavior

Reads current template descriptions from Meta without sending. Check supported and complete before offering a template. The preview includes every supported language variant that the selected language-matching mode can use, including header, footer and buttons. Template approval is not proof of delivery.

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

campaigns:read

An owner must separately grant campaign access to the whole business or selected active providers. Calendar and customer grants do not imply campaign access. A provider-scoped campaign uses one granted provider and appointment customers. Keep this Management key on your backend.

Request

No query parameters or request body. Use the credentials described above.

Successful responses

200 · BusinessCampaignTemplates

Current authorized result.

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

application/json · BusinessCampaignTemplates

Current template descriptions from at most five 200-item Meta pages. complete:false is not proof of the selected outgoing version set. Unsupported templates are described but cannot be used by a new confirmed campaign.

  • templatesarrayRequired

    maxItems: 1000

    View nested fields
    • []objectArray item
      View nested fields
      • namestringRequired

        pattern: "^[a-z0-9_]{1,512}$"

      • languagestringRequired

        pattern: "^[a-z]{2,3}(_[A-Za-z0-9]{2,4})?$"

      • statusstringRequired

        maxLength: 50

      • categorystringRequired

        maxLength: 50

      • componentsarrayRequired

        maxItems: 10

        View nested fields
        • []objectArray item
          View nested fields
          • typestringRequired

            maxLength: 50

          • formatstringOptional

            maxLength: 50

          • textstringOptional

            maxLength: 16384

          • buttonsarrayOptional

            maxItems: 10

            View nested fields
            • []objectArray item
              View nested fields
              • typestringRequired

                maxLength: 50

              • textstringOptional

                maxLength: 1024

              • urlstringOptional

                maxLength: 4096

              • phone_numberstringOptional

                maxLength: 64

              • additionalPropertiesno value allowedSchema rule
          • additionalPropertiesno value allowedSchema rule
      • bodystringRequired

        maxLength: 16384

      • placeholdersintegerRequired

        minimum: 0maximum: 1000

      • supportedbooleanRequired
      • unsupportedReasonanyOf (string | null)Required

        At least one of these variants must match.

        View nested fields
        • anyOf 1stringSchema branch

          maxLength: 200

        • anyOf 2nullSchema branch
      • additionalPropertiesno value allowedSchema rule
  • completebooleanRequired
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "templates": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9_]{1,512}$"
          },
          "language": {
            "type": "string",
            "pattern": "^[a-z]{2,3}(_[A-Za-z0-9]{2,4})?$"
          },
          "status": {
            "type": "string",
            "maxLength": 50
          },
          "category": {
            "type": "string",
            "maxLength": 50
          },
          "components": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "type": {
                  "type": "string",
                  "maxLength": 50
                },
                "format": {
                  "type": "string",
                  "maxLength": 50
                },
                "text": {
                  "type": "string",
                  "maxLength": 16384
                },
                "buttons": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "type": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "text": {
                        "type": "string",
                        "maxLength": 1024
                      },
                      "url": {
                        "type": "string",
                        "maxLength": 4096
                      },
                      "phone_number": {
                        "type": "string",
                        "maxLength": 64
                      }
                    },
                    "required": [
                      "type"
                    ]
                  },
                  "maxItems": 10
                }
              },
              "required": [
                "type"
              ]
            },
            "maxItems": 10
          },
          "body": {
            "type": "string",
            "maxLength": 16384
          },
          "placeholders": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "supported": {
            "type": "boolean"
          },
          "unsupportedReason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name",
          "language",
          "status",
          "category",
          "components",
          "body",
          "placeholders",
          "supported",
          "unsupportedReason"
        ]
      },
      "maxItems": 1000
    },
    "complete": {
      "type": "boolean"
    }
  },
  "required": [
    "templates",
    "complete"
  ],
  "description": "Current template descriptions from at most five 200-item Meta pages. complete:false is not proof of the selected outgoing version set. Unsupported templates are described but cannot be used by a new confirmed campaign."
}

Errors and recovery

Error responses declared in the contract (7)

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

401 · Missing, invalid or expired Management credential.

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 · Current integration/key/scope/resource authority denied, including a browser Origin. Old keys gain no campaign authority.

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 method.

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 or reviewed template changed; refresh and review before a new action.

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 request, UUID, query, cursor or precondition format.

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 · Request rate limit; honor Retry-After.

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 · Current template catalogue or persistence is unavailable. No send is implied. Recover any uncertain prior command separately.

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