# Next-gen MyWork REST APIs (subset: app config, broadcasts, user notes, recent tabs).
# Paths under Pulse DispatcherServlet /MYWORK/service/mywork/v1/...
openapi: 3.0.3
info:
  title: TM Next-Gen — MyWork
  description: |
    OpenAPI for MyWork APIs: application config, broadcasts, per-user calendar notes, and recent tabs (`mywork/v1/...`).

    Same server base URL as task execution and legacy specs: `/MYWORK/service/`.

    **Authentication:** All endpoints require the `X-reflexis-csrf-token-X` header.

    Companion specs: `task-execution/next-gen-task-execution-api.yaml` (remaining task execution endpoints),
    `walk-execution/next-gen-walk-execution-api.yaml` (walk execution).
  version: 1.0.0
  contact:
    name: API Support
    email: noreply@zebra.com

servers:
  - url: /MYWORK/service/
    description: Application context + Pulse servlet (typical deployment)
  - url: https://fs3.reflexisinc.com/MYWORK/service/
    description: Example development host
  - url: http://localhost:3001/MYWORK/service/
    description: Local CORS proxy — npm run cors-proxy; path must include /MYWORK/service/

tags:
  - name: MyWorkAppConfig
    description: Application-level configuration (modules, holidays, translations, quick-links)
  - name: MyWorkBroadcasts
    description: Broadcast messages and private broadcast notes
  - name: MyWorkNotes
    description: Per-user calendar notes
  - name: MyWorkRecentTabs
    description: Recently opened navigation tabs

security:
  - AuthTokenHeader: []

components:
  securitySchemes:
    AuthTokenHeader:
      type: apiKey
      in: header
      name: X-reflexis-csrf-token-X
      description: Session authentication token validated server-side against the user session store.

  parameters:
    BroadcastId:
      name: broadcast_id
      in: path
      required: true
      schema:
        type: integer
      description: Unique broadcast message identifier

  schemas:
    JsonObject:
      type: object
      additionalProperties: true
      description: JSON object (structure varies by endpoint).
    JsonResponse:
      type: object
      additionalProperties: true
      description: Typical wrapper with status/response keys (snake_case in many payloads).
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum: [ER]
          description: Always "ER" for error responses
        errorCode:
          type: string
          description: Application-level error code (e.g. E202, E105, E404)
        response:
          type: string
          description: Human-readable error message
      required: [status, errorCode, response]
      example:
        status: ER
        errorCode: E202
        response: User session is invalid

  responses:
    Unauthorized:
      description: Missing or invalid X-reflexis-csrf-token-X session token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: ER
            errorCode: E202
            response: User session is invalid
    BadRequest:
      description: Invalid or missing request parameter
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: No data found (returned as HTTP 200 with status=ER)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: ER
            errorCode: E404
            response: No data found
    InternalServerError:
      description: Unexpected server-side error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: ER
            errorCode: E302
            response: Internal server error

paths:
  # ---------------------------------------------------------------------------
  # MyWork — application-level config (/mywork/v1/app-config)
  # ---------------------------------------------------------------------------
  /mywork/v1/app-config:
    get:
      tags: [MyWorkAppConfig]
      summary: Get application-level configuration (modules, holidays, translations, quick-links)
      operationId: getAppConfig
      description: |
        Returns one or more application configuration domains merged under `app_config` in one call.
        `config_type` selects which domains to include; omit it (or pass `all`) to receive all types.
        `config_type` matching is **case-insensitive**. Partially invalid comma-separated lists → E204.

        **Authentication:** `domainId`, `authToken`, and `langCode` are always resolved from the
        validated session. These cannot be overridden by the client.

        ---

        ## Valid Config Types

        | Value | Description | Replaces Legacy Endpoint |
        |---|---|---|
        | `modules` | Licensed modules with landing page and sequencing | `POST /service/module/getModules` |
        | `module_list` | Simplified list: `domain_id`, `module_id`, `module_name` | `POST /service/module/getModuleList` |
        | `modules_menu` | Full menu hierarchy for a module (requires `module_id`) | `POST /service/module/getModuleMenus` |
        | `module_service` | Specific menu item (requires `module_id` + `menu_id`) | `POST /service/module/callModuleService` |
        | `holidays` | Holiday + restricted days for a date range (requires `start_date` + `end_date`) | `POST /service/rtm/getHolidayInformation` |
        | `translations` | Full resource bundle for user locale | `POST /service/appConfig/translation` |
        | `quick_links` | Employee help / quick-link configs | `POST /service/empHelp/getConfigs` |
        | `all` | All seven types merged (default when param is omitted) | — |

        ---

        ## Response Structure by Config Type

        **`modules`** → `{module_arr[], module_seq, landing_page}`
        Each `module_arr[*]` item: `product_id`, `product_name`, `name`, `description`, `base_url`,
        `build_version`, `version`, `product_no`, `has_mobile_app`, `enable_user_view`,
        `do_cache_module`, `mobile_app_store_url`, `mobile_app_play_store_url`,
        `mobile_app_url_scheme`, `logout_url`.

        **`module_list`** → Array of `{domain_id, module_id, module_name}`.

        **`modules_menu`** → Array of menu objects. Each item: `menu_id`, `display_label`,
        `module_id`, `page_id`, `seq_no`, `function_id`, `relative_web_url`, `web_url`,
        `icon_url`, `relative_icon_url`, `expose_as_how_do_i` (Boolean), `preferred` (Boolean),
        `sub_menus[]` (recursive — same structure).

        **`module_service`** → Single menu item object matching `menu_id` within the module
        hierarchy. Same fields as `modules_menu` items. Nested under `{status, response: {...}}`.

        **`holidays`** → `{holidays[], restricted_days[]}`.
        Each item: `date` (MM/dd/yyyy), `reason` (String).

        **`translations`** → Flat key-value map of resource bundle IDs to translated strings,
        e.g. `{"10000001": "Dashboard", "10000002": "Settings"}`. Empty object `{}` when none.

        **`quick_links`** → `{emp_help_configs[], module_configs[]}`.
        Each `emp_help_configs[*]`: `config_id`, `product_id`, `module_id`, `message_text`
        (URL-encoded), `action_type`, `how_flag`, `profile_id`, `seq_no`, `mobility_handler`,
        `user_config` (present for EXTERNAL links).
        Each `module_configs[*]`: same shape as `modules_menu` item.

        ---

        ## Error Scenarios

        | Scenario | HTTP | Error Code | Message |
        |---|---|---|---|
        | Missing / invalid `X-reflexis-csrf-token-X` | 401 | `E202` | `User session is invalid` |
        | Unknown `config_type` token (partial too) | 400 | `E204` | `Invalid app config type. Valid values: modules, module_list, ...` |
        | Missing `module_id` for `modules_menu`/`module_service` | 400 | `E130` | `module_id is required for this config type` |
        | Missing `menu_id` for `module_service` | 400 | `E131` | `menu_id is required for this config type` |
        | Missing `start_date` or `end_date` for `holidays` | 400 | `E132` | `start_date and end_date are required for holidays` |
        | Unexpected server-side error | 500 | `E302` | `Internal server error` |

        ## Error Codes Reference

        | Code | Description |
        |---|---|
        | `E130` | `module_id` is required |
        | `E131` | `menu_id` is required |
        | `E132` | `start_date` and `end_date` are required |
        | `E202` | User session is invalid |
        | `E204` | Invalid app config type |
        | `E302` | Internal server error |
      parameters:
        - name: config_type
          in: query
          required: false
          schema:
            type: string
            default: all
            enum: [modules, module_list, modules_menu, module_service, holidays, translations, quick_links, all]
          description: |
            **Default:** `all`
            Case-insensitive. Accepted values: `modules`, `module_list`, `modules_menu`,
            `module_service`, `holidays`, `translations`, `quick_links`, `all`, or any
            **comma-separated combination** (e.g. `modules,translations`).
            Any unrecognised token in the list → HTTP 400 E204.
        - name: module_id
          in: query
          required: false
          schema:
            type: string
          description: |
            **Required when** `config_type` includes `modules_menu` or `module_service` (→ E130).
            The module product identifier (e.g. `RSP`, `ORG`, `RTM20`).
        - name: menu_id
          in: query
          required: false
          schema:
            type: string
          description: |
            **Required when** `config_type` includes `module_service` (→ E131).
            The specific menu item identifier within the module hierarchy.
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            example: 01/01/2026
          description: |
            **Required when** `config_type` includes `holidays` (→ E132). Format: `MM/dd/yyyy`.
            Both `start_date` and `end_date` must be supplied together.
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            example: 12/31/2026
          description: |
            **Required when** `config_type` includes `holidays` (→ E132). Format: `MM/dd/yyyy`.
            Both `start_date` and `end_date` must be supplied together.
        - name: product_id
          in: query
          required: false
          schema:
            type: string
            default: PULSE
          description: |
            **Default:** `PULSE`. Applies to `quick_links` config type only.
            Filters quick-link configs by product. When `product_id=PULSE`, also returns
            `module_configs[]` (module-level "How Do I" items). Other values return only
            `emp_help_configs[]`.
      responses:
        '200':
          description: |
            Success — `{status: OK, app_config: {...}}`.
            The `app_config` object contains only the keys matching the requested `config_type`.
            When `config_type=all` or omitted, all seven type keys are present.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonObject'
              example:
                status: OK
                app_config:
                  modules:
                    module_arr:
                      - product_id: RSP
                        product_name: Incoming
                        name: Incoming
                        base_url: https://fs3.reflexisinc.com/MYWORK
                        build_version: 17.0.R6_6
                        has_mobile_app: "false"
                        enable_user_view: "Y"
                        do_cache_module: "true"
                    module_seq: RSP,RTM20,MWSWA
                    landing_page:
                      default_menu_id: FEED
                  module_list:
                    - domain_id: 170010099
                      module_id: RSP
                      module_name: Incoming
                  holidays:
                    holidays:
                      - date: 07/04/2026
                        reason: Independence Day
                    restricted_days: []
        '400':
          description: |
            **E204** — Invalid app config type.
            **E130** — module_id required for modules_menu/module_service.
            **E131** — menu_id required for module_service.
            **E132** — start_date and end_date required for holidays.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: ER
                errorCode: E204
                response: "Invalid app config type. Valid values: modules, module_list, modules_menu, module_service, holidays, translations, quick_links"
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'

  # ---------------------------------------------------------------------------
  # MyWork — broadcasts
  # ---------------------------------------------------------------------------
  /mywork/v1/broadcasts/list:
    get:
      tags: [MyWorkBroadcasts]
      summary: List active broadcast messages for the user's domain
      operationId: getBroadcastMessageList
      description: |
        Retrieves active broadcast messages for the authenticated user's domain.
        Domain filtering is automatically applied from the session.
        Returns `broadcast_msg_list[]`. No data → `NO_DATA_FOUND` error (not an empty array).

        ## Response Fields

        | Field | Type | Description |
        |---|---|---|
        | `broadcast_msg_list[]` | Array | List of active broadcast message objects |
        | `broadcast_msg_list[*].broadcast_msg_title` | String | Title / subject of the broadcast |
        | `broadcast_msg_list[*].broadcast_id` | Integer | Unique broadcast identifier |
        | `broadcast_msg_list[*].broadcast_msg_desc` | String | JSON string with additional details including file info: `{"fileName":"...", "fileKey":...}` |
        | `status` | String | `OK` for success |

        ## Error Scenarios

        | Scenario | HTTP | Error Code | Message |
        |---|---|---|---|
        | Missing / invalid `X-reflexis-csrf-token-X` | 401 | `E202` | `User session is invalid` |
        | No broadcast messages found | 200 | `NO_DATA_FOUND` | `No data found` |
        | Unexpected server-side error | 500 | `E500` | `Unexpected server error.` |

        ## Error Codes Reference

        | Code | Description |
        |---|---|
        | `E202` | User session is invalid |
        | `E500` | Unexpected server error |
        | `NO_DATA_FOUND` | No data available |
      responses:
        '200':
          description: Success — `broadcast_msg_list` array or NO_DATA_FOUND error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonObject'
              example:
                status: OK
                broadcast_msg_list:
                  - broadcast_msg_title: Test
                    broadcast_id: 135239
                    broadcast_msg_desc: '{"fileName":"135239_NOTES_en_US.htm","fileKey":135239}'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'

  /mywork/v1/broadcasts/{broadcast_id}/notes:
    get:
      tags: [MyWorkBroadcasts]
      summary: Get private broadcast notes HTML content
      operationId: getPrivateBroadcastNotes
      description: |
        Retrieves private broadcast notes (HTML content) for a specific broadcast message.
        Notes are language-specific HTML files with the naming pattern:
        `{broadcast_id}_NOTES_{langCode}.htm` (e.g. `135239_NOTES_en_US.htm`).
        `broadcastType` is automatically set to `PRIVATE` for security filtering.
        File path validation prevents directory traversal attacks.

        ## Path Parameters

        | Parameter | Type | Required | Description |
        |---|---|---|---|
        | `broadcast_id` | Integer | Yes | Unique broadcast identifier (→ E105 if invalid) |

        ## Response Fields

        | Field | Type | Description |
        |---|---|---|
        | `notes` | String | HTML content of the private broadcast notes |
        | `status` | String | `OK` for success |

        ## Error Scenarios

        | Scenario | HTTP | Error Code | Message |
        |---|---|---|---|
        | Missing / invalid `X-reflexis-csrf-token-X` | 401 | `E202` | `User session is invalid` |
        | Invalid `broadcast_id` | 400 | `E105` | `Invalid broadcast ID provided` |
        | No notes found for broadcast | 200 | `NO_DATA_FOUND` | `No data found` |
        | File read / access error | 500 | `E500` | `Unable to read broadcast notes file` |
        | Unexpected server-side error | 500 | `E500` | `Unexpected server error.` |

        ## Error Codes Reference

        | Code | Description |
        |---|---|
        | `E105` | Invalid or missing required parameter |
        | `E202` | User session is invalid |
        | `E500` | Unexpected server error |
        | `NO_DATA_FOUND` | No data available |
      parameters:
        - $ref: '#/components/parameters/BroadcastId'
      responses:
        '200':
          description: Success — `notes` HTML string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonObject'
              example:
                status: OK
                notes: '<p>new notes available</p>'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
  # ---------------------------------------------------------------------------
  # MyWork — user notes
  # ---------------------------------------------------------------------------
  /mywork/v1/notes/configs:
    get:
      tags: [MyWorkNotes]
      summary: Dates that have saved user notes
      operationId: getNotesConfigs
      description: Returns `note_dates[]` — list of dates on which the user has saved notes. No notes → E404.
      responses:
        '200':
          description: 'Success — `{status: OK, note_dates: ["2024-01-15", ...]}`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonObject'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'

  /mywork/v1/notes:
    get:
      tags: [MyWorkNotes]
      summary: Get user note for a date
      operationId: getUserNotes
      description: |
        Retrieves the note for a specific date. Returns `user_notes` object.
        Note content (`notes`) is URL-encoded by the service layer.
      parameters:
        - name: selected_date
          in: query
          required: true
          schema:
            type: string
          description: "Date to retrieve note for (e.g. 2024-01-15). Mandatory — E103 if missing."
      responses:
        '200':
          description: 'Success — `{status: OK, user_notes: {domain_id, user_id, notes, notes_date, date_key}}`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonObject'
        '400':
          description: E103 — selected_date is mandatory
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'

    post:
      tags: [MyWorkNotes]
      summary: Add a user note for a date
      operationId: addUserNote
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required: [selected_date, notes]
              properties:
                selected_date:
                  type: string
                  description: "Date for the note (e.g. 2024-01-15) — mandatory (E103)"
                notes:
                  type: string
                  description: "Note content to save — mandatory (E104)"
      responses:
        '200':
          description: 'Success — `{status: OK, message: "User notes added successfully."}`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonObject'
        '400':
          description: "E103 selected_date mandatory / E104 notes mandatory"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'

    put:
      tags: [MyWorkNotes]
      summary: Update user note for a date
      operationId: updateUserNote
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required: [selected_date, notes]
              properties:
                selected_date:
                  type: string
                  description: "Date of the note to update — mandatory (E103)"
                notes:
                  type: string
                  description: "Updated note content — mandatory (E104)"
      responses:
        '200':
          description: 'Success — `{status: OK, message: "User notes updated successfully."}`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonObject'
        '400':
          description: "E103 selected_date mandatory / E104 notes mandatory"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'

    delete:
      tags: [MyWorkNotes]
      summary: Delete user note for a date
      operationId: deleteUserNote
      description: |
        Deletes the note for a date by passing an empty string to the service.
        The service call always succeeds once date validation passes.
      parameters:
        - name: selected_date
          in: query
          required: true
          schema:
            type: string
          description: "Date of the note to delete — mandatory (E103)"
      responses:
        '200':
          description: 'Success — `{status: OK, message: "User notes deleted successfully."}`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonObject'
        '400':
          description: E103 — selected_date is mandatory
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
  # ---------------------------------------------------------------------------
  # MyWork — recent tabs
  # ---------------------------------------------------------------------------
  /mywork/v1/recent-tabs/update:
    post:
      tags: [MyWorkRecentTabs]
      summary: Update recently opened navigation tabs in the user session
      operationId: updateRecentTabs
      description: |
        Adds a tab to the user's recent tabs list and returns the full updated list.
        Corresponds to legacy: `POST /service/users/updateRecentTabs`.

        **Behaviour:**
        - Maintains a maximum of **3 recent tabs per product** — when the limit is exceeded,
          the oldest tab for that product is dropped.
        - Removes duplicate `tab_id` entries before inserting the new tab at the top.
        - Tabs are filtered by `unit_org_level` — only tabs matching the current org level are retained.
        - When user-switching is active (`switchFlag="Y"`), tabs are stored under `currentRecentTabs`;
          otherwise stored under `homeRecentTabs`.
        - `tab_name` is URL-encoded by the service (spaces become `+`, not `%20`).

        **Session-sourced (not accepted via form body):**
        `profile_id` and `unit_org_level` are always resolved from the authenticated session.

        **`product_id` derivation:** If omitted, derived from `tab_id` by extracting the prefix
        before the first underscore (e.g. `RTM20_MSGSETUP1` → `RTM20`).

        ---

        ## Form Parameters Reference

        | Parameter | Type | Required | Description |
        |---|---|---|---|
        | `tab_id` | String | **Yes** (→ E140) | Unique tab identifier (e.g. `RTM20_MSGSETUP1`) |
        | `product_id` | String | No | Product identifier (e.g. `RTM20`). Derived from `tab_id` if omitted. |
        | `module_name` | String | **Yes** (→ E142) | Display name of the module (e.g. `Task Manager`) |
        | `tab_name` | String | **Yes** (→ E144) | Display name of the tab (e.g. `Messaging Setup`) |

        ---

        ## Response Fields

        | Field | Type | Description |
        |---|---|---|
        | `status` | String | `OK` for success |
        | `recent_tabs` | Object | Full updated recent tabs object keyed by language code |
        | `recent_tabs.<lang_code>[]` | Array | List of recent tab objects for the language |
        | `recent_tabs.<lang_code>[*].product_id` | String | Product identifier |
        | `recent_tabs.<lang_code>[*].tab_id` | String | Unique tab identifier |
        | `recent_tabs.<lang_code>[*].unit_org_level` | String | Organizational level of the unit |
        | `recent_tabs.<lang_code>[*].profile_id` | String | Comma-separated profile IDs (from session) |
        | `recent_tabs.<lang_code>[*].module_name` | String | Display name of the module |
        | `recent_tabs.<lang_code>[*].tab_name` | String | URL-encoded tab name (spaces as `+`) |

        ---

        ## Error Scenarios

        | Scenario | HTTP | Error Code | Message |
        |---|---|---|---|
        | Missing / blank `X-reflexis-csrf-token-X` | 400 | `E101` | `MANDATORY_DOMAIN_ID: Missing or blank auth token` |
        | Invalid (expired) `X-reflexis-csrf-token-X` | 401 | `E202` | `User session is invalid` |
        | `tab_id` missing or blank | 400 | `E140` | `tab_id is mandatory` |
        | `module_name` missing or blank | 400 | `E142` | `module_name is mandatory` |
        | `tab_name` missing or blank | 400 | `E144` | `tab_name is mandatory` |
        | Service returned null/empty | 500 | `E340` | `Error while updating recently opened tabs` |
        | Unexpected server-side error | 500 | `E302` | `Internal server error` |

        > **Note:** Missing/blank token returns E101 (400), not E202 (401).

        ## Error Codes Reference

        | Code | Description |
        |---|---|
        | `E101` | Missing or blank auth token (domain ID mandatory) |
        | `E140` | `tab_id` is mandatory |
        | `E142` | `module_name` is mandatory |
        | `E144` | `tab_name` is mandatory |
        | `E202` | User session is invalid |
        | `E302` | Internal server error |
        | `E340` | Error while updating recently opened tabs |
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required: [tab_id, module_name, tab_name]
              properties:
                tab_id:
                  type: string
                  description: "Unique tab identifier (e.g. RTM20_MSGSETUP1) — mandatory (E140)"
                product_id:
                  type: string
                  description: "Product identifier (e.g. RTM20). If omitted, derived from tab_id prefix."
                module_name:
                  type: string
                  description: "Display name of the module (e.g. Task Manager) — mandatory (E142)"
                tab_name:
                  type: string
                  description: "Display name of the tab (e.g. Messaging Setup) — mandatory (E144)"
      responses:
        '200':
          description: |
            Success — `{status: OK, recent_tabs: {<lang_code>: [{product_id, tab_id, unit_org_level, profile_id, module_name, tab_name}]}}`.
            Note: `tab_name` is URL-encoded by the service layer (spaces become `+`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonObject'
              example:
                status: OK
                recent_tabs:
                  en_US:
                    - product_id: RTM20
                      tab_id: RTM20_MSGSETUP1
                      unit_org_level: "1"
                      profile_id: SYSADMIN,MOD
                      module_name: Task Manager
                      tab_name: Messaging+Setup
        '400':
          description: "E140 tab_id mandatory / E142 module_name mandatory / E144 tab_name mandatory"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
