> ## 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.

# 通知設定を更新

> 認証済みユーザーの通知タイプ別メール設定を指定またはリセットします。会社のデフォルトを継承するにはnullを指定します。



## OpenAPI

````yaml /ja/api-reference/openapi.json patch /notifications/preferences/{type_code}
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: Corgeaのスキャン機能および脆弱性管理機能を操作するためのAPI
servers:
  - url: https://www.corgea.app/api/v1
    description: 本番サーバー
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /notifications/preferences/{type_code}:
    patch:
      tags:
        - 通知
      summary: 通知設定を更新
      description: 認証済みユーザーの通知タイプ別メール設定を指定またはリセットします。会社のデフォルトを継承するにはnullを指定します。
      operationId: updateNotificationPreference
      parameters:
        - name: type_code
          in: path
          required: true
          schema:
            type: string
          description: '通知タイプコード（例: 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: trueまたはfalseを指定します。会社のデフォルトを継承するにはnullを指定します
  responses:
    OkStatus:
      description: リクエストが正常に完了しました
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: ok
    BadRequest:
      description: リクエストが無効です
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Invalid JSON body
    Unauthorized:
      description: トークンが無効か、指定されていません
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Missing or invalid authorization header
    UnknownNotificationType:
      description: 通知タイプが見つかりません
      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キー
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Authorizationヘッダーで使用するOAuth2アクセストークン（JWT）

````