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

# Update notification preferences

> Sets the channels of each kind the body names to exactly the channels given, keeps every kind and the PR review filter it omits, and returns the whole configuration.

Use this tool when you need to:
- Turn email, Slack direct messages or push on or off for a kind of notification
- Choose which submitted PR reviews notify the caller at all

Examples:
- PATCH /user/notification-preferences {"preferences": {"task_failed": {"channels": ["email", "push"]}, "question_requested": {"channels": ["slack_dm", "push"]}}}
- PATCH /user/notification-preferences {"pr_review_filter": "changes_requested"}

Hints:
- Both fields are optional. preferences maps a kind (question_requested, plan_requested, task_response_ready, task_failed, pr_review_submitted) to its channels, a list of email, slack_dm and push, where an empty list turns the kind off; pr_review_filter is none, changes_requested, approved or all. An unknown kind, channel or filter is refused with 422 by the schema.
- Returns the same shape as getNotificationPreferences; a body that names nothing changes nothing.
- Only a channel the update turns on is checked: a channel the caller cannot be reached on, Slack direct messages without a linked Slack identity in an organization with Slack connected (or email without a profile email), is refused with 400. Push is never checked.
- Use linkSlackIdentity first to link the caller's Slack identity before turning on slack_dm; use getNotificationPreferences instead to read without changing.
- Any authenticated caller may change their own.



## OpenAPI

````yaml api-reference/openapi.json PATCH /user/notification-preferences
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /user/notification-preferences:
    patch:
      tags:
        - notifications
      summary: Update notification preferences
      description: >-
        Sets the channels of each kind the body names to exactly the channels
        given, keeps every kind and the PR review filter it omits, and returns
        the whole configuration.


        Use this tool when you need to:

        - Turn email, Slack direct messages or push on or off for a kind of
        notification

        - Choose which submitted PR reviews notify the caller at all


        Examples:

        - PATCH /user/notification-preferences {"preferences": {"task_failed":
        {"channels": ["email", "push"]}, "question_requested": {"channels":
        ["slack_dm", "push"]}}}

        - PATCH /user/notification-preferences {"pr_review_filter":
        "changes_requested"}


        Hints:

        - Both fields are optional. preferences maps a kind (question_requested,
        plan_requested, task_response_ready, task_failed, pr_review_submitted)
        to its channels, a list of email, slack_dm and push, where an empty list
        turns the kind off; pr_review_filter is none, changes_requested,
        approved or all. An unknown kind, channel or filter is refused with 422
        by the schema.

        - Returns the same shape as getNotificationPreferences; a body that
        names nothing changes nothing.

        - Only a channel the update turns on is checked: a channel the caller
        cannot be reached on, Slack direct messages without a linked Slack
        identity in an organization with Slack connected (or email without a
        profile email), is refused with 400. Push is never checked.

        - Use linkSlackIdentity first to link the caller's Slack identity before
        turning on slack_dm; use getNotificationPreferences instead to read
        without changing.

        - Any authenticated caller may change their own.
      operationId: updateNotificationPreferences
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNotificationPreferencesRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationPreferencesResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationsErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationsErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationsErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationsErrorResponse'
          description: Internal Server Error
components:
  schemas:
    UpdateNotificationPreferencesRequest:
      additionalProperties: false
      properties:
        pr_review_filter:
          enum:
            - none
            - changes_requested
            - approved
            - all
          type: string
        preferences:
          $ref: '#/components/schemas/NotificationKindPreferencesPatch'
      type: object
    NotificationPreferencesResponse:
      additionalProperties: false
      properties:
        pr_review_filter:
          enum:
            - none
            - changes_requested
            - approved
            - all
          type: string
        preferences:
          $ref: '#/components/schemas/NotificationKindPreferences'
      required:
        - preferences
        - pr_review_filter
      type: object
    NotificationsErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - bad_gateway
            - bad_request
            - conflict
            - forbidden
            - gateway_timeout
            - gone
            - internal_error
            - method_not_allowed
            - not_acceptable
            - not_found
            - not_implemented
            - payment_required
            - precondition_failed
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - service_unavailable
            - unauthenticated
            - unsupported_media_type
            - validation_failed
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    NotificationKindPreferencesPatch:
      additionalProperties: false
      properties:
        plan_requested:
          $ref: '#/components/schemas/NotificationKindPreference'
        pr_review_submitted:
          $ref: '#/components/schemas/NotificationKindPreference'
        question_requested:
          $ref: '#/components/schemas/NotificationKindPreference'
        task_failed:
          $ref: '#/components/schemas/NotificationKindPreference'
        task_response_ready:
          $ref: '#/components/schemas/NotificationKindPreference'
      type: object
    NotificationKindPreferences:
      additionalProperties: false
      properties:
        plan_requested:
          $ref: '#/components/schemas/NotificationKindPreference'
        pr_review_submitted:
          $ref: '#/components/schemas/NotificationKindPreference'
        question_requested:
          $ref: '#/components/schemas/NotificationKindPreference'
        task_failed:
          $ref: '#/components/schemas/NotificationKindPreference'
        task_response_ready:
          $ref: '#/components/schemas/NotificationKindPreference'
      required:
        - question_requested
        - plan_requested
        - task_response_ready
        - task_failed
        - pr_review_submitted
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    NotificationKindPreference:
      additionalProperties: false
      properties:
        channels:
          items:
            enum:
              - email
              - slack_dm
              - push
            type: string
          type: array
      required:
        - channels
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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