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

Read current-state customer sync pages

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

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

GET/v1/management/customer-changes

Behavior

Server only, with an owner-issued Management credential bound to one tenant/site/integration. The backend must authorize its administrator. Public intake, WhatsApp availability, customer phone verification and website customer mappings are not prerequisites. Existing contacts:record keys are not widened. Requires contacts:read and contacts:sync. Consume the opaque cursor from snapshot bootstrap or the prior page, limit 1..100. Snapshot pages enumerate fixed membership with current values/tombstones; later changes pages return metadata signals with current permissioned hydration. Hidden-only signals are skipped but advance the cursor; event identity/order is stable while replayed current values may be newer. Scope/grant/eligible-definition changes invalidate the projection epoch and require bootstrap. Equivalent credential rotation may resume; fields:read reduction cannot replay prior sensitive projections. Delta cursors/history have a 30-day horizon, and idle reads do not extend a cursor expiry. A false hasMore does not replace later polling for native commits. Apply a complete issued page durably before acknowledgement.

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

contacts:readcontacts:sync

Current contacts:fields:read adds only separately owner-approved/eligible fields; it is optional for basic-only sync.

Request

  • cursorquery · stringRequired
    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 · BusinessCustomerSyncPage

Success.

application/json · BusinessCustomerSyncPage

Exactly one of these variants must match.

  • oneOf 1 · kind = "snapshot"objectSchema branch
    View branch fields and rules
    • kindstringRequired in this branch

      Value: "snapshot"

    • customersarrayRequired in this branch

      maxItems: 100

      View nested fields
      • []oneOf (object | object)Array item

        Exactly one of these variants must match.

        View nested fields
        • oneOf 1 · removed = falseobjectSchema branch

          Current row rehydrated when this page is delivered. fields is present only with current contacts:fields:read scope and contains only currently approved/eligible definitions.

          View branch fields and rules
          • businessCustomerIdstring · uuidRequired in this branch
          • versionstringRequired in this branch

            Database-owned canonical customer revision. Read a current customer and its ETag before a basic or block command. Native and API edits share this revision; no-op writes do not increment it. It is not a customer-mapping version.

            pattern: "^c(0|[1-9][0-9]{0,18})$"

          • displayNamestring | nullRequired in this branch

            maxLength: 4096

          • phonestring | nullRequired in this branch

            pattern: "^\\+[1-9][0-9]{7,14}$"

          • languageanyOf (string | null)Required in this branch

            At least one of these variants must match.

            View nested fields
            • anyOf 1stringSchema branch

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

            • anyOf 2nullSchema branch
          • isBlockedbooleanRequired in this branch
          • createdAtstring · date-timeRequired in this branch
          • fieldUnavailableReasonsobjectRequired in this branch
            View nested fields
            • displayNamestringOptional in this branch

              Allowed values: ["too_large","invalid_stored_value"]

            • phonestringOptional in this branch

              Allowed values: ["too_large","invalid_stored_value"]

            • languagestringOptional in this branch

              Allowed values: ["too_large","invalid_stored_value"]

            • additionalPropertiesno value allowedSchema rule
          • removedbooleanRequired in this branch

            Value: false

          • fieldsarrayOptional in this branch

            maxItems: 50

            View nested fields
            • []object; allOf (unspecified & unspecified & unspecified & unspecified & unspecified & unspecified & unspecified)Array item

              One currently eligible, independently owner-approved Management field. Standard selectors support notes only; custom selectors use the immutable definition UUID. Visibility alone is not approval. No ungranted value or metadata is exposed.

              All of these schema rules apply together.

              View nested fields
              • kindstringRequired in this branch

                Allowed values: ["standard","custom"]

              • keystringRequired in this branch

                Current definition key; control and prototype keys are refused.

                minLength: 1maxLength: 100

              • fieldIdanyOf (string | null)Required in this branch

                At least one of these variants must match.

                View nested fields
                • anyOf 1string · uuidSchema branch
                • anyOf 2nullSchema branch
              • labelobjectRequired in this branch
                View nested fields
                • hestringOptional in this branch

                  minLength: 0maxLength: 200

                • arstringOptional in this branch

                  minLength: 0maxLength: 200

                • enstringOptional in this branch

                  minLength: 0maxLength: 200

                • additionalPropertiesno value allowedSchema rule
              • typestringRequired in this branch

                Allowed values: ["text","textarea","number","date","select","phone","email","boolean","checkbox","multi_select","multiselect"]

              • accessstringRequired in this branch

                Allowed values: ["read","readwrite"]

              • existsbooleanRequired in this branch
              • valueoneOf (string | number | boolean | null | array)Required in this branch

                Exactly one of these variants must match.

                View nested fields
                • oneOf 1stringSchema branch

                  maxLength: 4096

                • oneOf 2numberSchema branch

                  minimum: -9007199254740991maximum: 9007199254740991

                • oneOf 3booleanSchema branch
                • oneOf 4nullSchema branch
                • oneOf 5arraySchema branch

                  maxItems: 100

                  View branch fields and rules
                  • []stringArray item

                    maxLength: 120

              • valueUnavailableReasonnull | stringRequired in this branch

                Allowed values: [null,"invalid_stored_value","too_large"]

              • optionsarrayRequired in this branch

                maxItems: 100

                View nested fields
                • []objectArray item
                  View nested fields
                  • idstringRequired in this branch

                    minLength: 1maxLength: 120

                  • labelobjectRequired in this branch
                    View nested fields
                    • hestringOptional in this branch

                      minLength: 0maxLength: 200

                    • arstringOptional in this branch

                      minLength: 0maxLength: 200

                    • enstringOptional in this branch

                      minLength: 0maxLength: 200

                    • additionalPropertiesno value allowedSchema rule
                  • additionalPropertiesno value allowedSchema rule
              • allOf 1unspecifiedSchema branch
                View branch fields and rules
                • ifobjectSchema rule
                  View branch fields and rules
                  • existsbooleanCondition predicate

                    Value: false

                • thenobjectSchema rule
                  View branch fields and rules
                  • valuenullOptional in this branch

                    Value: null

                  • valueUnavailableReasonnullOptional in this branch

                    Value: null

              • allOf 2unspecifiedSchema branch
                View branch fields and rules
                • ifobjectSchema rule
                  View branch fields and rules
                  • valueUnavailableReasonstringCondition predicate

                    Allowed values: ["invalid_stored_value","too_large"]

                • thenobjectSchema rule
                  View branch fields and rules
                  • valuenullOptional in this branch

                    Value: null

                  • existsbooleanOptional in this branch

                    Value: true

              • allOf 3unspecifiedSchema branch
                View branch fields and rules
                • ifobjectSchema rule
                  View branch fields and rules
                  • typestringCondition predicate

                    Allowed values: ["number"]

                • thenobjectSchema rule
                  View branch fields and rules
                  • valuenumber | nullOptional in this branch
              • allOf 4unspecifiedSchema branch
                View branch fields and rules
                • ifobjectSchema rule
                  View branch fields and rules
                  • typestringCondition predicate

                    Allowed values: ["boolean","checkbox"]

                • thenobjectSchema rule
                  View branch fields and rules
                  • valueboolean | nullOptional in this branch
              • allOf 5unspecifiedSchema branch
                View branch fields and rules
                • ifobjectSchema rule
                  View branch fields and rules
                  • typestringCondition predicate

                    Allowed values: ["multi_select","multiselect"]

                • thenobjectSchema rule
                  View branch fields and rules
                  • valueoneOf (null | array)Optional in this branch

                    Exactly one of these variants must match.

                    View nested fields
                    • oneOf 1nullSchema branch
                    • oneOf 2arraySchema branch

                      maxItems: 100

                      View branch fields and rules
                      • []stringArray item

                        maxLength: 120

              • allOf 6unspecifiedSchema branch
                View branch fields and rules
                • ifobjectSchema rule
                  View branch fields and rules
                  • typestringCondition predicate

                    Allowed values: ["text","textarea","date","select","phone","email"]

                • thenobjectSchema rule
                  View branch fields and rules
                  • valuestring | nullOptional in this branch
              • allOf 7unspecifiedSchema branch
                View branch fields and rules
                • ifobjectSchema rule
                  View branch fields and rules
                  • kindstringCondition predicate

                    Value: "standard"

                • thenobjectSchema rule
                  View branch fields and rules
                  • keystringOptional in this branch

                    Value: "notes"

                  • fieldIdnullOptional in this branch
                  • typestringOptional in this branch

                    Value: "textarea"

                • elseobjectSchema rule
                  View branch fields and rules
                  • fieldIdstring · uuidOptional in this branch
              • additionalPropertiesno value allowedSchema rule
          • additionalPropertiesno value allowedSchema rule
        • oneOf 2 · removed = trueobjectSchema branch

          Snapshot membership whose canonical customer is now deleted or outside this tenant. It contains no field values.

          View branch fields and rules
          • businessCustomerIdstring · uuidRequired in this branch
          • versionstringRequired in this branch

            Database-owned canonical customer revision. Read a current customer and its ETag before a basic or block command. Native and API edits share this revision; no-op writes do not increment it. It is not a customer-mapping version.

            pattern: "^c(0|[1-9][0-9]{0,18})$"

          • removedbooleanRequired in this branch

            Value: true

          • additionalPropertiesno value allowedSchema rule
    • nextCursorstring · uuidRequired in this branch
    • hasMorebooleanRequired in this branch
    • watermarkintegerRequired in this branch

      minimum: 0maximum: 9007199254740991

    • projectionEpochstringRequired in this branch

      pattern: "^[a-f0-9]{64}$"

    • additionalPropertiesno value allowedSchema rule
  • oneOf 2 · kind = "changes"objectSchema branch
    View branch fields and rules
    • kindstringRequired in this branch

      Value: "changes"

    • eventsarrayRequired in this branch

      maxItems: 100

      View nested fields
      • []objectArray item

        Metadata-only published signal. eventId/sequence/signalVersion describe the committed captured change; current is freshly rehydrated and can be newer or null. A removed event always identifies businessCustomerId even when current is null. Own integration sources are explicit; another integration is reported only as other_integration. Native writers are crad_profile. Hidden-only changes are skipped while the cursor still advances. Replay is current-state convergence, not a historical payload or byte-identical event-value promise.

        View nested fields
        • eventIdstring · uuidRequired in this branch
        • businessCustomerIdstring · uuidRequired in this branch
        • sequenceintegerRequired in this branch

          minimum: 1maximum: 9007199254740991

        • signalVersionstringRequired in this branch

          Database-owned canonical customer revision. Read a current customer and its ETag before a basic or block command. Native and API edits share this revision; no-op writes do not increment it. It is not a customer-mapping version.

          pattern: "^c(0|[1-9][0-9]{0,18})$"

        • typestringRequired in this branch

          Allowed values: ["upsert","removed"]

        • changedFieldsarrayRequired in this branch

          maxItems: 10000minItems: 1uniqueItems: true

          View nested fields
          • []stringArray item

            pattern: "^(?:\\*|displayName|phone|language|isBlocked|createdAt|standard:notes|custom:.{1,100})$"

        • sourcestringRequired in this branch

          pattern: "^(?:crad_profile|other_integration|integration:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})$"

        • currentanyOf (object | null)Required in this branch

          At least one of these variants must match.

          View nested fields
          • anyOf 1 · removed = falseobjectSchema branch

            Current row rehydrated when this page is delivered. fields is present only with current contacts:fields:read scope and contains only currently approved/eligible definitions.

            View branch fields and rules
            • businessCustomerIdstring · uuidRequired in this branch
            • versionstringRequired in this branch

              Database-owned canonical customer revision. Read a current customer and its ETag before a basic or block command. Native and API edits share this revision; no-op writes do not increment it. It is not a customer-mapping version.

              pattern: "^c(0|[1-9][0-9]{0,18})$"

            • displayNamestring | nullRequired in this branch

              maxLength: 4096

            • phonestring | nullRequired in this branch

              pattern: "^\\+[1-9][0-9]{7,14}$"

            • languageanyOf (string | null)Required in this branch

              At least one of these variants must match.

              View nested fields
              • anyOf 1stringSchema branch

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

              • anyOf 2nullSchema branch
            • isBlockedbooleanRequired in this branch
            • createdAtstring · date-timeRequired in this branch
            • fieldUnavailableReasonsobjectRequired in this branch
              View nested fields
              • displayNamestringOptional in this branch

                Allowed values: ["too_large","invalid_stored_value"]

              • phonestringOptional in this branch

                Allowed values: ["too_large","invalid_stored_value"]

              • languagestringOptional in this branch

                Allowed values: ["too_large","invalid_stored_value"]

              • additionalPropertiesno value allowedSchema rule
            • removedbooleanRequired in this branch

              Value: false

            • fieldsarrayOptional in this branch

              maxItems: 50

              View nested fields
              • []object; allOf (unspecified & unspecified & unspecified & unspecified & unspecified & unspecified & unspecified)Array item

                One currently eligible, independently owner-approved Management field. Standard selectors support notes only; custom selectors use the immutable definition UUID. Visibility alone is not approval. No ungranted value or metadata is exposed.

                All of these schema rules apply together.

                View nested fields
                • kindstringRequired in this branch

                  Allowed values: ["standard","custom"]

                • keystringRequired in this branch

                  Current definition key; control and prototype keys are refused.

                  minLength: 1maxLength: 100

                • fieldIdanyOf (string | null)Required in this branch

                  At least one of these variants must match.

                  View nested fields
                  • anyOf 1string · uuidSchema branch
                  • anyOf 2nullSchema branch
                • labelobjectRequired in this branch
                  View nested fields
                  • hestringOptional in this branch

                    minLength: 0maxLength: 200

                  • arstringOptional in this branch

                    minLength: 0maxLength: 200

                  • enstringOptional in this branch

                    minLength: 0maxLength: 200

                  • additionalPropertiesno value allowedSchema rule
                • typestringRequired in this branch

                  Allowed values: ["text","textarea","number","date","select","phone","email","boolean","checkbox","multi_select","multiselect"]

                • accessstringRequired in this branch

                  Allowed values: ["read","readwrite"]

                • existsbooleanRequired in this branch
                • valueoneOf (string | number | boolean | null | array)Required in this branch

                  Exactly one of these variants must match.

                  View nested fields
                  • oneOf 1stringSchema branch

                    maxLength: 4096

                  • oneOf 2numberSchema branch

                    minimum: -9007199254740991maximum: 9007199254740991

                  • oneOf 3booleanSchema branch
                  • oneOf 4nullSchema branch
                  • oneOf 5arraySchema branch

                    maxItems: 100

                    View branch fields and rules
                    • []stringArray item

                      maxLength: 120

                • valueUnavailableReasonnull | stringRequired in this branch

                  Allowed values: [null,"invalid_stored_value","too_large"]

                • optionsarrayRequired in this branch

                  maxItems: 100

                  View nested fields
                  • []objectArray item
                    View nested fields
                    • idstringRequired in this branch

                      minLength: 1maxLength: 120

                    • labelobjectRequired in this branch
                      View nested fields
                      • hestringOptional in this branch

                        minLength: 0maxLength: 200

                      • arstringOptional in this branch

                        minLength: 0maxLength: 200

                      • enstringOptional in this branch

                        minLength: 0maxLength: 200

                      • additionalPropertiesno value allowedSchema rule
                    • additionalPropertiesno value allowedSchema rule
                • allOf 1unspecifiedSchema branch
                  View branch fields and rules
                  • ifobjectSchema rule
                    View branch fields and rules
                    • existsbooleanCondition predicate

                      Value: false

                  • thenobjectSchema rule
                    View branch fields and rules
                    • valuenullOptional in this branch

                      Value: null

                    • valueUnavailableReasonnullOptional in this branch

                      Value: null

                • allOf 2unspecifiedSchema branch
                  View branch fields and rules
                  • ifobjectSchema rule
                    View branch fields and rules
                    • valueUnavailableReasonstringCondition predicate

                      Allowed values: ["invalid_stored_value","too_large"]

                  • thenobjectSchema rule
                    View branch fields and rules
                    • valuenullOptional in this branch

                      Value: null

                    • existsbooleanOptional in this branch

                      Value: true

                • allOf 3unspecifiedSchema branch
                  View branch fields and rules
                  • ifobjectSchema rule
                    View branch fields and rules
                    • typestringCondition predicate

                      Allowed values: ["number"]

                  • thenobjectSchema rule
                    View branch fields and rules
                    • valuenumber | nullOptional in this branch
                • allOf 4unspecifiedSchema branch
                  View branch fields and rules
                  • ifobjectSchema rule
                    View branch fields and rules
                    • typestringCondition predicate

                      Allowed values: ["boolean","checkbox"]

                  • thenobjectSchema rule
                    View branch fields and rules
                    • valueboolean | nullOptional in this branch
                • allOf 5unspecifiedSchema branch
                  View branch fields and rules
                  • ifobjectSchema rule
                    View branch fields and rules
                    • typestringCondition predicate

                      Allowed values: ["multi_select","multiselect"]

                  • thenobjectSchema rule
                    View branch fields and rules
                    • valueoneOf (null | array)Optional in this branch

                      Exactly one of these variants must match.

                      View nested fields
                      • oneOf 1nullSchema branch
                      • oneOf 2arraySchema branch

                        maxItems: 100

                        View branch fields and rules
                        • []stringArray item

                          maxLength: 120

                • allOf 6unspecifiedSchema branch
                  View branch fields and rules
                  • ifobjectSchema rule
                    View branch fields and rules
                    • typestringCondition predicate

                      Allowed values: ["text","textarea","date","select","phone","email"]

                  • thenobjectSchema rule
                    View branch fields and rules
                    • valuestring | nullOptional in this branch
                • allOf 7unspecifiedSchema branch
                  View branch fields and rules
                  • ifobjectSchema rule
                    View branch fields and rules
                    • kindstringCondition predicate

                      Value: "standard"

                  • thenobjectSchema rule
                    View branch fields and rules
                    • keystringOptional in this branch

                      Value: "notes"

                    • fieldIdnullOptional in this branch
                    • typestringOptional in this branch

                      Value: "textarea"

                  • elseobjectSchema rule
                    View branch fields and rules
                    • fieldIdstring · uuidOptional in this branch
                • additionalPropertiesno value allowedSchema rule
            • additionalPropertiesno value allowedSchema rule
          • anyOf 2nullSchema branch
        • additionalPropertiesno value allowedSchema rule
    • nextCursorstring · uuidRequired in this branch
    • hasMorebooleanRequired in this branch
    • watermarkintegerRequired in this branch

      minimum: 0maximum: 9007199254740991

    • projectionEpochstringRequired in this branch

      pattern: "^[a-f0-9]{64}$"

    • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "kind": {
          "const": "snapshot"
        },
        "customers": {
          "type": "array",
          "maxItems": 100,
          "items": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "businessCustomerId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "version": {
                    "type": "string",
                    "pattern": "^c(0|[1-9][0-9]{0,18})$",
                    "description": "Database-owned canonical customer revision. Read a current customer and its ETag before a basic or block command. Native and API edits share this revision; no-op writes do not increment it. It is not a customer-mapping version."
                  },
                  "displayName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4096
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\+[1-9][0-9]{7,14}$"
                  },
                  "language": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "he",
                          "ar",
                          "en"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isBlocked": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "fieldUnavailableReasons": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "displayName": {
                        "enum": [
                          "too_large",
                          "invalid_stored_value"
                        ]
                      },
                      "phone": {
                        "enum": [
                          "too_large",
                          "invalid_stored_value"
                        ]
                      },
                      "language": {
                        "enum": [
                          "too_large",
                          "invalid_stored_value"
                        ]
                      }
                    },
                    "required": []
                  },
                  "removed": {
                    "const": false
                  },
                  "fields": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "kind": {
                          "enum": [
                            "standard",
                            "custom"
                          ]
                        },
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "Current definition key; control and prototype keys are refused."
                        },
                        "fieldId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "label": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "he": {
                              "type": "string",
                              "minLength": 0,
                              "maxLength": 200
                            },
                            "ar": {
                              "type": "string",
                              "minLength": 0,
                              "maxLength": 200
                            },
                            "en": {
                              "type": "string",
                              "minLength": 0,
                              "maxLength": 200
                            }
                          },
                          "required": []
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "text",
                            "textarea",
                            "number",
                            "date",
                            "select",
                            "phone",
                            "email",
                            "boolean",
                            "checkbox",
                            "multi_select",
                            "multiselect"
                          ]
                        },
                        "access": {
                          "enum": [
                            "read",
                            "readwrite"
                          ]
                        },
                        "exists": {
                          "type": "boolean"
                        },
                        "value": {
                          "oneOf": [
                            {
                              "type": "string",
                              "maxLength": 4096
                            },
                            {
                              "type": "number",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "array",
                              "maxItems": 100,
                              "items": {
                                "type": "string",
                                "maxLength": 120
                              }
                            }
                          ]
                        },
                        "valueUnavailableReason": {
                          "enum": [
                            null,
                            "invalid_stored_value",
                            "too_large"
                          ]
                        },
                        "options": {
                          "type": "array",
                          "maxItems": 100,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "label": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "he": {
                                    "type": "string",
                                    "minLength": 0,
                                    "maxLength": 200
                                  },
                                  "ar": {
                                    "type": "string",
                                    "minLength": 0,
                                    "maxLength": 200
                                  },
                                  "en": {
                                    "type": "string",
                                    "minLength": 0,
                                    "maxLength": 200
                                  }
                                },
                                "required": []
                              }
                            },
                            "required": [
                              "id",
                              "label"
                            ]
                          }
                        }
                      },
                      "required": [
                        "kind",
                        "key",
                        "fieldId",
                        "label",
                        "type",
                        "access",
                        "exists",
                        "value",
                        "valueUnavailableReason",
                        "options"
                      ],
                      "allOf": [
                        {
                          "if": {
                            "properties": {
                              "exists": {
                                "const": false
                              }
                            },
                            "required": [
                              "exists"
                            ]
                          },
                          "then": {
                            "properties": {
                              "value": {
                                "const": null
                              },
                              "valueUnavailableReason": {
                                "const": null
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "properties": {
                              "valueUnavailableReason": {
                                "enum": [
                                  "invalid_stored_value",
                                  "too_large"
                                ]
                              }
                            },
                            "required": [
                              "valueUnavailableReason"
                            ]
                          },
                          "then": {
                            "properties": {
                              "value": {
                                "const": null
                              },
                              "exists": {
                                "const": true
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "properties": {
                              "type": {
                                "enum": [
                                  "number"
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          "then": {
                            "properties": {
                              "value": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "properties": {
                              "type": {
                                "enum": [
                                  "boolean",
                                  "checkbox"
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          "then": {
                            "properties": {
                              "value": {
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "properties": {
                              "type": {
                                "enum": [
                                  "multi_select",
                                  "multiselect"
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          "then": {
                            "properties": {
                              "value": {
                                "oneOf": [
                                  {
                                    "type": "null"
                                  },
                                  {
                                    "type": "array",
                                    "maxItems": 100,
                                    "items": {
                                      "type": "string",
                                      "maxLength": 120
                                    }
                                  }
                                ]
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "properties": {
                              "type": {
                                "enum": [
                                  "text",
                                  "textarea",
                                  "date",
                                  "select",
                                  "phone",
                                  "email"
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          "then": {
                            "properties": {
                              "value": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "properties": {
                              "kind": {
                                "const": "standard"
                              }
                            },
                            "required": [
                              "kind"
                            ]
                          },
                          "then": {
                            "properties": {
                              "key": {
                                "const": "notes"
                              },
                              "fieldId": {
                                "type": "null"
                              },
                              "type": {
                                "const": "textarea"
                              }
                            }
                          },
                          "else": {
                            "properties": {
                              "fieldId": {
                                "type": "string",
                                "format": "uuid"
                              }
                            }
                          }
                        }
                      ],
                      "description": "One currently eligible, independently owner-approved Management field. Standard selectors support notes only; custom selectors use the immutable definition UUID. Visibility alone is not approval. No ungranted value or metadata is exposed."
                    }
                  }
                },
                "required": [
                  "businessCustomerId",
                  "version",
                  "displayName",
                  "phone",
                  "language",
                  "isBlocked",
                  "createdAt",
                  "fieldUnavailableReasons",
                  "removed"
                ],
                "description": "Current row rehydrated when this page is delivered. fields is present only with current contacts:fields:read scope and contains only currently approved/eligible definitions."
              },
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "businessCustomerId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "version": {
                    "type": "string",
                    "pattern": "^c(0|[1-9][0-9]{0,18})$",
                    "description": "Database-owned canonical customer revision. Read a current customer and its ETag before a basic or block command. Native and API edits share this revision; no-op writes do not increment it. It is not a customer-mapping version."
                  },
                  "removed": {
                    "const": true
                  }
                },
                "required": [
                  "businessCustomerId",
                  "version",
                  "removed"
                ],
                "description": "Snapshot membership whose canonical customer is now deleted or outside this tenant. It contains no field values."
              }
            ]
          }
        },
        "nextCursor": {
          "type": "string",
          "format": "uuid"
        },
        "hasMore": {
          "type": "boolean"
        },
        "watermark": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "projectionEpoch": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "required": [
        "kind",
        "customers",
        "nextCursor",
        "hasMore",
        "watermark",
        "projectionEpoch"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "kind": {
          "const": "changes"
        },
        "events": {
          "type": "array",
          "maxItems": 100,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "eventId": {
                "type": "string",
                "format": "uuid"
              },
              "businessCustomerId": {
                "type": "string",
                "format": "uuid"
              },
              "sequence": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "signalVersion": {
                "type": "string",
                "pattern": "^c(0|[1-9][0-9]{0,18})$",
                "description": "Database-owned canonical customer revision. Read a current customer and its ETag before a basic or block command. Native and API edits share this revision; no-op writes do not increment it. It is not a customer-mapping version."
              },
              "type": {
                "enum": [
                  "upsert",
                  "removed"
                ]
              },
              "changedFields": {
                "type": "array",
                "maxItems": 10000,
                "minItems": 1,
                "items": {
                  "type": "string",
                  "pattern": "^(?:\\*|displayName|phone|language|isBlocked|createdAt|standard:notes|custom:.{1,100})$"
                },
                "uniqueItems": true
              },
              "source": {
                "type": "string",
                "pattern": "^(?:crad_profile|other_integration|integration:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})$"
              },
              "current": {
                "anyOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "businessCustomerId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "version": {
                        "type": "string",
                        "pattern": "^c(0|[1-9][0-9]{0,18})$",
                        "description": "Database-owned canonical customer revision. Read a current customer and its ETag before a basic or block command. Native and API edits share this revision; no-op writes do not increment it. It is not a customer-mapping version."
                      },
                      "displayName": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 4096
                      },
                      "phone": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "pattern": "^\\+[1-9][0-9]{7,14}$"
                      },
                      "language": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "he",
                              "ar",
                              "en"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isBlocked": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "fieldUnavailableReasons": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "displayName": {
                            "enum": [
                              "too_large",
                              "invalid_stored_value"
                            ]
                          },
                          "phone": {
                            "enum": [
                              "too_large",
                              "invalid_stored_value"
                            ]
                          },
                          "language": {
                            "enum": [
                              "too_large",
                              "invalid_stored_value"
                            ]
                          }
                        },
                        "required": []
                      },
                      "removed": {
                        "const": false
                      },
                      "fields": {
                        "type": "array",
                        "maxItems": 50,
                        "items": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "enum": [
                                "standard",
                                "custom"
                              ]
                            },
                            "key": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100,
                              "description": "Current definition key; control and prototype keys are refused."
                            },
                            "fieldId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "label": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "he": {
                                  "type": "string",
                                  "minLength": 0,
                                  "maxLength": 200
                                },
                                "ar": {
                                  "type": "string",
                                  "minLength": 0,
                                  "maxLength": 200
                                },
                                "en": {
                                  "type": "string",
                                  "minLength": 0,
                                  "maxLength": 200
                                }
                              },
                              "required": []
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text",
                                "textarea",
                                "number",
                                "date",
                                "select",
                                "phone",
                                "email",
                                "boolean",
                                "checkbox",
                                "multi_select",
                                "multiselect"
                              ]
                            },
                            "access": {
                              "enum": [
                                "read",
                                "readwrite"
                              ]
                            },
                            "exists": {
                              "type": "boolean"
                            },
                            "value": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "maxLength": 4096
                                },
                                {
                                  "type": "number",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "array",
                                  "maxItems": 100,
                                  "items": {
                                    "type": "string",
                                    "maxLength": 120
                                  }
                                }
                              ]
                            },
                            "valueUnavailableReason": {
                              "enum": [
                                null,
                                "invalid_stored_value",
                                "too_large"
                              ]
                            },
                            "options": {
                              "type": "array",
                              "maxItems": 100,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "label": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "he": {
                                        "type": "string",
                                        "minLength": 0,
                                        "maxLength": 200
                                      },
                                      "ar": {
                                        "type": "string",
                                        "minLength": 0,
                                        "maxLength": 200
                                      },
                                      "en": {
                                        "type": "string",
                                        "minLength": 0,
                                        "maxLength": 200
                                      }
                                    },
                                    "required": []
                                  }
                                },
                                "required": [
                                  "id",
                                  "label"
                                ]
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "key",
                            "fieldId",
                            "label",
                            "type",
                            "access",
                            "exists",
                            "value",
                            "valueUnavailableReason",
                            "options"
                          ],
                          "allOf": [
                            {
                              "if": {
                                "properties": {
                                  "exists": {
                                    "const": false
                                  }
                                },
                                "required": [
                                  "exists"
                                ]
                              },
                              "then": {
                                "properties": {
                                  "value": {
                                    "const": null
                                  },
                                  "valueUnavailableReason": {
                                    "const": null
                                  }
                                }
                              }
                            },
                            {
                              "if": {
                                "properties": {
                                  "valueUnavailableReason": {
                                    "enum": [
                                      "invalid_stored_value",
                                      "too_large"
                                    ]
                                  }
                                },
                                "required": [
                                  "valueUnavailableReason"
                                ]
                              },
                              "then": {
                                "properties": {
                                  "value": {
                                    "const": null
                                  },
                                  "exists": {
                                    "const": true
                                  }
                                }
                              }
                            },
                            {
                              "if": {
                                "properties": {
                                  "type": {
                                    "enum": [
                                      "number"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              "then": {
                                "properties": {
                                  "value": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            },
                            {
                              "if": {
                                "properties": {
                                  "type": {
                                    "enum": [
                                      "boolean",
                                      "checkbox"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              "then": {
                                "properties": {
                                  "value": {
                                    "type": [
                                      "boolean",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            },
                            {
                              "if": {
                                "properties": {
                                  "type": {
                                    "enum": [
                                      "multi_select",
                                      "multiselect"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              "then": {
                                "properties": {
                                  "value": {
                                    "oneOf": [
                                      {
                                        "type": "null"
                                      },
                                      {
                                        "type": "array",
                                        "maxItems": 100,
                                        "items": {
                                          "type": "string",
                                          "maxLength": 120
                                        }
                                      }
                                    ]
                                  }
                                }
                              }
                            },
                            {
                              "if": {
                                "properties": {
                                  "type": {
                                    "enum": [
                                      "text",
                                      "textarea",
                                      "date",
                                      "select",
                                      "phone",
                                      "email"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              "then": {
                                "properties": {
                                  "value": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            },
                            {
                              "if": {
                                "properties": {
                                  "kind": {
                                    "const": "standard"
                                  }
                                },
                                "required": [
                                  "kind"
                                ]
                              },
                              "then": {
                                "properties": {
                                  "key": {
                                    "const": "notes"
                                  },
                                  "fieldId": {
                                    "type": "null"
                                  },
                                  "type": {
                                    "const": "textarea"
                                  }
                                }
                              },
                              "else": {
                                "properties": {
                                  "fieldId": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              }
                            }
                          ],
                          "description": "One currently eligible, independently owner-approved Management field. Standard selectors support notes only; custom selectors use the immutable definition UUID. Visibility alone is not approval. No ungranted value or metadata is exposed."
                        }
                      }
                    },
                    "required": [
                      "businessCustomerId",
                      "version",
                      "displayName",
                      "phone",
                      "language",
                      "isBlocked",
                      "createdAt",
                      "fieldUnavailableReasons",
                      "removed"
                    ],
                    "description": "Current row rehydrated when this page is delivered. fields is present only with current contacts:fields:read scope and contains only currently approved/eligible definitions."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "eventId",
              "businessCustomerId",
              "sequence",
              "signalVersion",
              "type",
              "changedFields",
              "source",
              "current"
            ],
            "description": "Metadata-only published signal. eventId/sequence/signalVersion describe the committed captured change; current is freshly rehydrated and can be newer or null. A removed event always identifies businessCustomerId even when current is null. Own integration sources are explicit; another integration is reported only as other_integration. Native writers are crad_profile. Hidden-only changes are skipped while the cursor still advances. Replay is current-state convergence, not a historical payload or byte-identical event-value promise."
          }
        },
        "nextCursor": {
          "type": "string",
          "format": "uuid"
        },
        "hasMore": {
          "type": "boolean"
        },
        "watermark": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "projectionEpoch": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "required": [
        "kind",
        "events",
        "nextCursor",
        "hasMore",
        "watermark",
        "projectionEpoch"
      ]
    }
  ]
}

Errors and recovery

Error responses declared in the contract (7)

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

401 · Missing or invalid Management bearer.

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 scope, grant or authority denied; browser Origin is refused.

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"
  ]
}
410 · Cursor expired, retained history unavailable or effective projection epoch changed. Bootstrap again.

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 · Malformed or unsupported request; no tenant/resource selector is accepted.

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/snapshot limit reached.

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 · Storage unavailable or outcome uncertain. Retain the original UUID and exact command to reconcile.

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