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

# Update notification preference

> Enable or disable a specific notification category for a user.



## OpenAPI

````yaml /openapi/server.json patch /emails/notification-preference/{user_id}/{notification_category_id}
openapi: 3.1.0
info:
  title: Hexclave REST API
  version: 1.0.0
  description: >-
    The Hexclave REST API. All request headers are documented as canonical
    `X-Hexclave-*`; the equivalent `X-Stack-*` aliases are accepted on every
    endpoint for backwards compatibility. Response headers
    `X-Hexclave-actual-status`, `X-Hexclave-known-error`, and
    `X-Hexclave-request-id` are emitted alongside their legacy `X-Stack-*`
    equivalents.
servers:
  - url: https://api.hexclave.com/api/v1
    description: Hexclave REST API
security: []
paths:
  /emails/notification-preference/{user_id}/{notification_category_id}:
    patch:
      tags:
        - Emails
      summary: Update notification preference
      description: Enable or disable a specific notification category for a user.
      parameters:
        - name: user_id
          in: path
          schema:
            type: string
            example: 3241a285-8329-4d69-8f3d-316e08cf140c
            description: >-
              The ID of the user, or the special value `me` for the currently
              authenticated user
          description: >-
            The ID of the user, or the special value `me` for the currently
            authenticated user
          required: true
        - name: notification_category_id
          in: path
          schema:
            type: string
          required: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
              required:
                - enabled
              example: {}
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  notification_category_id:
                    type: string
                  notification_category_name:
                    type: string
                  enabled:
                    type: boolean
                  can_disable:
                    type: boolean
                required:
                  - notification_category_id
                  - notification_category_name
                  - enabled
                  - can_disable

````