get:
  operationId: getNotificationPreference
  tags:
    - Notifications
  summary: Get Notification Preferences for tenant.
  description: >-
    Returns the notification preferences for tenant.  Note that if the key doesn't exist, then a 404 will be returned.

    Request will require the following legacy roles:  ORG_ADMIN and API
  # security:
  #   - oauth2: [ORG_ADMIN,API]
  parameters:
    - in: path
      name: key
      required: true
      schema:
        type: string
      description: The notification key.
  responses:
    '200':
      description: Return preference for the given notification key.
      content:
        application/json:
          schema:
              $ref: '../schemas/PreferencesDto.yaml'
    '400':
      $ref: '../../v3/responses/400.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '404':
      $ref: '../../v3/responses/404.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'
put:
  operationId: putNotificationPreference
  tags:
    - Notifications
  summary: Overwrite the preferences for the given notification key.
  description: >- 
    In the notification world, a notification flows through these salient stages - 
     1. Interest matching, 
     2. Preferences 
     3. Template Rendering. 
    
    The default notification preferences make up a part of the second stage, along with user preferences (which is a future goal). The expectation is for 
    admins to be able to set default preferences for their org, like opting in to or out of certain notifications, and configuring future preferences as 
    we tack on more features. The key in the Dto is not necessary but if it is provided and doesn't match the key in the URI, then a 400 will be thrown. 

    Request will require the following legacy roles:  ORG_ADMIN and API
  # security:
  #   - oauth2: [ORG_ADMIN,API]
  parameters:
    - in: path
      name: key
      required: true
      schema:
        type: string
      description: The notification key.
  requestBody:
    required: true
    content:
      application/json:
        schema:
          $ref: '../schemas/PreferencesDto.yaml'
  responses:
    '200':
      description: The preferences were successfully replaced, and an echo of the new preferences are sent back to caller.
      content:
        application/json:
          schema:
            $ref: '../schemas/PreferencesDto.yaml'
    '400':
      $ref: '../../v3/responses/400.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '404':
      $ref: '../../v3/responses/404.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'



