Skip to main content

Notification Settings


Use the Notification Settings module to configure how users receive appointment updates and service messages.
This screen defines communication preferences at the account level and synchronizes them through the /profile/notifications/settings endpoint.
Integration partners, such as insurance providers, can update these preferences through the API to align Air Doctor notifications with their own apps.


This screen includes:

  • Phone number display: Shows the verified phone number associated with the user account.
  • Contact methods: Lists available channels: WhatsApp, SMS, and Email.
  • Selection checkboxes: Enable users to choose one or more contact methods for receiving updates.
  • Save Changes button: Saves preferences to Air Doctor and confirms the update.
  • Update Details link: Opens the section where users can update phone or email contact details.
  • Validation modal: Displays when no contact method is selected.

Workflow

  1. From the Account or Profile menu, open Notification Settings.

  2. Review or update the contact methods shown.

  3. Select one or more channels to receive appointment updates.

  4. Choose Save Changes to persist preferences.

  5. If no method is selected, the app displays a validation message.

    Validation

    The message “We need at least one contact method to send you updates on your appointment” appears when saving without a selected option.


Validations

When a third-party app (such as an insurer platform) updates user notification preferences, the Air Doctor API enforces several validation rules to ensure consistent and compliant communication behavior.

  • At least one contact method required:
    The request must include at least one valid method (whatsapp, sms, or email).
    The API returns an error if all fields are false or omitted.

  • Contact data validation:
    If a channel is enabled, the corresponding field must exist and pass format validation.

    • email must be RFC 5321 compliant.
    • phoneNumber must include the international country code.
  • SMS restrictions by region:
    The API disables SMS for users whose phone numbers start with country codes +972 (Israel) or +34 (Spain).
    Integrators should avoid enabling SMS for these regions.

  • Opt-out consistency:
    If a user previously opted out of WhatsApp or SMS, those methods appear as disabled in the UI and cannot be re-enabled programmatically.
    Attempting to toggle them through the API will be ignored.

  • Synchronization requirement:
    If an insurer platform updates preferences before linking a user policy, Air Doctor stores them locally and applies them automatically once the account link is completed.

Actions

Third-party developers use this endpoint to synchronize user notification preferences between their platform and Air Doctor.
Each action describes a common integration scenario that ensures consistent communication preferences across systems.

  • Create or update preferences:
    Call the PUT /profile/notifications/settings endpoint to create or update a user’s contact configuration.
    Always include all available methods in the payload, even if some are disabled, to ensure a complete state update.

    Example Request – Update Notification Preferences
      {
    "contactMethods": {
    "whatsapp": true,
    "sms": false,
    "email": true
    },
    "phoneNumber": "+4915123456789",
    "email": "john.doe@example.com"
    }
  • Synchronize insurer defaults: When a user links a policy that already contains preferred contact channels, push those settings to Air Doctor to match the insurer’s defaults. This ensures both platforms send messages using the same communication methods.

  • Apply user-initiated updates: If a user modifies their notification preferences inside the insurer’s app, call this endpoint immediately to synchronize with Air Doctor. Updates take effect instantly for all upcoming appointment notifications.

  • Handle restricted regions: If the API response indicates that SMS is disabled due to a restricted country code (for example, +972 or +34), remove or disable the SMS option on your platform’s interface. Continue supporting WhatsApp and Email as valid contact methods.

  • Process validation responses: When the API returns an error—such as 400 for missing methods or 422 for invalid input—review the payload and correct invalid fields before the client retries the request. The client retains the previous valid state to prevent loss of existing preferences. A 422 response without a body indicates an outdated SDK version. The integrator upgrades the SDK because the server does not support the older version.


Endpoint Resources

🧰 Endpoint Resources under construction