> ## Documentation Index
> Fetch the complete documentation index at: https://omniflow-vpn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Patch v1accountpreferences

> Each field is optional and an absent field is left unchanged, so a screen that renders one toggle never has to send back a document it did not read. A marketing decision appends a consent record rather than overwriting one, because the history of who opted in and when is the thing that has to survive.



## OpenAPI

````yaml https://raw.githubusercontent.com/kewldan/omniflow/main/api/openapi.yaml patch /v1/account/preferences
openapi: 3.0.3
info:
  title: Omniflow API
  version: 1.0.0
  description: >-
    Customer, commerce, payment, wallet, fulfillment, and operations API for
    Omniflow.
servers: []
security: []
paths:
  /v1/account/preferences:
    patch:
      tags:
        - account
      description: >-
        Each field is optional and an absent field is left unchanged, so a
        screen that renders one toggle never has to send back a document it did
        not read. A marketing decision appends a consent record rather than
        overwriting one, because the history of who opted in and when is the
        thing that has to survive.
      operationId: updateAccountPreferences
      parameters:
        - $ref: '#/components/parameters/CSRFToken'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountPreferencesUpdate'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountPreferences'
        '422':
          $ref: '#/components/responses/Problem'
components:
  parameters:
    CSRFToken:
      in: header
      name: X-CSRF-Token
      required: true
      description: >-
        Echoes the token from the current session. Required on every unsafe
        method.
      schema:
        type: string
  schemas:
    AccountPreferencesUpdate:
      type: object
      description: >-
        Every field is optional and an absent field is left unchanged, so a
        screen that renders one toggle never sends back a document it did not
        read. Equal quiet-hours bounds clear the window.
      properties:
        locale:
          type: string
          enum:
            - auto
            - ru
            - en
        notifications:
          type: object
          properties:
            expiry:
              type: boolean
            traffic:
              type: boolean
            renewal:
              type: boolean
            news:
              type: boolean
        quietHours:
          type: object
          required:
            - startHour
            - endHour
          properties:
            startHour:
              type: integer
              minimum: 0
              maximum: 23
            endHour:
              type: integer
              minimum: 0
              maximum: 23
        marketing:
          type: boolean
          description: Appends a consent record; it never rewrites one.
    AccountPreferences:
      type: object
      required:
        - locale
        - notifications
        - marketing
        - contacts
      properties:
        locale:
          type: string
          enum:
            - auto
            - ru
            - en
        notifications:
          type: object
          required:
            - expiry
            - traffic
            - renewal
            - news
          properties:
            expiry:
              type: boolean
            traffic:
              type: boolean
            renewal:
              type: boolean
            news:
              type: boolean
        quietHours:
          type: object
          description: Absent when unset.
          required:
            - startHour
            - endHour
          properties:
            startHour:
              type: integer
              minimum: 0
              maximum: 23
            endHour:
              type: integer
              minimum: 0
              maximum: 23
        marketing:
          type: object
          required:
            - enabled
          properties:
            enabled:
              type: boolean
            decidedAt:
              type: string
              format: date-time
            source:
              type: string
              description: Which surface recorded the decision.
            policyVersion:
              type: string
        contacts:
          type: array
          description: Flags only. The address itself is never returned.
          items:
            type: object
            required:
              - id
              - kind
              - verified
              - transactional
              - marketing
              - createdAt
            properties:
              id:
                type: string
                format: uuid
              kind:
                type: string
                enum:
                  - email
                  - phone
                  - telegram
              verified:
                type: boolean
              transactional:
                type: boolean
              marketing:
                type: boolean
              createdAt:
                type: string
                format: date-time
        suppression:
          type: object
          required:
            - reason
            - createdAt
          properties:
            reason:
              type: string
              enum:
                - customer_request
                - bounced
                - complaint
                - operator
            createdAt:
              type: string
              format: date-time
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        request_id:
          type: string
  responses:
    Problem:
      description: Request failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'

````

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