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

Register, rotate or pause messaging webhooks

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

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

PUT/v1/management/messaging-webhook

Behavior

Supply callbackUrl, enabled and a separate signingSecret of exactly 64 lowercase hexadecimal characters for registration, pause or rotation. HMAC uses the literal secret string. Delivery authority stays bound to this key; expiry, revocation or lost read access stops delivery. Register with the new authorized key after rotation. Pause retains unexpired backlog but captures no new events. Committed capture schedules immediate bounded dispatch, with durable retry, fair continuation and scheduled fallback. Delivery remains asynchronous with no measured latency SLA. See the notifications guide for the signed envelope and receiver checks.

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

conversations:readconversations:write

The exact HTTPS destination requires separate approval for this integration. A signed-in owner setting in CRAD supports that review; the server key cannot approve its own destination. Registration never grants destination approval. No Origin or If-Match.

Request

Idempotency and recovery

Persist one UUID and the exact request before sending. After an uncertain result, retain that UUID, body and preconditions; do not create a replacement operation just to retry. Retry the same PUT after uncertainty. An exact replay returns its original receipt and current state; changed input under that UUID is refused.

  • Idempotency-Keyheader · stringRequired

    Persist one UUID and the exact request before submission. Retry that same command after an uncertain response; a changed command requires a new UUID.

    Format and constraints
    Idempotency-Key schema
    {
      "type": "string",
      "format": "uuid"
    }

Request body · required

application/json · MessagingWebhookInput

  • callbackUrlstring · uriRequired

    Exact CRAD-approved canonical HTTPS URL, including its path. No credentials, non-default port, IP-literal host, query or fragment. Hostnames must be lowercase; a host-only URL includes its trailing slash.

    maxLength: 1024pattern: "^https://[^\\s\\\\?#]+$"

  • signingSecretstringRequired

    Random 32-byte secret encoded as 64 lowercase hexadecimal characters. HMAC uses this literal string as its key, not decoded bytes. Never returned by the API.

    pattern: "^[a-f0-9]{64}$"minLength: 64maxLength: 64writeOnly: true

  • enabledbooleanRequired
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "callbackUrl": {
      "type": "string",
      "format": "uri",
      "maxLength": 1024,
      "pattern": "^https://[^\\s\\\\?#]+$",
      "description": "Exact CRAD-approved canonical HTTPS URL, including its path. No credentials, non-default port, IP-literal host, query or fragment. Hostnames must be lowercase; a host-only URL includes its trailing slash."
    },
    "signingSecret": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "minLength": 64,
      "maxLength": 64,
      "writeOnly": true,
      "description": "Random 32-byte secret encoded as 64 lowercase hexadecimal characters. HMAC uses this literal string as its key, not decoded bytes. Never returned by the API."
    },
    "enabled": {
      "type": "boolean"
    }
  },
  "required": [
    "callbackUrl",
    "signingSecret",
    "enabled"
  ]
}

Successful responses

200 · MessagingWebhookSetResult

Current authorized result.

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

application/json · MessagingWebhookSetResult

  • receiptobjectRequired
    View nested fields
    • operationIdstring · uuidRequired
    • subscriptionIdstring · uuidRequired
    • enabledbooleanRequired
    • additionalPropertiesno value allowedSchema rule
  • currentobjectRequired

    Current integration-scoped configuration. supported identifies installed HTTP support, not active delivery. registered means a credential has been bound; enabled is separate. Pending includes leased events. A missing approval or registration is represented by null IDs/URLs, not an invented destination.

    View nested fields
    • supportedbooleanRequired

      Value: true

    • approvedCallbackUrlanyOf (string | null)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1string · uriSchema branch

        Exact CRAD-approved canonical HTTPS URL, including its path. No credentials, non-default port, IP-literal host, query or fragment. Hostnames must be lowercase; a host-only URL includes its trailing slash.

        maxLength: 1024pattern: "^https://[^\\s\\\\?#]+$"

      • anyOf 2nullSchema branch
    • registeredbooleanRequired
    • enabledbooleanRequired
    • subscriptionIdstring | null · uuidRequired
    • callbackUrlanyOf (string | null)Required

      At least one of these variants must match.

      View nested fields
      • anyOf 1string · uriSchema branch

        Exact CRAD-approved canonical HTTPS URL, including its path. No credentials, non-default port, IP-literal host, query or fragment. Hostnames must be lowercase; a host-only URL includes its trailing slash.

        maxLength: 1024pattern: "^https://[^\\s\\\\?#]+$"

      • anyOf 2nullSchema branch
    • eventsarrayRequired

      minItems: 2maxItems: 2uniqueItems: true

      View nested fields
      • []stringArray item

        Allowed values: ["message.received","message.status"]

    • pendingintegerRequired

      minimum: 0

    • failedintegerRequired

      minimum: 0

    • additionalPropertiesno value allowedSchema rule
  • replayedbooleanRequired
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "receipt": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "operationId": {
          "type": "string",
          "format": "uuid"
        },
        "subscriptionId": {
          "type": "string",
          "format": "uuid"
        },
        "enabled": {
          "type": "boolean"
        }
      },
      "required": [
        "operationId",
        "subscriptionId",
        "enabled"
      ]
    },
    "current": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "supported": {
          "const": true
        },
        "approvedCallbackUrl": {
          "anyOf": [
            {
              "type": "string",
              "format": "uri",
              "maxLength": 1024,
              "pattern": "^https://[^\\s\\\\?#]+$",
              "description": "Exact CRAD-approved canonical HTTPS URL, including its path. No credentials, non-default port, IP-literal host, query or fragment. Hostnames must be lowercase; a host-only URL includes its trailing slash."
            },
            {
              "type": "null"
            }
          ]
        },
        "registered": {
          "type": "boolean"
        },
        "enabled": {
          "type": "boolean"
        },
        "subscriptionId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "callbackUrl": {
          "anyOf": [
            {
              "type": "string",
              "format": "uri",
              "maxLength": 1024,
              "pattern": "^https://[^\\s\\\\?#]+$",
              "description": "Exact CRAD-approved canonical HTTPS URL, including its path. No credentials, non-default port, IP-literal host, query or fragment. Hostnames must be lowercase; a host-only URL includes its trailing slash."
            },
            {
              "type": "null"
            }
          ]
        },
        "events": {
          "type": "array",
          "items": {
            "enum": [
              "message.received",
              "message.status"
            ]
          },
          "minItems": 2,
          "maxItems": 2,
          "uniqueItems": true
        },
        "pending": {
          "type": "integer",
          "minimum": 0
        },
        "failed": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "supported",
        "approvedCallbackUrl",
        "registered",
        "enabled",
        "subscriptionId",
        "callbackUrl",
        "events",
        "pending",
        "failed"
      ],
      "description": "Current integration-scoped configuration. supported identifies installed HTTP support, not active delivery. registered means a credential has been bound; enabled is separate. Pending includes leased events. A missing approval or registration is represented by null IDs/URLs, not an invented destination."
    },
    "replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "receipt",
    "current",
    "replayed"
  ]
}

Errors and recovery

Input validation

  • 413REQUEST_TOO_LARGE

    The JSON request body exceeds 8,192 bytes.

  • 415JSON_REQUIRED

    Send Content-Type: application/json.

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 · UNAUTHENTICATED: invalid or unavailable 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 · SCOPE_REQUIRED, SERVER_CREDENTIAL_REQUIRED or FORBIDDEN. Configuration requires the exact URL previously approved by CRAD.

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 · ROUTE_UNAVAILABLE or NOT_FOUND. Unknown event IDs are not disclosed across integrations.

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 · METHOD_NOT_ALLOWED.

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 · OPERATION_CONFLICT: the UUID was reused with different canonical input.

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"
  ]
}
413 · Structured error.

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 · Structured error.

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. Malformed/extra input, forbidden If-Match, invalid query, or a retry that is not currently eligible.

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 · PRECONDITION_REQUIRED: missing Idempotency-Key.

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 limited; respect Retry-After when present.

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 · Persistence or timeout failure. A write outcome may be uncertain; preserve and retry the exact original command identity.

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