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

Check management access

Check a management key and its current grants without changing business data

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

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

GET/v1/management

בדקו את הקליניקה ואת המפתח בנפרד

השתמשו באותו CRAD_API_KEY שאושר בידי בעל העסק ונשמר רק בשרת. אישור הזמנות, הודעות ללקוחות והנמען לבקשות אישור הם הגדרות נפרדות; הגדרה פעילה אינה הוכחה שאפשר למסור הודעה.

מפתחות יומן עם appointments:read מקבלים תצוגת תאימות ב־GET /v1/management: ארבע הרשאות ניהול התבניות והפרופיל ב־WhatsApp עשויות להיות מושמטות מתשובה זו. ההרשאות עצמן אינן מבוטלות. GET /v1/management/messaging-capabilities כולל את whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read ו־whatsapp-profile:write כשהן מורשות, ואת granted לכל יכולת. הבדילו בין installed, providerSupported, granted ו־ready; הערך ready:null מציין מוכנות לא ידועה. כל פעולה בודקת שוב את ההרשאה.

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

Behavior

To discover date-hours support, send X-CRAD-Capabilities: day-schedule-overrides only on GET /v1/management. Only that exact case-sensitive value requests the optional capabilities.dayScheduleOverrides field; no header or a different value, including a comma-separated list, leaves it omitted. Require true before offering date edits. When absent or false, keep the weekly-hours display read-only and date controls unavailable. The header negotiates metadata only: authentication, scopes, resource grants and date-route authorization remain unchanged.

In the local-unreleased contract, capabilities.ownerSetupContinuation:true requires ownerSetup in the response. Older installations may omit both fields. Its continuationUrl opens the existing CRAD setup screen for the matching business owner to sign in. It contains business context only, not a credential. not_available returns no initial-setup link; missing ownerSetup means support is not advertised. state records initial setup progress, while botActive reports the current bot switch, including a later pause. Opening the link grants no provider access and never activates the bot.

Separately, capabilities.ownerSettingsContinuations:true requires ownerSettings with all four fixed websiteUrl, integrationUrl, deviceUrl and whatsappUrl destinations. Older installations may omit both. These URLs contain business context and, for integration review, the current integration ID; keep the credential on your server. CRAD rechecks the actual current owner and matching business before showing settings. Opening a URL makes no policy change, grant approval, device subscription, WhatsApp reconnection, enrollment or bot activation. whatsappUrl is not gated by ownerSetup.state: not_available; the panel checks the current owner-managed connection mode itself. A lost-secret Check returns metadata only, never the secret; revoking an unusable key is an explicit owner action. Website intake, customer WhatsApp notification and owner booking-alert policies have separate Management APIs and explicit read/write scopes. Their installed capability flags do not grant the current key authority. These owner links remain available for browser permissions, credentials and Meta interaction.

The contract may also include optional limits.maxRemindersPerAppointment, an integer from zero to three. Disclosure requires current appointments:read scope and a valid owner-approved business_manager calendar grant with appointment resources. Other valid management keys retain metadata without this field. Missing means unknown or undisclosed, never zero; zero is an explicit ceiling of zero. This is the business ceiling, not selected reminder times, remaining allowance, a daily quota, engine state or sending readiness. Reading it does not change or activate reminders. Only CRAD super-admin can change the ceiling; this API adds no reminder-policy writes. These source-reviewed fields are not a claim of deployment or delivery.

Authentication

ManagementCredential

Credential rules

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

Any currently valid management credential can inspect its own grants. A contacts:record-only key needs no schedule resource, public intake, customer session or WhatsApp connection. Capabilities describe installed support; scopes and resources separately limit actions. Environment unknown does not attest production readiness. The read consumes request quota and updates last-use telemetry.

Request

  • X-CRAD-Capabilitiesheader · stringOptional

    Optional response capability negotiation. Only the exact case-sensitive value day-schedule-overrides requests capabilities.dayScheduleOverrides. If this header is absent or has any other value, including a comma-separated list, the response omits that field. Other values are ignored, not rejected. This header does not enable routes or grant scopes, resource access or booking permission.

    Format and constraints
    X-CRAD-Capabilities schema
    {
      "type": "string"
    }

Successful responses

200 · ManagementMetadata

Current safe credential-derived metadata

X-Request-Id
X-Request-Id schema
{
  "type": "string",
  "format": "uuid"
}
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · ManagementMetadata

All of these schema rules apply together.

  • contractVersionnumberRequired

    Value: 1

  • environmentstringRequired

    No trusted environment attestation is configured. Not a sandbox/production readiness or provider claim.

    Value: "unknown"

  • credentialIdstring · uuidRequired
  • audiencestringRequired

    Value: "management"

  • siteIdstring · uuidRequired
  • siteStatusstringRequired

    Allowed values: ["draft","enabled","paused"]

  • siteVersionintegerRequired

    minimum: 1

  • integrationIdstring · uuidRequired
  • integrationKindstringRequired

    Allowed values: ["hosted","embed","headless"]

  • integrationStatusstringRequired

    Allowed values: ["draft","enabled","paused"]

  • integrationVersionintegerRequired

    minimum: 1

  • scopesarrayRequired

    minItems: 0maxItems: 61uniqueItems: true

    View nested fields
    • []stringArray item

      Allowed values: ["hours:read","hours:write","blocks:read","blocks:write","blocks:write:any","contacts:record","contacts:read","contacts:write","contacts:block","contacts:sync","contacts:fields:read","contacts:fields:write","appointments:read","appointments:create","appointments:status","appointments:cancel","appointments:reschedule","appointments:sync","appointments:notes:read","booking-policy:read","booking-policy:write","contacts:phone:write","provider-booking-policy:read","provider-booking-policy:write","booking-duration:rewrite","services:read","services:write","website-content:read","website-content:write","providers:read","providers:write","reports:read","provider-logins:write","template-requests:read","template-requests:write","conversations:read","conversations:write","conversations:send","conversations:media:read","website-intake:read","website-intake:write","website-notifications:read","website-notifications:write","owner-alerts:read","owner-alerts:write","whatsapp-connection:read","whatsapp-connection:check","campaigns:read","campaigns:send","reminder-policy:read","reminder-policy:write","reminder-recipients:read","reminder-recipients:write","reminder-delivery:read","services:sync","providers:sync","contacts:segments:read","whatsapp-templates:read","whatsapp-templates:write","whatsapp-profile:read","whatsapp-profile:write"]

  • expiresAtstring | null · date-timeRequired

    Credential expiration time; null means no expiration date. Update older timestamp-only clients before installing a no-expiry credential. Revocation and current authorization still apply.

  • resourcesobjectRequired
    View nested fields
    • providerIdsarrayRequired

      Current provider resource grant IDs, not a promise that a provider is active or presently bookable.

      uniqueItems: true

      View nested fields
      • []string · uuidArray item
    • businessSchedulebooleanRequired
    • appointmentsobjectOptional
      View nested fields
      • credentialIdstring · uuidRequired
      • integrationIdstring · uuidRequired
      • tenantIdstring · uuidRequired
      • grantRevisionintegerRequired

        minimum: 0maximum: 9007199254740991

      • roleCeilingnull | stringRequired

        Allowed values: [null,"business_manager","provider"]

      • providerIdsarrayRequired

        maxItems: 100uniqueItems: true

        View nested fields
        • []string · uuidArray item
      • wholeBusinessbooleanRequired
      • includeUnassignedbooleanRequired
      • notesReadbooleanRequired
      • additionalPropertiesno value allowedSchema rule
    • campaignsobject; allOf (unspecified)Optional

      Explicit campaign-purpose authority; separate from calendar, contacts and general provider grants. Whole-business requires an empty providerIds array. A scoped key selects one active granted provider and appointment customers per campaign. Empty scoped grants confer no campaign access.

      All of these schema rules apply together.

      View nested fields
      • wholeBusinessbooleanRequired
      • providerIdsarrayRequired

        maxItems: 1000uniqueItems: true

        View nested fields
        • []string · uuidArray item
      • allOf 1unspecifiedSchema branch
        View branch fields and rules
        • ifobjectSchema rule
          View branch fields and rules
          • wholeBusinessbooleanCondition predicate

            Value: true

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

            maxItems: 0

      • additionalPropertiesno value allowedSchema rule
    • additionalPropertiesno value allowedSchema rule
  • limitsobjectRequired
    View nested fields
    • credentialRequestsPerMinutenumberRequired

      Management request ceiling, not a remaining balance.

      Value: 120

    • siteRequestsPerMinutenumberRequired

      Shared with other machine/customer requests to this site.

      Value: 2000

    • maxRemindersPerAppointmentintegerOptional

      Current business reminder ceiling, returned only for current appointments:read scope and a valid business_manager appointment-resource grant when reminder settings exist. Omitted for other credentials, missing grants/settings or older producers; omission is unknown or undisclosed, never zero. Zero is an explicit ceiling of zero. This is not the configured schedule, remaining allowance, daily message quota, engine activation or delivery readiness. Raising the ceiling alone adds or revives no reminders; only CRAD super-admin can change it.

      minimum: 0maximum: 3readOnly: true

    • additionalPropertiesno value allowedSchema rule
  • capabilitiesobjectRequired

    Installed management contracts, separate from this credential scope/resource/grant authority, readiness or full admin parity. Optional customer flags preserve compatibility with older metadata producers; missing means unknown/unsupported, never approval.

    View nested fields
    • contactRecordingbooleanRequired

      Value: true

    • schedulesbooleanRequired

      Value: true

    • blocksbooleanRequired

      Value: true

    • customerDirectorybooleanOptional

      Basic canonical directory/detail/lookup support.

    • customerEditingbooleanOptional

      Versioned name/language editing and exact command recovery support.

    • customerBlockingbooleanOptional

      Separately scoped block state commands.

    • customerFieldsbooleanOptional

      Independently owner-approved notes/custom field projection and per-key CAS support.

    • customerSyncbooleanOptional

      Current-state canonical membership/metadata signal sync and durable acknowledgement support.

    • syncWakeupsbooleanOptional
    • appointmentDirectorybooleanOptional

      Installed calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant.

    • appointmentResourcesbooleanOptional

      Installed calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant.

    • appointmentCommandsbooleanOptional

      Installed calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant.

    • appointmentSyncbooleanOptional

      Installed calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant.

    • bookingPolicyReadbooleanOptional
    • bookingPolicyWritebooleanOptional
    • bookingDurationRewritebooleanOptional

      Installed explicit duration-policy rewrite support only; requires current resource write authority and separate booking-duration:rewrite. R1 booking-policy routes still preserve all ends.

    • customerPhoneCorrectionbooleanOptional

      Installed ordinary same-person phone correction. Requires its separate current scope; protected identity migration is not implied.

    • providerBookingPolicyReadbooleanOptional

      Installed provider duration/hour policy support only; requires provider-booking-policy:read and exact current providerIds. No general provider metadata access.

    • providerBookingPolicyWritebooleanOptional

      Installed provider duration/hour policy support only; requires provider-booking-policy:write and exact current providerIds. No general provider metadata access.

    • serviceCatalogueReadbooleanOptional

      Installed whole-business service catalogue support only; separate explicit services:read/write authority required. No provider or calendar grant is implied.

    • serviceCatalogueWritebooleanOptional

      Installed whole-business service catalogue support only; separate explicit services:read/write authority required. No provider or calendar grant is implied.

    • publicContentReadbooleanOptional

      Installed explicit public presentation/service-selection support only; current website-content:read/write scopes remain separate. No activation or messaging authority.

    • publicContentWritebooleanOptional

      Installed explicit public presentation/service-selection support only; current website-content:read/write scopes remain separate. No activation or messaging authority.

    • providersReadbooleanOptional

      Installed existing-provider metadata/activity/assignment support only. Requires current providers:read/write and explicit providerIds; no creation, deletion, login, invitation or schedule authority.

    • providersWritebooleanOptional

      Installed existing-provider metadata/activity/assignment support only. Requires current providers:read/write and explicit providerIds; no creation, deletion, login, invitation or schedule authority.

    • reportsOverviewReadbooleanOptional

      Installed current whole-business overview support only. Requires separately issued reports:read; not monthly reporting, money, provider/calendar authority or activation.

    • providerLoginsWritebooleanOptional

      Installed bounded provider-login support only. The credential still needs provider-logins:write, providers:read and explicit selected provider IDs.

    • ownerSetupContinuationbooleanOptional

      Installed owner handoff/status support only. Does not grant machine writes, initial enrollment, owner identity or activation.

    • templateRequestsReadbooleanOptional

      Installed template-request support, not permission for this key or Meta approval.

    • templateRequestsWritebooleanOptional

      Installed template-request support, not permission for this key or Meta approval.

    • ownerSettingsContinuationsbooleanOptional

      Installed fixed owner-settings navigation support only. No delegated write, owner identity, device permission or current connection readiness is implied.

    • conversationsReadbooleanOptional

      Installed whole-business retained-conversation support only. Requires explicitly issued conversations:read/write, current integration authority and inbox enablement. Provider grants do not narrow this access; sending/media are separate capabilities.

    • conversationsWritebooleanOptional

      Installed whole-business retained-conversation support only. Requires explicitly issued conversations:read/write, current integration authority and inbox enablement. Provider grants do not narrow this access; sending/media are separate capabilities.

    • conversationsSendbooleanOptional

      Installed delegated template browsing, send/upload and pure outcome recovery. Requires explicit conversations:send plus read, inbox enablement and live send conditions.

    • conversationMediaReadbooleanOptional

      Installed authenticated byte proxy. Requires explicit conversations:media:read plus read; old read keys do not gain binary access.

    • websiteIntakeReadbooleanOptional

      Installed support only; current explicit scope is still required.

    • websiteIntakeWritebooleanOptional

      Installed support only; current explicit scope is still required.

    • websiteNotificationsReadbooleanOptional

      Installed support only; current explicit scope is still required.

    • websiteNotificationsWritebooleanOptional

      Installed support only; current explicit scope is still required.

    • ownerAlertsReadbooleanOptional

      Installed support only; current explicit scope is still required.

    • ownerAlertsWritebooleanOptional

      Installed support only; current explicit scope is still required.

    • whatsappConnectionReadbooleanOptional

      Installed connection observation support only. Requires explicit whole-business whatsapp-connection scopes; old keys gain nothing and provider/calendar selections do not narrow it. No OAuth, reconnection, provider writes or activation authority.

    • whatsappConnectionCheckbooleanOptional

      Installed connection observation support only. Requires explicit whole-business whatsapp-connection scopes; old keys gain nothing and provider/calendar selections do not narrow it. No OAuth, reconnection, provider writes or activation authority.

    • campaignsReadbooleanOptional
    • campaignsSendbooleanOptional
    • reminderPolicyReadbooleanOptional
    • reminderPolicyWritebooleanOptional
    • reminderRecipientsReadbooleanOptional
    • reminderRecipientsWritebooleanOptional
    • reminderDeliveryReadbooleanOptional
    • serviceSyncbooleanOptional

      Installed support, independent of this credential’s explicit grants.

    • providerSyncbooleanOptional

      Installed support, independent of this credential’s explicit grants.

    • customerSegmentsReadbooleanOptional

      Installed support, independent of this credential’s explicit grants.

    • reportsMonthlyReadbooleanOptional

      Installed monthly reporting support; reports:read is still required. Not a credential grant.

    • dayScheduleOverridesbooleanOptional

      Installed date-specific hours support, returned only when GET /v1/management receives X-CRAD-Capabilities: day-schedule-overrides with that exact case-sensitive value. The field is omitted without this opt-in or for other header values. Require true before offering date controls; missing or false does not establish support. Negotiation grants no access; writes still require the matching business/provider policy read+write scopes and resource grant.

    • additionalPropertiesno value allowedSchema rule
  • ownerSetupallOf (object; allOf (unspecified & unspecified & unspecified) & unspecified)Optional

    All of these schema rules apply together.

    View nested fields
    • allOf 1object; allOf (unspecified & unspecified & unspecified)Schema branch

      Coarse initial-setup progress for this Management key’s business. The fixed CRAD URL is context only: the actual authorized owner signs in and performs setup. No callback token or machine setup/activation authority. Saved active state can coexist with botActive:false after a later pause. Initial setup is only for platform-enrolled, eligible new businesses; it does not create providers in an existing salon. New businesses are enabled by default; botActive expresses operator intent independently of initial setup readiness.

      All of these schema rules apply together.

      View branch fields and rules
      • statestringRequired

        Allowed values: ["pending","configured","active","not_available"]

      • versioninteger | nullRequired

        minimum: 0

      • botActivebooleanRequired
      • continuationUrlanyOf (string | null)Required

        At least one of these variants must match.

        View nested fields
        • anyOf 1string · uriSchema branch

          pattern: "^https://panel\\.crad\\.ai/auth\\?setupTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$"

        • anyOf 2nullSchema branch
      • allOf 1unspecifiedSchema branch
        View branch fields and rules
        • ifobjectSchema rule
          View branch fields and rules
          • statestringCondition predicate

            Value: "pending"

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

            Value: 0

          • continuationUrlstring · uriOptional in this branch

            pattern: "^https://panel\\.crad\\.ai/auth\\?setupTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$"

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

            Allowed values: ["configured","active"]

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

            minimum: 1

          • continuationUrlstring · uriOptional in this branch

            pattern: "^https://panel\\.crad\\.ai/auth\\?setupTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$"

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

            Value: "not_available"

        • thenobjectSchema rule
          View branch fields and rules
          • versionnullOptional in this branch
          • continuationUrlnullOptional in this branch
      • additionalPropertiesno value allowedSchema rule
    • allOf 2unspecifiedSchema branch

      Optional on older installations. Absence is unknown, not permission to offer initial setup. Refresh this authenticated read when the owner returns from CRAD.

  • ownerSettingsallOf (object & unspecified)Optional

    All of these schema rules apply together.

    View nested fields
    • allOf 1objectSchema branch

      Fixed CRAD owner sign-in links bound to this credential business and, for integration review, this integration. Actual matching owner authorization is required in CRAD. Navigation performs no approval, save, reconnection, enrollment or device registration. No arbitrary return URL, tokens, secrets or proposed grants are accepted. After the owner finishes, refresh authenticated metadata from your backend; there is no automatic success callback.

      View branch fields and rules
      • websiteUrlstring · uriRequired

        Review existing website booking and notification settings. This is not a headless policy API.

        pattern: "^https://panel\\.crad\\.ai/auth\\?ownerTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}&ownerAction=website$"

      • integrationUrlstring · uriRequired

        Review this integration, credentials, field/history sharing and customer transfers. The integration must still appear in the owner authorized current site. Existing credentials cannot approve their own expansion.

        pattern: "^https://panel\\.crad\\.ai/auth\\?ownerTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}&ownerAction=integration&integrationId=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$"

      • deviceUrlstring · uriRequired

        Open personal browser notification settings. Permission and subscription require explicit owner interaction on that device.

        pattern: "^https://panel\\.crad\\.ai/auth\\?ownerTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}&ownerAction=device$"

      • whatsappUrlstring · uriRequired

        Navigation only. CRAD checks the current owner-managed connection mode after sign-in and refuses unsupported legacy businesses without changing their connection. Presence is not connection-mode eligibility, health or readiness; initial-setup eligibility is a separate concern.

        pattern: "^https://panel\\.crad\\.ai/auth\\?ownerTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}&ownerAction=whatsapp$"

      • additionalPropertiesno value allowedSchema rule
    • allOf 2unspecifiedSchema branch

      Optional on older releases. Missing means unknown; use these fixed URLs when present instead of constructing a callback.

  • allOf 1unspecifiedSchema branch
    View branch fields and rules
    • ifunspecifiedSchema rule
      View branch fields and rules
      • ownerSetupunspecifiedCondition predicate

        Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

    • thenobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectOptional in this branch
        View nested fields
        • ownerSetupContinuationbooleanRequired in this branch

          Value: true

  • allOf 2unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectCondition predicate
        View nested fields
        • ownerSetupContinuationbooleanCondition predicate

          Value: true

    • thenunspecifiedSchema rule
      View branch fields and rules
      • ownerSetupunspecifiedRequired in this branch

        Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

  • allOf 3unspecifiedSchema branch
    View branch fields and rules
    • ifunspecifiedSchema rule
      View branch fields and rules
      • ownerSettingsunspecifiedCondition predicate

        Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

    • thenobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectOptional in this branch
        View nested fields
        • ownerSettingsContinuationsbooleanRequired in this branch

          Value: true

  • allOf 4unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectCondition predicate
        View nested fields
        • ownerSettingsContinuationsbooleanCondition predicate

          Value: true

    • thenunspecifiedSchema rule
      View branch fields and rules
      • ownerSettingsunspecifiedRequired in this branch

        Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

  • allOf 5unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectCondition predicate
        View nested fields
        • campaignsReadbooleanCondition predicate

          Value: true

    • thenobjectSchema rule
      View branch fields and rules
      • resourcesunspecifiedOptional in this branch
        View nested fields
        • campaignsunspecifiedRequired in this branch

          Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

  • allOf 6unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • resourcesunspecifiedCondition predicate
        View nested fields
        • campaignsunspecifiedCondition predicate

          Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

    • thenobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectRequired in this branch
        View nested fields
        • campaignsReadbooleanRequired in this branch

          Value: true

  • allOf 7unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectCondition predicate
        View nested fields
        • campaignsSendbooleanCondition predicate

          Value: true

    • thenobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectRequired in this branch
        View nested fields
        • campaignsReadbooleanRequired in this branch

          Value: true

  • allOf 8unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedCondition predicate
        View nested fields
        • containsstringSchema rule

          Value: "campaigns:send"

    • thenobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedOptional in this branch
        View nested fields
        • containsstringSchema rule

          Value: "campaigns:read"

  • allOf 9unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedCondition predicate
        View nested fields
        • containsstringSchema rule

          Value: "campaigns:read"

    • thenobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectRequired in this branch
        View nested fields
        • campaignsReadbooleanRequired in this branch

          Value: true

      • resourcesobjectOptional in this branch
        View nested fields
        • campaignsanyOf (object | object)Required in this branch

          At least one of these variants must match.

          View nested fields
          • anyOf 1 · wholeBusiness = trueobjectSchema branch
            View branch fields and rules
            • wholeBusinessbooleanOptional in this branch

              Value: true

          • anyOf 2objectSchema branch
            View branch fields and rules
            • providerIdsunspecifiedOptional in this branch

              minItems: 1

  • allOf 10unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedCondition predicate
        View nested fields
        • containsstringSchema rule

          Value: "reminder-policy:write"

    • thenobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedOptional in this branch
        View nested fields
        • containsstringSchema rule

          Value: "reminder-policy:read"

  • allOf 11unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedCondition predicate
        View nested fields
        • containsstringSchema rule

          Value: "reminder-recipients:write"

    • thenobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedOptional in this branch
        View nested fields
        • containsstringSchema rule

          Value: "reminder-recipients:read"

  • allOf 12unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedCondition predicate
        View nested fields
        • containsstringSchema rule

          Value: "reminder-delivery:read"

    • thenobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedOptional in this branch
        View nested fields
        • containsstringSchema rule

          Value: "appointments:read"

      • resourcesunspecifiedOptional in this branch
        View nested fields
        • appointmentsunspecifiedRequired in this branch

          Presence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.

  • allOf 13unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectCondition predicate
        View nested fields
        • reminderPolicyWritebooleanCondition predicate

          Value: true

    • thenobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectOptional in this branch
        View nested fields
        • reminderPolicyReadbooleanRequired in this branch

          Value: true

  • allOf 14unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectCondition predicate
        View nested fields
        • reminderRecipientsWritebooleanCondition predicate

          Value: true

    • thenobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectOptional in this branch
        View nested fields
        • reminderRecipientsReadbooleanRequired in this branch

          Value: true

  • allOf 15unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectCondition predicate
        View nested fields
        • serviceSyncbooleanCondition predicate

          Value: true

    • thenobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectOptional in this branch
        View nested fields
        • serviceCatalogueReadbooleanRequired in this branch

          Value: true

  • allOf 16unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectCondition predicate
        View nested fields
        • providerSyncbooleanCondition predicate

          Value: true

    • thenobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectOptional in this branch
        View nested fields
        • providersReadbooleanRequired in this branch

          Value: true

  • allOf 17unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectCondition predicate
        View nested fields
        • customerSegmentsReadbooleanCondition predicate

          Value: true

    • thenobjectSchema rule
      View branch fields and rules
      • capabilitiesobjectOptional in this branch
        View nested fields
        • customerDirectorybooleanRequired in this branch

          Value: true

  • allOf 18unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedCondition predicate
        View nested fields
        • containsstringSchema rule

          Value: "services:sync"

    • thenobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedOptional in this branch
        View nested fields
        • containsstringSchema rule

          Value: "services:read"

  • allOf 19unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedCondition predicate
        View nested fields
        • containsstringSchema rule

          Value: "providers:sync"

    • thenobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedOptional in this branch
        View nested fields
        • containsstringSchema rule

          Value: "providers:read"

      • resourcesobjectOptional in this branch
        View nested fields
        • providerIdsunspecifiedRequired in this branch

          minItems: 1

  • allOf 20unspecifiedSchema branch
    View branch fields and rules
    • ifobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedCondition predicate
        View nested fields
        • containsstringSchema rule

          Value: "contacts:segments:read"

    • thenobjectSchema rule
      View branch fields and rules
      • scopesunspecifiedOptional in this branch
        View nested fields
        • containsstringSchema rule

          Value: "contacts:read"

  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "contractVersion": {
      "const": 1
    },
    "environment": {
      "const": "unknown",
      "description": "No trusted environment attestation is configured. Not a sandbox/production readiness or provider claim."
    },
    "credentialId": {
      "type": "string",
      "format": "uuid"
    },
    "audience": {
      "const": "management"
    },
    "siteId": {
      "type": "string",
      "format": "uuid"
    },
    "siteStatus": {
      "enum": [
        "draft",
        "enabled",
        "paused"
      ]
    },
    "siteVersion": {
      "type": "integer",
      "minimum": 1
    },
    "integrationId": {
      "type": "string",
      "format": "uuid"
    },
    "integrationKind": {
      "enum": [
        "hosted",
        "embed",
        "headless"
      ]
    },
    "integrationStatus": {
      "enum": [
        "draft",
        "enabled",
        "paused"
      ]
    },
    "integrationVersion": {
      "type": "integer",
      "minimum": 1
    },
    "scopes": {
      "type": "array",
      "minItems": 0,
      "maxItems": 61,
      "uniqueItems": true,
      "items": {
        "enum": [
          "hours:read",
          "hours:write",
          "blocks:read",
          "blocks:write",
          "blocks:write:any",
          "contacts:record",
          "contacts:read",
          "contacts:write",
          "contacts:block",
          "contacts:sync",
          "contacts:fields:read",
          "contacts:fields:write",
          "appointments:read",
          "appointments:create",
          "appointments:status",
          "appointments:cancel",
          "appointments:reschedule",
          "appointments:sync",
          "appointments:notes:read",
          "booking-policy:read",
          "booking-policy:write",
          "contacts:phone:write",
          "provider-booking-policy:read",
          "provider-booking-policy:write",
          "booking-duration:rewrite",
          "services:read",
          "services:write",
          "website-content:read",
          "website-content:write",
          "providers:read",
          "providers:write",
          "reports:read",
          "provider-logins:write",
          "template-requests:read",
          "template-requests:write",
          "conversations:read",
          "conversations:write",
          "conversations:send",
          "conversations:media:read",
          "website-intake:read",
          "website-intake:write",
          "website-notifications:read",
          "website-notifications:write",
          "owner-alerts:read",
          "owner-alerts:write",
          "whatsapp-connection:read",
          "whatsapp-connection:check",
          "campaigns:read",
          "campaigns:send",
          "reminder-policy:read",
          "reminder-policy:write",
          "reminder-recipients:read",
          "reminder-recipients:write",
          "reminder-delivery:read",
          "services:sync",
          "providers:sync",
          "contacts:segments:read",
          "whatsapp-templates:read",
          "whatsapp-templates:write",
          "whatsapp-profile:read",
          "whatsapp-profile:write"
        ]
      }
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Credential expiration time; null means no expiration date. Update older timestamp-only clients before installing a no-expiry credential. Revocation and current authorization still apply."
    },
    "resources": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "providerIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "description": "Current provider resource grant IDs, not a promise that a provider is active or presently bookable."
        },
        "businessSchedule": {
          "type": "boolean"
        },
        "appointments": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "credentialId": {
              "type": "string",
              "format": "uuid"
            },
            "integrationId": {
              "type": "string",
              "format": "uuid"
            },
            "tenantId": {
              "type": "string",
              "format": "uuid"
            },
            "grantRevision": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "roleCeiling": {
              "enum": [
                null,
                "business_manager",
                "provider"
              ]
            },
            "providerIds": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 100,
              "uniqueItems": true
            },
            "wholeBusiness": {
              "type": "boolean"
            },
            "includeUnassigned": {
              "type": "boolean"
            },
            "notesRead": {
              "type": "boolean"
            }
          },
          "required": [
            "credentialId",
            "integrationId",
            "tenantId",
            "grantRevision",
            "roleCeiling",
            "providerIds",
            "wholeBusiness",
            "includeUnassigned",
            "notesRead"
          ]
        },
        "campaigns": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "wholeBusiness": {
              "type": "boolean"
            },
            "providerIds": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 1000,
              "uniqueItems": true
            }
          },
          "required": [
            "wholeBusiness",
            "providerIds"
          ],
          "description": "Explicit campaign-purpose authority; separate from calendar, contacts and general provider grants. Whole-business requires an empty providerIds array. A scoped key selects one active granted provider and appointment customers per campaign. Empty scoped grants confer no campaign access.",
          "allOf": [
            {
              "if": {
                "properties": {
                  "wholeBusiness": {
                    "const": true
                  }
                }
              },
              "then": {
                "properties": {
                  "providerIds": {
                    "maxItems": 0
                  }
                }
              }
            }
          ]
        }
      },
      "required": [
        "providerIds",
        "businessSchedule"
      ]
    },
    "limits": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "credentialRequestsPerMinute": {
          "const": 120,
          "description": "Management request ceiling, not a remaining balance."
        },
        "siteRequestsPerMinute": {
          "const": 2000,
          "description": "Shared with other machine/customer requests to this site."
        },
        "maxRemindersPerAppointment": {
          "type": "integer",
          "minimum": 0,
          "maximum": 3,
          "readOnly": true,
          "description": "Current business reminder ceiling, returned only for current appointments:read scope and a valid business_manager appointment-resource grant when reminder settings exist. Omitted for other credentials, missing grants/settings or older producers; omission is unknown or undisclosed, never zero. Zero is an explicit ceiling of zero. This is not the configured schedule, remaining allowance, daily message quota, engine activation or delivery readiness. Raising the ceiling alone adds or revives no reminders; only CRAD super-admin can change it."
        }
      },
      "required": [
        "credentialRequestsPerMinute",
        "siteRequestsPerMinute"
      ]
    },
    "capabilities": {
      "type": "object",
      "additionalProperties": false,
      "description": "Installed management contracts, separate from this credential scope/resource/grant authority, readiness or full admin parity. Optional customer flags preserve compatibility with older metadata producers; missing means unknown/unsupported, never approval.",
      "properties": {
        "contactRecording": {
          "const": true
        },
        "schedules": {
          "const": true
        },
        "blocks": {
          "const": true
        },
        "customerDirectory": {
          "type": "boolean",
          "description": "Basic canonical directory/detail/lookup support."
        },
        "customerEditing": {
          "type": "boolean",
          "description": "Versioned name/language editing and exact command recovery support."
        },
        "customerBlocking": {
          "type": "boolean",
          "description": "Separately scoped block state commands."
        },
        "customerFields": {
          "type": "boolean",
          "description": "Independently owner-approved notes/custom field projection and per-key CAS support."
        },
        "customerSync": {
          "type": "boolean",
          "description": "Current-state canonical membership/metadata signal sync and durable acknowledgement support."
        },
        "syncWakeups": {
          "type": "boolean"
        },
        "appointmentDirectory": {
          "type": "boolean",
          "description": "Installed calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant."
        },
        "appointmentResources": {
          "type": "boolean",
          "description": "Installed calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant."
        },
        "appointmentCommands": {
          "type": "boolean",
          "description": "Installed calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant."
        },
        "appointmentSync": {
          "type": "boolean",
          "description": "Installed calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant."
        },
        "bookingPolicyRead": {
          "type": "boolean"
        },
        "bookingPolicyWrite": {
          "type": "boolean"
        },
        "bookingDurationRewrite": {
          "type": "boolean",
          "description": "Installed explicit duration-policy rewrite support only; requires current resource write authority and separate booking-duration:rewrite. R1 booking-policy routes still preserve all ends."
        },
        "customerPhoneCorrection": {
          "type": "boolean",
          "description": "Installed ordinary same-person phone correction. Requires its separate current scope; protected identity migration is not implied."
        },
        "providerBookingPolicyRead": {
          "type": "boolean",
          "description": "Installed provider duration/hour policy support only; requires provider-booking-policy:read and exact current providerIds. No general provider metadata access."
        },
        "providerBookingPolicyWrite": {
          "type": "boolean",
          "description": "Installed provider duration/hour policy support only; requires provider-booking-policy:write and exact current providerIds. No general provider metadata access."
        },
        "serviceCatalogueRead": {
          "type": "boolean",
          "description": "Installed whole-business service catalogue support only; separate explicit services:read/write authority required. No provider or calendar grant is implied."
        },
        "serviceCatalogueWrite": {
          "type": "boolean",
          "description": "Installed whole-business service catalogue support only; separate explicit services:read/write authority required. No provider or calendar grant is implied."
        },
        "publicContentRead": {
          "type": "boolean",
          "description": "Installed explicit public presentation/service-selection support only; current website-content:read/write scopes remain separate. No activation or messaging authority."
        },
        "publicContentWrite": {
          "type": "boolean",
          "description": "Installed explicit public presentation/service-selection support only; current website-content:read/write scopes remain separate. No activation or messaging authority."
        },
        "providersRead": {
          "type": "boolean",
          "description": "Installed existing-provider metadata/activity/assignment support only. Requires current providers:read/write and explicit providerIds; no creation, deletion, login, invitation or schedule authority."
        },
        "providersWrite": {
          "type": "boolean",
          "description": "Installed existing-provider metadata/activity/assignment support only. Requires current providers:read/write and explicit providerIds; no creation, deletion, login, invitation or schedule authority."
        },
        "reportsOverviewRead": {
          "type": "boolean",
          "description": "Installed current whole-business overview support only. Requires separately issued reports:read; not monthly reporting, money, provider/calendar authority or activation."
        },
        "providerLoginsWrite": {
          "type": "boolean",
          "description": "Installed bounded provider-login support only. The credential still needs provider-logins:write, providers:read and explicit selected provider IDs."
        },
        "ownerSetupContinuation": {
          "type": "boolean",
          "description": "Installed owner handoff/status support only. Does not grant machine writes, initial enrollment, owner identity or activation."
        },
        "templateRequestsRead": {
          "type": "boolean",
          "description": "Installed template-request support, not permission for this key or Meta approval."
        },
        "templateRequestsWrite": {
          "type": "boolean",
          "description": "Installed template-request support, not permission for this key or Meta approval."
        },
        "ownerSettingsContinuations": {
          "type": "boolean",
          "description": "Installed fixed owner-settings navigation support only. No delegated write, owner identity, device permission or current connection readiness is implied."
        },
        "conversationsRead": {
          "type": "boolean",
          "description": "Installed whole-business retained-conversation support only. Requires explicitly issued conversations:read/write, current integration authority and inbox enablement. Provider grants do not narrow this access; sending/media are separate capabilities."
        },
        "conversationsWrite": {
          "type": "boolean",
          "description": "Installed whole-business retained-conversation support only. Requires explicitly issued conversations:read/write, current integration authority and inbox enablement. Provider grants do not narrow this access; sending/media are separate capabilities."
        },
        "conversationsSend": {
          "type": "boolean",
          "description": "Installed delegated template browsing, send/upload and pure outcome recovery. Requires explicit conversations:send plus read, inbox enablement and live send conditions."
        },
        "conversationMediaRead": {
          "type": "boolean",
          "description": "Installed authenticated byte proxy. Requires explicit conversations:media:read plus read; old read keys do not gain binary access."
        },
        "websiteIntakeRead": {
          "type": "boolean",
          "description": "Installed support only; current explicit scope is still required."
        },
        "websiteIntakeWrite": {
          "type": "boolean",
          "description": "Installed support only; current explicit scope is still required."
        },
        "websiteNotificationsRead": {
          "type": "boolean",
          "description": "Installed support only; current explicit scope is still required."
        },
        "websiteNotificationsWrite": {
          "type": "boolean",
          "description": "Installed support only; current explicit scope is still required."
        },
        "ownerAlertsRead": {
          "type": "boolean",
          "description": "Installed support only; current explicit scope is still required."
        },
        "ownerAlertsWrite": {
          "type": "boolean",
          "description": "Installed support only; current explicit scope is still required."
        },
        "whatsappConnectionRead": {
          "type": "boolean",
          "description": "Installed connection observation support only. Requires explicit whole-business whatsapp-connection scopes; old keys gain nothing and provider/calendar selections do not narrow it. No OAuth, reconnection, provider writes or activation authority."
        },
        "whatsappConnectionCheck": {
          "type": "boolean",
          "description": "Installed connection observation support only. Requires explicit whole-business whatsapp-connection scopes; old keys gain nothing and provider/calendar selections do not narrow it. No OAuth, reconnection, provider writes or activation authority."
        },
        "campaignsRead": {
          "type": "boolean"
        },
        "campaignsSend": {
          "type": "boolean"
        },
        "reminderPolicyRead": {
          "type": "boolean"
        },
        "reminderPolicyWrite": {
          "type": "boolean"
        },
        "reminderRecipientsRead": {
          "type": "boolean"
        },
        "reminderRecipientsWrite": {
          "type": "boolean"
        },
        "reminderDeliveryRead": {
          "type": "boolean"
        },
        "serviceSync": {
          "type": "boolean",
          "description": "Installed support, independent of this credential’s explicit grants."
        },
        "providerSync": {
          "type": "boolean",
          "description": "Installed support, independent of this credential’s explicit grants."
        },
        "customerSegmentsRead": {
          "type": "boolean",
          "description": "Installed support, independent of this credential’s explicit grants."
        },
        "reportsMonthlyRead": {
          "type": "boolean",
          "description": "Installed monthly reporting support; reports:read is still required. Not a credential grant."
        },
        "dayScheduleOverrides": {
          "type": "boolean",
          "description": "Installed date-specific hours support, returned only when GET /v1/management receives X-CRAD-Capabilities: day-schedule-overrides with that exact case-sensitive value. The field is omitted without this opt-in or for other header values. Require true before offering date controls; missing or false does not establish support. Negotiation grants no access; writes still require the matching business/provider policy read+write scopes and resource grant."
        }
      },
      "required": [
        "contactRecording",
        "schedules",
        "blocks"
      ]
    },
    "ownerSetup": {
      "allOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "state",
            "version",
            "botActive",
            "continuationUrl"
          ],
          "description": "Coarse initial-setup progress for this Management key’s business. The fixed CRAD URL is context only: the actual authorized owner signs in and performs setup. No callback token or machine setup/activation authority. Saved active state can coexist with botActive:false after a later pause. Initial setup is only for platform-enrolled, eligible new businesses; it does not create providers in an existing salon. New businesses are enabled by default; botActive expresses operator intent independently of initial setup readiness.",
          "properties": {
            "state": {
              "type": "string",
              "enum": [
                "pending",
                "configured",
                "active",
                "not_available"
              ]
            },
            "version": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0
            },
            "botActive": {
              "type": "boolean"
            },
            "continuationUrl": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uri",
                  "pattern": "^https://panel\\.crad\\.ai/auth\\?setupTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "allOf": [
            {
              "if": {
                "properties": {
                  "state": {
                    "const": "pending"
                  }
                }
              },
              "then": {
                "properties": {
                  "version": {
                    "const": 0
                  },
                  "continuationUrl": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https://panel\\.crad\\.ai/auth\\?setupTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$"
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "state": {
                    "enum": [
                      "configured",
                      "active"
                    ]
                  }
                }
              },
              "then": {
                "properties": {
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "continuationUrl": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https://panel\\.crad\\.ai/auth\\?setupTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$"
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "state": {
                    "const": "not_available"
                  }
                }
              },
              "then": {
                "properties": {
                  "version": {
                    "type": "null"
                  },
                  "continuationUrl": {
                    "type": "null"
                  }
                }
              }
            }
          ]
        },
        {
          "description": "Optional on older installations. Absence is unknown, not permission to offer initial setup. Refresh this authenticated read when the owner returns from CRAD."
        }
      ]
    },
    "ownerSettings": {
      "allOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "websiteUrl",
            "integrationUrl",
            "deviceUrl",
            "whatsappUrl"
          ],
          "description": "Fixed CRAD owner sign-in links bound to this credential business and, for integration review, this integration. Actual matching owner authorization is required in CRAD. Navigation performs no approval, save, reconnection, enrollment or device registration. No arbitrary return URL, tokens, secrets or proposed grants are accepted. After the owner finishes, refresh authenticated metadata from your backend; there is no automatic success callback.",
          "properties": {
            "websiteUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://panel\\.crad\\.ai/auth\\?ownerTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}&ownerAction=website$",
              "description": "Review existing website booking and notification settings. This is not a headless policy API."
            },
            "integrationUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://panel\\.crad\\.ai/auth\\?ownerTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}&ownerAction=integration&integrationId=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$",
              "description": "Review this integration, credentials, field/history sharing and customer transfers. The integration must still appear in the owner authorized current site. Existing credentials cannot approve their own expansion."
            },
            "deviceUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://panel\\.crad\\.ai/auth\\?ownerTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}&ownerAction=device$",
              "description": "Open personal browser notification settings. Permission and subscription require explicit owner interaction on that device."
            },
            "whatsappUrl": {
              "description": "Navigation only. CRAD checks the current owner-managed connection mode after sign-in and refuses unsupported legacy businesses without changing their connection. Presence is not connection-mode eligibility, health or readiness; initial-setup eligibility is a separate concern.",
              "type": "string",
              "format": "uri",
              "pattern": "^https://panel\\.crad\\.ai/auth\\?ownerTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}&ownerAction=whatsapp$"
            }
          }
        },
        {
          "description": "Optional on older releases. Missing means unknown; use these fixed URLs when present instead of constructing a callback."
        }
      ]
    }
  },
  "required": [
    "contractVersion",
    "environment",
    "credentialId",
    "audience",
    "siteId",
    "siteStatus",
    "siteVersion",
    "integrationId",
    "integrationKind",
    "integrationStatus",
    "integrationVersion",
    "scopes",
    "expiresAt",
    "resources",
    "limits",
    "capabilities"
  ],
  "allOf": [
    {
      "if": {
        "required": [
          "ownerSetup"
        ]
      },
      "then": {
        "properties": {
          "capabilities": {
            "required": [
              "ownerSetupContinuation"
            ],
            "properties": {
              "ownerSetupContinuation": {
                "const": true
              }
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "capabilities": {
            "required": [
              "ownerSetupContinuation"
            ],
            "properties": {
              "ownerSetupContinuation": {
                "const": true
              }
            }
          }
        },
        "required": [
          "capabilities"
        ]
      },
      "then": {
        "required": [
          "ownerSetup"
        ]
      }
    },
    {
      "if": {
        "required": [
          "ownerSettings"
        ]
      },
      "then": {
        "properties": {
          "capabilities": {
            "required": [
              "ownerSettingsContinuations"
            ],
            "properties": {
              "ownerSettingsContinuations": {
                "const": true
              }
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "capabilities": {
            "required": [
              "ownerSettingsContinuations"
            ],
            "properties": {
              "ownerSettingsContinuations": {
                "const": true
              }
            }
          }
        },
        "required": [
          "capabilities"
        ]
      },
      "then": {
        "required": [
          "ownerSettings"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "capabilities": {
            "required": [
              "campaignsRead"
            ],
            "properties": {
              "campaignsRead": {
                "const": true
              }
            }
          }
        },
        "required": [
          "capabilities"
        ]
      },
      "then": {
        "properties": {
          "resources": {
            "required": [
              "campaigns"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "resources": {
            "required": [
              "campaigns"
            ]
          }
        },
        "required": [
          "resources"
        ]
      },
      "then": {
        "properties": {
          "capabilities": {
            "required": [
              "campaignsRead"
            ],
            "properties": {
              "campaignsRead": {
                "const": true
              }
            }
          }
        },
        "required": [
          "capabilities"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "capabilities": {
            "required": [
              "campaignsSend"
            ],
            "properties": {
              "campaignsSend": {
                "const": true
              }
            }
          }
        }
      },
      "then": {
        "properties": {
          "capabilities": {
            "required": [
              "campaignsRead"
            ],
            "properties": {
              "campaignsRead": {
                "const": true
              }
            }
          }
        },
        "required": [
          "capabilities"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "campaigns:send"
            }
          }
        }
      },
      "then": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "campaigns:read"
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "campaigns:read"
            }
          }
        }
      },
      "then": {
        "properties": {
          "capabilities": {
            "required": [
              "campaignsRead"
            ],
            "properties": {
              "campaignsRead": {
                "const": true
              }
            }
          },
          "resources": {
            "required": [
              "campaigns"
            ],
            "properties": {
              "campaigns": {
                "anyOf": [
                  {
                    "properties": {
                      "wholeBusiness": {
                        "const": true
                      }
                    }
                  },
                  {
                    "properties": {
                      "providerIds": {
                        "minItems": 1
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "required": [
          "capabilities"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "reminder-policy:write"
            }
          }
        },
        "required": [
          "scopes"
        ]
      },
      "then": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "reminder-policy:read"
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "reminder-recipients:write"
            }
          }
        },
        "required": [
          "scopes"
        ]
      },
      "then": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "reminder-recipients:read"
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "reminder-delivery:read"
            }
          }
        },
        "required": [
          "scopes"
        ]
      },
      "then": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "appointments:read"
            }
          },
          "resources": {
            "required": [
              "appointments"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "capabilities": {
            "properties": {
              "reminderPolicyWrite": {
                "const": true
              }
            },
            "required": [
              "reminderPolicyWrite"
            ]
          }
        },
        "required": [
          "capabilities"
        ]
      },
      "then": {
        "properties": {
          "capabilities": {
            "properties": {
              "reminderPolicyRead": {
                "const": true
              }
            },
            "required": [
              "reminderPolicyRead"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "capabilities": {
            "properties": {
              "reminderRecipientsWrite": {
                "const": true
              }
            },
            "required": [
              "reminderRecipientsWrite"
            ]
          }
        },
        "required": [
          "capabilities"
        ]
      },
      "then": {
        "properties": {
          "capabilities": {
            "properties": {
              "reminderRecipientsRead": {
                "const": true
              }
            },
            "required": [
              "reminderRecipientsRead"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "capabilities": {
            "properties": {
              "serviceSync": {
                "const": true
              }
            },
            "required": [
              "serviceSync"
            ]
          }
        },
        "required": [
          "capabilities"
        ]
      },
      "then": {
        "properties": {
          "capabilities": {
            "properties": {
              "serviceCatalogueRead": {
                "const": true
              }
            },
            "required": [
              "serviceCatalogueRead"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "capabilities": {
            "properties": {
              "providerSync": {
                "const": true
              }
            },
            "required": [
              "providerSync"
            ]
          }
        },
        "required": [
          "capabilities"
        ]
      },
      "then": {
        "properties": {
          "capabilities": {
            "properties": {
              "providersRead": {
                "const": true
              }
            },
            "required": [
              "providersRead"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "capabilities": {
            "properties": {
              "customerSegmentsRead": {
                "const": true
              }
            },
            "required": [
              "customerSegmentsRead"
            ]
          }
        },
        "required": [
          "capabilities"
        ]
      },
      "then": {
        "properties": {
          "capabilities": {
            "properties": {
              "customerDirectory": {
                "const": true
              }
            },
            "required": [
              "customerDirectory"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "services:sync"
            }
          }
        },
        "required": [
          "scopes"
        ]
      },
      "then": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "services:read"
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "providers:sync"
            }
          }
        },
        "required": [
          "scopes"
        ]
      },
      "then": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "providers:read"
            }
          },
          "resources": {
            "properties": {
              "providerIds": {
                "minItems": 1
              }
            },
            "required": [
              "providerIds"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "contacts:segments:read"
            }
          }
        },
        "required": [
          "scopes"
        ]
      },
      "then": {
        "properties": {
          "scopes": {
            "contains": {
              "const": "contacts:read"
            }
          }
        }
      }
    }
  ]
}

Errors and recovery

Error responses declared in the contract (6)

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

401 · Missing/malformed management credential or integration-audience key
X-Request-Id
X-Request-Id schema
{
  "type": "string",
  "format": "uuid"
}
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

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

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
403 · Browser Origin, revoked/expired credential or current authority refused
X-Request-Id
X-Request-Id schema
{
  "type": "string",
  "format": "uuid"
}
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

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

      minimum: 1

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

application/json · Error

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

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
422 · Unrecognized query parameters
X-Request-Id
X-Request-Id schema
{
  "type": "string",
  "format": "uuid"
}
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

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

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
429 · Bounded machine/site request quota
Retry-After
Retry-After schema
{
  "type": "integer",
  "minimum": 1
}

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 · Unavailable or uncertain server metadata
X-Request-Id
X-Request-Id schema
{
  "type": "string",
  "format": "uuid"
}
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

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

      minimum: 1

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