> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wealthyhood.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get notification settings

> Retrieve all notification settings for a user, organized by category (app and email notifications).



## OpenAPI

````yaml GET /b2b/notification-settings
openapi: 3.0.3
info:
  title: Wealthyhood Notification Settings API
  version: 1.0.0
  description: >
    B2B API endpoints for managing user notification settings. These endpoints
    allow B2B clients to read and update

    notification preferences for their users.


    All requests require a bearer access token with the advertised scopes, and
    must include the `x-user-id` header

    to identify the user whose notification settings are being accessed or
    modified.


    **Key Features:**

    - Read all notification settings for a user (app and email notifications
    grouped by category)

    - Update individual notification settings by setting ID

    - Device-level notification permissions are handled by B2B clients (not
    exposed via API)


    **Localisation:**

    Category names, notification names, and descriptions are localised based on
    the user's language preference

    (stored in the user profile). The same endpoint returns different text for
    users with different languages.

    Examples in this documentation use English values.
servers:
  - url: https://{host}
    variables:
      host:
        default: api.wealthyhood.com
        description: Wealthyhood API host name.
security:
  - bearerAuth: []
tags:
  - name: Notification Settings
    description: Manage user notification preferences for app and email notifications.
paths:
  /b2b/notification-settings:
    get:
      tags:
        - Notification Settings
      summary: Get notification settings
      description: >
        Returns all notification settings for the authenticated user, organized
        by category. The response includes

        both app and email notification settings, grouped into categories such
        as Activity, Market insights,

        Offers, and Newsletters.


        **Localisation:** The `category`, `name`, and `description` fields are
        localised based on the user's

        language preference. Different users receive different text for the same
        notification setting.


        **Note:** Notification settings are created automatically when a B2B
        user is created, so this endpoint

        will always return a complete notification settings object (never
        empty). If notification settings are

        missing, this indicates an unexpected state and will result in a 500
        Internal Server Error.


        **Response Structure:**

        - `app`: Array of app notification categories (optional, but always
        present in practice)

        - `email`: Array of email notification categories (optional, but always
        present in practice)

        - Each category contains a `category` name and an array of
        `notifications`

        - Each notification includes `id`, `name`, `description`, and `active`
        status
      parameters:
        - $ref: '#/components/parameters/ExternalUserId'
      responses:
        '200':
          description: Notification settings retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationSettingsResponse'
              examples:
                fullSettings:
                  summary: >-
                    Complete notification settings with app and email (English
                    example)
                  value:
                    app:
                      - category: Activity
                        notifications:
                          - id: app_transactional
                            name: Transactional notifications
                            description: Buys, sells, deposits, dividends, etc
                            active: true
                      - category: Market insights
                        notifications:
                          - id: app_learning_guide
                            name: Learning guides
                            description: Updates for new educational guides
                            active: true
                          - id: app_analyst_insight
                            name: Analysis
                            description: Investment ideas, research, insights
                            active: false
                          - id: app_quick_take
                            name: Quick takes
                            description: Bit-sized insights to start your day
                            active: true
                          - id: app_daily_recap
                            name: Morning Update
                            description: Portfolio summary & news digest
                            active: true
                          - id: app_weekly_review
                            name: Weekly reviews
                            description: A weekly summary of market news
                            active: false
                      - category: Offers
                        notifications:
                          - id: app_promotional
                            name: Promos & special offers
                            description: Free shares, rewards & gifts
                            active: false
                    email:
                      - category: Activity
                        notifications:
                          - id: email_transactional
                            name: Transactional emails
                            description: Updates on your account & activity
                            active: true
                      - category: Newsletters
                        notifications:
                          - id: email_wealthybites
                            name: Wealthybites
                            description: >-
                              Weekly summary of your portfolio, news &
                              highlights
                            active: true
                      - category: Offers
                        notifications:
                          - id: email_promotional
                            name: Promos & special offers
                            description: Free shares, rewards & gifts
                            active: false
                appOnly:
                  summary: Settings with only app notifications (English example)
                  value:
                    app:
                      - category: Activity
                        notifications:
                          - id: app_transactional
                            name: Transactional notifications
                            description: Buys, sells, deposits, dividends, etc
                            active: false
        '400':
          description: |
            Bad Request. This can occur when:
            1. Missing x-user-id header
            2. Invalid x-user-id format (not a valid MongoDB ObjectId)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              examples:
                missingHeader:
                  summary: Missing x-user-id header
                  value:
                    status: 400
                    error:
                      description: x-user-id header is required
                    responseId: 3f0fd3bf-a2ff-4c0e-9b1d-5d7055dbf6cd
                invalidObjectId:
                  summary: Invalid x-user-id format
                  value:
                    status: 400
                    error:
                      description: x-user-id must be a valid MongoDB ObjectId
                    responseId: 3f0fd3bf-a2ff-4c0e-9b1d-5d7055dbf6cd
        '401':
          description: >
            Unauthorized. This can occur in two scenarios:

            1. Missing or invalid bearer token (handled globally by
            AuthMiddleware)

            2. User not found - The user specified in the `x-user-id` header
            does not exist or does not have the NBG partnerId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              examples:
                invalidToken:
                  summary: Invalid or missing bearer token
                  value:
                    status: 401
                    error:
                      message: Unauthorized - Invalid or missing authentication token
                    responseId: 145f2b0d-1d5b-4e91-8d0d-7af0ae9ad13a
                userNotFound:
                  summary: User not found
                  value:
                    status: 401
                    error:
                      message: invalid_token
                      description: User not found
                    responseId: 3f0fd3bf-a2ff-4c0e-9b1d-5d7055dbf6cd
        '500':
          description: >
            Internal server error. This occurs when notification settings
            document is missing (unexpected state).

            Note: Notification settings are created automatically during user
            creation, so a missing document indicates an unexpected state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              examples:
                settingsNotFound:
                  summary: Notification settings not found (unexpected state)
                  value:
                    status: 500
                    error:
                      description: Internal Error
                    responseId: 3f0fd3bf-a2ff-4c0e-9b1d-5d7055dbf6cd
components:
  parameters:
    ExternalUserId:
      name: x-user-id
      in: header
      required: true
      description: >-
        MongoDB identifier of the user whose notification settings are being
        accessed or modified.
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
        example: 507f1f77bcf86cd799439011
  schemas:
    NotificationSettingsResponse:
      type: object
      description: >
        Complete notification settings for a user, organized by notification
        type (app/email) and category.

        Both `app` and `email` are optional in the schema for flexibility, but
        in practice they will always

        be present since notification settings are created during user creation.

        Category names, notification names, and descriptions are localised based
        on the user's language preference.
      properties:
        app:
          type: array
          description: Array of app notification categories
          items:
            $ref: '#/components/schemas/AppNotificationCategory'
        email:
          type: array
          description: Array of email notification categories
          items:
            $ref: '#/components/schemas/EmailNotificationCategory'
      additionalProperties: false
    ApiErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
        error:
          type: object
          properties:
            message:
              type: string
              description: Error message
            description:
              type: string
              description: Additional error details
              nullable: true
        responseId:
          type: string
          format: uuid
          description: Unique identifier for this error response
      additionalProperties: false
    AppNotificationCategory:
      type: object
      required:
        - category
        - notifications
      properties:
        category:
          type: string
          description: >-
            Localised category name for grouping related app notifications
            (e.g., "Activity", "Market insights", "Offers")
          example: Activity
        notifications:
          type: array
          description: Array of app notification settings in this category
          items:
            $ref: '#/components/schemas/AppNotificationSetting'
      additionalProperties: false
    EmailNotificationCategory:
      type: object
      required:
        - category
        - notifications
      properties:
        category:
          type: string
          description: >-
            Localised category name for grouping related email notifications
            (e.g., "Activity", "Newsletters", "Offers")
          example: Activity
        notifications:
          type: array
          description: Array of email notification settings in this category
          items:
            $ref: '#/components/schemas/EmailNotificationSetting'
      additionalProperties: false
    AppNotificationSetting:
      type: object
      required:
        - id
        - name
        - description
        - active
      properties:
        id:
          type: string
          enum:
            - app_transactional
            - app_learning_guide
            - app_analyst_insight
            - app_quick_take
            - app_weekly_review
            - app_daily_recap
            - app_promotional
          description: Unique identifier for the app notification setting
          example: app_transactional
        name:
          type: string
          description: >-
            Localised human-readable name of the notification setting (based on
            user's language preference)
          example: Transactional notifications
        description:
          type: string
          description: >-
            Localised description of what this notification setting controls
            (based on user's language preference)
          example: Buys, sells, deposits, dividends, etc
        active:
          type: boolean
          description: Whether this notification setting is currently enabled
          example: true
      additionalProperties: false
    EmailNotificationSetting:
      type: object
      required:
        - id
        - name
        - description
        - active
      properties:
        id:
          type: string
          enum:
            - email_transactional
            - email_promotional
            - email_wealthybites
          description: Unique identifier for the email notification setting
          example: email_transactional
        name:
          type: string
          description: >-
            Localised human-readable name of the notification setting (based on
            user's language preference)
          example: Transactional emails
        description:
          type: string
          description: >-
            Localised description of what this notification setting controls
            (based on user's language preference)
          example: Updates on your account & activity
        active:
          type: boolean
          description: Whether this notification setting is currently enabled
          example: true
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Auth0-issued access token that includes the scopes listed for the
        endpoint.

````