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

# Update Notification Preference

> Set or reset the authenticated user's email preference for a notification type. Use null to inherit the company default.



## OpenAPI

````yaml /api-reference/openapi.json post /notifications/preferences/{type_code}
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: >-
    API for interacting with Corgea's scanning and vulnerability management
    features
servers:
  - url: https://www.corgea.app/api/v1
    description: Production server
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /notifications/preferences/{type_code}:
    post:
      tags:
        - Notifications
      summary: Update Notification Preference
      description: >-
        Set or reset the authenticated user's email preference for a
        notification type. Use null to inherit the company default.
      operationId: postNotificationPreference
      parameters:
        - name: type_code
          in: path
          required: true
          schema:
            type: string
          description: Notification type code, such as scheduled_scan.daily_report
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNotificationPreferenceRequest'
      responses:
        '200':
          $ref: '#/components/responses/OkStatus'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/UnknownNotificationType'
components:
  schemas:
    UpdateNotificationPreferenceRequest:
      type: object
      required:
        - email_enabled
      properties:
        email_enabled:
          type: boolean
          nullable: true
          description: Set true or false, or null to inherit the company default
  responses:
    OkStatus:
      description: Request completed successfully
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: ok
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Invalid JSON body
    Unauthorized:
      description: Invalid or missing token
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Missing or invalid authorization header
    UnknownNotificationType:
      description: Notification type was not found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Unknown notification type
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: API key for authentication
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 access token (JWT) in the Authorization header

````