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

# Update Notification Preference

> Turn one category on or off for the current user; return the full updated set.

Gated on authentication + a WRITE-capable key, but NOT org role: a viewer can
still change their own email settings, while a read-only key cannot.



## OpenAPI

````yaml https://api.getfloo.com/openapi.json patch /v1/notification-preferences
openapi: 3.1.0
info:
  title: floo API
  version: 0.1.0
servers:
  - url: https://api.getfloo.com
security: []
paths:
  /v1/notification-preferences:
    patch:
      tags:
        - notification-preferences
      summary: Update Notification Preference
      description: >-
        Turn one category on or off for the current user; return the full
        updated set.


        Gated on authentication + a WRITE-capable key, but NOT org role: a
        viewer can

        still change their own email settings, while a read-only key cannot.
      operationId: notification_preferences_update_notification_preference
      parameters:
        - $ref: '#/components/parameters/X-Floo-Org-Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNotificationPreferenceRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationPreferencesResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    X-Floo-Org-Id:
      name: X-Floo-Org-Id
      in: header
      required: false
      schema:
        type: string
        format: uuid
      description: Organization to act in; defaults to the one joined most recently.
  schemas:
    UpdateNotificationPreferenceRequest:
      properties:
        category:
          $ref: '#/components/schemas/NotificationCategory'
        enabled:
          type: boolean
          title: Enabled
      type: object
      required:
        - category
        - enabled
      title: UpdateNotificationPreferenceRequest
      description: Select a notification category and its desired enabled state.
    NotificationPreferencesResponse:
      properties:
        preferences:
          items:
            $ref: '#/components/schemas/NotificationPreference'
          type: array
          title: Preferences
      type: object
      required:
        - preferences
      title: NotificationPreferencesResponse
      description: Wrap the caller's notification preferences by category.
    ErrorResponse:
      properties:
        detail:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Body of every error response except request validation (422).
    NotificationCategory:
      type: string
      enum:
        - deploy_success
        - deploy_failure
        - domains
        - managed_services
        - billing
      title: NotificationCategory
      description: >-
        A user-muteable class of transactional email.


        Membership in this enum *is* the muteable contract: an email type mapped
        to

        one of these consults the recipient's preference before sending; any
        email

        type not mapped here is always-send (transactional / security /
        destructive)

        and can never be muted. The muteable set is pinned by

        tests/test_notification_preferences.py so a security or destructive
        email can

        never be made silenceable by accident.
    NotificationPreference:
      properties:
        category:
          $ref: '#/components/schemas/NotificationCategory'
        label:
          type: string
          title: Label
        description:
          type: string
          title: Description
        enabled:
          type: boolean
          title: Enabled
        is_default:
          type: boolean
          title: Is Default
      type: object
      required:
        - category
        - label
        - description
        - enabled
        - is_default
      title: NotificationPreference
      description: One category's effective state for the authenticated user.
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      additionalProperties: true
      type: object
      required:
        - code
        - message
      title: ErrorDetail
      description: Standard error envelope with operation-specific JSON context.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A `floo_` API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.