/v1/managementتحقّقوا من العيادة والمفتاح بشكل منفصل
استخدموا نفس CRAD_API_KEY المعتمد من صاحب النشاط والمحفوظ على الخادم فقط. الموافقة على الحجوزات ورسائل العملاء ومستلم طلبات الموافقة إعدادات منفصلة؛ تفعيل الإعداد لا يثبت إمكانية تسليم الرسالة.
تحصل مفاتيح التقويم التي تتضمن appointments:read على عرض توافق في GET /v1/management: قد تُحذف صلاحيات إدارة قوالب واتساب وملفه الأربع من هذه الاستجابة. لا يلغي ذلك الصلاحيات الفعلية. يعرض 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 · stringOptionalOptional 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
{ "type": "string" }
Successful responses
200 · ManagementMetadata
Current safe credential-derived metadata
X-Request-Id
{
"type": "string",
"format": "uuid"
} Cache-Control
{
"const": "no-store"
} application/json · ManagementMetadata
All of these schema rules apply together.
-
contractVersionnumberRequiredValue:
1 -
environmentstringRequiredNo trusted environment attestation is configured. Not a sandbox/production readiness or provider claim.
Value:
"unknown" -
credentialIdstring · uuidRequired -
audiencestringRequiredValue:
"management" -
siteIdstring · uuidRequired -
siteStatusstringRequiredAllowed values:
["draft","enabled","paused"] -
siteVersionintegerRequiredminimum:1 -
integrationIdstring · uuidRequired -
integrationKindstringRequiredAllowed values:
["hosted","embed","headless"] -
integrationStatusstringRequiredAllowed values:
["draft","enabled","paused"] -
integrationVersionintegerRequiredminimum:1 -
scopesarrayRequiredminItems:0maxItems:61uniqueItems:trueView nested fields
-
[]stringArray itemAllowed 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-timeRequiredCredential expiration time; null means no expiration date. Update older timestamp-only clients before installing a no-expiry credential. Revocation and current authorization still apply.
-
resourcesobjectRequiredView nested fields
-
providerIdsarrayRequiredCurrent provider resource grant IDs, not a promise that a provider is active or presently bookable.
uniqueItems:trueView nested fields
-
[]string · uuidArray item
-
-
businessSchedulebooleanRequired -
appointmentsobjectOptionalView nested fields
-
credentialIdstring · uuidRequired -
integrationIdstring · uuidRequired -
tenantIdstring · uuidRequired -
grantRevisionintegerRequiredminimum:0maximum:9007199254740991 -
roleCeilingnull | stringRequiredAllowed values:
[null,"business_manager","provider"] -
providerIdsarrayRequiredmaxItems:100uniqueItems:trueView nested fields
-
[]string · uuidArray item
-
-
wholeBusinessbooleanRequired -
includeUnassignedbooleanRequired -
notesReadbooleanRequired -
additionalPropertiesno value allowedSchema rule
-
-
campaignsobject; allOf (unspecified)OptionalExplicit 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 -
providerIdsarrayRequiredmaxItems:1000uniqueItems:trueView nested fields
-
[]string · uuidArray item
-
-
allOf 1unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
wholeBusinessbooleanCondition predicateValue:
true
-
-
thenobjectSchema ruleView branch fields and rules
-
providerIdsunspecifiedOptional in this branchmaxItems:0
-
-
-
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
-
-
limitsobjectRequiredView nested fields
-
credentialRequestsPerMinutenumberRequiredManagement request ceiling, not a remaining balance.
Value:
120 -
siteRequestsPerMinutenumberRequiredShared with other machine/customer requests to this site.
Value:
2000 -
maxRemindersPerAppointmentintegerOptionalCurrent 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
-
-
capabilitiesobjectRequiredInstalled 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
-
contactRecordingbooleanRequiredValue:
true -
schedulesbooleanRequiredValue:
true -
blocksbooleanRequiredValue:
true -
customerDirectorybooleanOptionalBasic canonical directory/detail/lookup support.
-
customerEditingbooleanOptionalVersioned name/language editing and exact command recovery support.
-
customerBlockingbooleanOptionalSeparately scoped block state commands.
-
customerFieldsbooleanOptionalIndependently owner-approved notes/custom field projection and per-key CAS support.
-
customerSyncbooleanOptionalCurrent-state canonical membership/metadata signal sync and durable acknowledgement support.
-
syncWakeupsbooleanOptional -
appointmentDirectorybooleanOptionalInstalled calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant.
-
appointmentResourcesbooleanOptionalInstalled calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant.
-
appointmentCommandsbooleanOptionalInstalled calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant.
-
appointmentSyncbooleanOptionalInstalled calendar contract support, not permission. Requires the relevant scope and a separately approved current per-credential calendar grant.
-
bookingPolicyReadbooleanOptional -
bookingPolicyWritebooleanOptional -
bookingDurationRewritebooleanOptionalInstalled explicit duration-policy rewrite support only; requires current resource write authority and separate booking-duration:rewrite. R1 booking-policy routes still preserve all ends.
-
customerPhoneCorrectionbooleanOptionalInstalled ordinary same-person phone correction. Requires its separate current scope; protected identity migration is not implied.
-
providerBookingPolicyReadbooleanOptionalInstalled provider duration/hour policy support only; requires provider-booking-policy:read and exact current providerIds. No general provider metadata access.
-
providerBookingPolicyWritebooleanOptionalInstalled provider duration/hour policy support only; requires provider-booking-policy:write and exact current providerIds. No general provider metadata access.
-
serviceCatalogueReadbooleanOptionalInstalled whole-business service catalogue support only; separate explicit services:read/write authority required. No provider or calendar grant is implied.
-
serviceCatalogueWritebooleanOptionalInstalled whole-business service catalogue support only; separate explicit services:read/write authority required. No provider or calendar grant is implied.
-
publicContentReadbooleanOptionalInstalled explicit public presentation/service-selection support only; current website-content:read/write scopes remain separate. No activation or messaging authority.
-
publicContentWritebooleanOptionalInstalled explicit public presentation/service-selection support only; current website-content:read/write scopes remain separate. No activation or messaging authority.
-
providersReadbooleanOptionalInstalled existing-provider metadata/activity/assignment support only. Requires current providers:read/write and explicit providerIds; no creation, deletion, login, invitation or schedule authority.
-
providersWritebooleanOptionalInstalled existing-provider metadata/activity/assignment support only. Requires current providers:read/write and explicit providerIds; no creation, deletion, login, invitation or schedule authority.
-
reportsOverviewReadbooleanOptionalInstalled current whole-business overview support only. Requires separately issued reports:read; not monthly reporting, money, provider/calendar authority or activation.
-
providerLoginsWritebooleanOptionalInstalled bounded provider-login support only. The credential still needs provider-logins:write, providers:read and explicit selected provider IDs.
-
ownerSetupContinuationbooleanOptionalInstalled owner handoff/status support only. Does not grant machine writes, initial enrollment, owner identity or activation.
-
templateRequestsReadbooleanOptionalInstalled template-request support, not permission for this key or Meta approval.
-
templateRequestsWritebooleanOptionalInstalled template-request support, not permission for this key or Meta approval.
-
ownerSettingsContinuationsbooleanOptionalInstalled fixed owner-settings navigation support only. No delegated write, owner identity, device permission or current connection readiness is implied.
-
conversationsReadbooleanOptionalInstalled 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.
-
conversationsWritebooleanOptionalInstalled 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.
-
conversationsSendbooleanOptionalInstalled delegated template browsing, send/upload and pure outcome recovery. Requires explicit conversations:send plus read, inbox enablement and live send conditions.
-
conversationMediaReadbooleanOptionalInstalled authenticated byte proxy. Requires explicit conversations:media:read plus read; old read keys do not gain binary access.
-
websiteIntakeReadbooleanOptionalInstalled support only; current explicit scope is still required.
-
websiteIntakeWritebooleanOptionalInstalled support only; current explicit scope is still required.
-
websiteNotificationsReadbooleanOptionalInstalled support only; current explicit scope is still required.
-
websiteNotificationsWritebooleanOptionalInstalled support only; current explicit scope is still required.
-
ownerAlertsReadbooleanOptionalInstalled support only; current explicit scope is still required.
-
ownerAlertsWritebooleanOptionalInstalled support only; current explicit scope is still required.
-
whatsappConnectionReadbooleanOptionalInstalled 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.
-
whatsappConnectionCheckbooleanOptionalInstalled 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 -
serviceSyncbooleanOptionalInstalled support, independent of this credential’s explicit grants.
-
providerSyncbooleanOptionalInstalled support, independent of this credential’s explicit grants.
-
customerSegmentsReadbooleanOptionalInstalled support, independent of this credential’s explicit grants.
-
reportsMonthlyReadbooleanOptionalInstalled monthly reporting support; reports:read is still required. Not a credential grant.
-
dayScheduleOverridesbooleanOptionalInstalled 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)OptionalAll of these schema rules apply together.
View nested fields
-
allOf 1object; allOf (unspecified & unspecified & unspecified)Schema branchCoarse 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
-
statestringRequiredAllowed values:
["pending","configured","active","not_available"] -
versioninteger | nullRequiredminimum:0 -
botActivebooleanRequired -
continuationUrlanyOf (string | null)RequiredAt least one of these variants must match.
View nested fields
-
anyOf 1string · uriSchema branchpattern:"^https://panel\\.crad\\.ai/auth\\?setupTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$" -
anyOf 2nullSchema branch
-
-
allOf 1unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
statestringCondition predicateValue:
"pending"
-
-
thenobjectSchema ruleView branch fields and rules
-
versionnumberOptional in this branchValue:
0 -
continuationUrlstring · uriOptional in this branchpattern:"^https://panel\\.crad\\.ai/auth\\?setupTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$"
-
-
-
allOf 2unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
statestringCondition predicateAllowed values:
["configured","active"]
-
-
thenobjectSchema ruleView branch fields and rules
-
versionintegerOptional in this branchminimum:1 -
continuationUrlstring · uriOptional in this branchpattern:"^https://panel\\.crad\\.ai/auth\\?setupTenant=[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$"
-
-
-
allOf 3unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
statestringCondition predicateValue:
"not_available"
-
-
thenobjectSchema ruleView branch fields and rules
-
versionnullOptional in this branch -
continuationUrlnullOptional in this branch
-
-
-
additionalPropertiesno value allowedSchema rule
-
-
allOf 2unspecifiedSchema branchOptional 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)OptionalAll of these schema rules apply together.
View nested fields
-
allOf 1objectSchema branchFixed 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 · uriRequiredReview 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 · uriRequiredReview 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 · uriRequiredOpen 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 · uriRequiredNavigation 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 branchOptional on older releases. Missing means unknown; use these fixed URLs when present instead of constructing a callback.
-
-
allOf 1unspecifiedSchema branchView branch fields and rules
-
ifunspecifiedSchema ruleView branch fields and rules
-
ownerSetupunspecifiedCondition predicatePresence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.
-
-
thenobjectSchema ruleView branch fields and rules
-
capabilitiesobjectOptional in this branchView nested fields
-
ownerSetupContinuationbooleanRequired in this branchValue:
true
-
-
-
-
allOf 2unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
capabilitiesobjectCondition predicateView nested fields
-
ownerSetupContinuationbooleanCondition predicateValue:
true
-
-
-
thenunspecifiedSchema ruleView branch fields and rules
-
ownerSetupunspecifiedRequired in this branchPresence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.
-
-
-
allOf 3unspecifiedSchema branchView branch fields and rules
-
ifunspecifiedSchema ruleView branch fields and rules
-
ownerSettingsunspecifiedCondition predicatePresence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.
-
-
thenobjectSchema ruleView branch fields and rules
-
capabilitiesobjectOptional in this branchView nested fields
-
ownerSettingsContinuationsbooleanRequired in this branchValue:
true
-
-
-
-
allOf 4unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
capabilitiesobjectCondition predicateView nested fields
-
ownerSettingsContinuationsbooleanCondition predicateValue:
true
-
-
-
thenunspecifiedSchema ruleView branch fields and rules
-
ownerSettingsunspecifiedRequired in this branchPresence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.
-
-
-
allOf 5unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
capabilitiesobjectCondition predicateView nested fields
-
campaignsReadbooleanCondition predicateValue:
true
-
-
-
thenobjectSchema ruleView branch fields and rules
-
resourcesunspecifiedOptional in this branchView nested fields
-
campaignsunspecifiedRequired in this branchPresence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.
-
-
-
-
allOf 6unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
resourcesunspecifiedCondition predicateView nested fields
-
campaignsunspecifiedCondition predicatePresence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.
-
-
-
thenobjectSchema ruleView branch fields and rules
-
capabilitiesobjectRequired in this branchView nested fields
-
campaignsReadbooleanRequired in this branchValue:
true
-
-
-
-
allOf 7unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
capabilitiesobjectCondition predicateView nested fields
-
campaignsSendbooleanCondition predicateValue:
true
-
-
-
thenobjectSchema ruleView branch fields and rules
-
capabilitiesobjectRequired in this branchView nested fields
-
campaignsReadbooleanRequired in this branchValue:
true
-
-
-
-
allOf 8unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
scopesunspecifiedCondition predicateView nested fields
-
containsstringSchema ruleValue:
"campaigns:send"
-
-
-
thenobjectSchema ruleView branch fields and rules
-
scopesunspecifiedOptional in this branchView nested fields
-
containsstringSchema ruleValue:
"campaigns:read"
-
-
-
-
allOf 9unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
scopesunspecifiedCondition predicateView nested fields
-
containsstringSchema ruleValue:
"campaigns:read"
-
-
-
thenobjectSchema ruleView branch fields and rules
-
capabilitiesobjectRequired in this branchView nested fields
-
campaignsReadbooleanRequired in this branchValue:
true
-
-
resourcesobjectOptional in this branchView nested fields
-
campaignsanyOf (object | object)Required in this branchAt least one of these variants must match.
View nested fields
-
anyOf 1 · wholeBusiness = trueobjectSchema branchView branch fields and rules
-
wholeBusinessbooleanOptional in this branchValue:
true
-
-
anyOf 2objectSchema branchView branch fields and rules
-
providerIdsunspecifiedOptional in this branchminItems:1
-
-
-
-
-
-
allOf 10unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
scopesunspecifiedCondition predicateView nested fields
-
containsstringSchema ruleValue:
"reminder-policy:write"
-
-
-
thenobjectSchema ruleView branch fields and rules
-
scopesunspecifiedOptional in this branchView nested fields
-
containsstringSchema ruleValue:
"reminder-policy:read"
-
-
-
-
allOf 11unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
scopesunspecifiedCondition predicateView nested fields
-
containsstringSchema ruleValue:
"reminder-recipients:write"
-
-
-
thenobjectSchema ruleView branch fields and rules
-
scopesunspecifiedOptional in this branchView nested fields
-
containsstringSchema ruleValue:
"reminder-recipients:read"
-
-
-
-
allOf 12unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
scopesunspecifiedCondition predicateView nested fields
-
containsstringSchema ruleValue:
"reminder-delivery:read"
-
-
-
thenobjectSchema ruleView branch fields and rules
-
scopesunspecifiedOptional in this branchView nested fields
-
containsstringSchema ruleValue:
"appointments:read"
-
-
resourcesunspecifiedOptional in this branchView nested fields
-
appointmentsunspecifiedRequired in this branchPresence constraint in this rule; evaluate its enclosing condition or negation. The field’s type may be defined elsewhere.
-
-
-
-
allOf 13unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
capabilitiesobjectCondition predicateView nested fields
-
reminderPolicyWritebooleanCondition predicateValue:
true
-
-
-
thenobjectSchema ruleView branch fields and rules
-
capabilitiesobjectOptional in this branchView nested fields
-
reminderPolicyReadbooleanRequired in this branchValue:
true
-
-
-
-
allOf 14unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
capabilitiesobjectCondition predicateView nested fields
-
reminderRecipientsWritebooleanCondition predicateValue:
true
-
-
-
thenobjectSchema ruleView branch fields and rules
-
capabilitiesobjectOptional in this branchView nested fields
-
reminderRecipientsReadbooleanRequired in this branchValue:
true
-
-
-
-
allOf 15unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
capabilitiesobjectCondition predicateView nested fields
-
serviceSyncbooleanCondition predicateValue:
true
-
-
-
thenobjectSchema ruleView branch fields and rules
-
capabilitiesobjectOptional in this branchView nested fields
-
serviceCatalogueReadbooleanRequired in this branchValue:
true
-
-
-
-
allOf 16unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
capabilitiesobjectCondition predicateView nested fields
-
providerSyncbooleanCondition predicateValue:
true
-
-
-
thenobjectSchema ruleView branch fields and rules
-
capabilitiesobjectOptional in this branchView nested fields
-
providersReadbooleanRequired in this branchValue:
true
-
-
-
-
allOf 17unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
capabilitiesobjectCondition predicateView nested fields
-
customerSegmentsReadbooleanCondition predicateValue:
true
-
-
-
thenobjectSchema ruleView branch fields and rules
-
capabilitiesobjectOptional in this branchView nested fields
-
customerDirectorybooleanRequired in this branchValue:
true
-
-
-
-
allOf 18unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
scopesunspecifiedCondition predicateView nested fields
-
containsstringSchema ruleValue:
"services:sync"
-
-
-
thenobjectSchema ruleView branch fields and rules
-
scopesunspecifiedOptional in this branchView nested fields
-
containsstringSchema ruleValue:
"services:read"
-
-
-
-
allOf 19unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
scopesunspecifiedCondition predicateView nested fields
-
containsstringSchema ruleValue:
"providers:sync"
-
-
-
thenobjectSchema ruleView branch fields and rules
-
scopesunspecifiedOptional in this branchView nested fields
-
containsstringSchema ruleValue:
"providers:read"
-
-
resourcesobjectOptional in this branchView nested fields
-
providerIdsunspecifiedRequired in this branchminItems:1
-
-
-
-
allOf 20unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
scopesunspecifiedCondition predicateView nested fields
-
containsstringSchema ruleValue:
"contacts:segments:read"
-
-
-
thenobjectSchema ruleView branch fields and rules
-
scopesunspecifiedOptional in this branchView nested fields
-
containsstringSchema ruleValue:
"contacts:read"
-
-
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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
{
"type": "string",
"format": "uuid"
} Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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
{
"type": "string",
"format": "uuid"
} Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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
{
"type": "string",
"format": "uuid"
} Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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
{
"type": "string",
"format": "uuid"
} Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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
{
"type": "integer",
"minimum": 1
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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
{
"type": "string",
"format": "uuid"
} Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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"
]
}