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

# Change my message settings

> Writes the caller's settings as a new fact that supersedes the current one. `supersedes` is the current `settings.id`, `null` only while it is `null`; a stale one is a conflict. A field already at its value writes nothing and returns the current settings. `operationId` makes a retry safe.



## OpenAPI

````yaml /openapi.json patch /v1/settings/messages
openapi: 3.0.0
info:
  title: onosso
  version: 0.0.0
  description: >-
    The household's API: the week, the people and the sessions the web app reads
    and changes.
servers: []
security: []
tags:
  - name: Week
    description: The household's week, day by day.
  - name: People
    description: The people who make up the household.
  - name: Pets
    description: The pets of the house.
  - name: Invites
    description: Links that let someone join.
  - name: Sessions
    description: Where you are signed in.
  - name: Tokens
    description: Your personal API tokens.
  - name: Address
    description: Where the household lives.
  - name: Messages
    description: What each person receives from the product, and when.
  - name: Questions
    description: 'What needs a person: one queue, the same in the app and on WhatsApp.'
  - name: Shopping
    description: 'The household''s one list: places, items and marks.'
  - name: Conversation
    description: >-
      Each person's one conversation with the assistant, the same in the app and
      on WhatsApp.
  - name: MCP
    description: The house for an MCP client such as Claude Desktop, with a personal token.
paths:
  /v1/settings/messages:
    patch:
      tags:
        - Messages
      summary: Change my message settings
      description: >-
        Writes the caller's settings as a new fact that supersedes the current
        one. `supersedes` is the current `settings.id`, `null` only while it is
        `null`; a stale one is a conflict. A field already at its value writes
        nothing and returns the current settings. `operationId` makes a retry
        safe.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                operationId:
                  type: string
                  format: uuid
                at:
                  type: string
                  format: date-time
                supersedes:
                  type: string
                  nullable: true
                  maxLength: 64
                nightTime:
                  type: string
                  enum:
                    - '18:00'
                    - '18:30'
                    - '19:00'
                    - '19:30'
                    - '20:00'
                    - '20:30'
                    - '21:00'
                    - '21:30'
                    - '22:00'
                    - '22:30'
                nightOn:
                  type: boolean
                mode:
                  type: string
                  enum:
                    - all
                    - changes
                unmute:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: 'A `topicId` in `mutedTopics`: receive it again.'
                stopped:
                  type: boolean
                  description: '`true` stops the messages, `false` receives them again.'
              required:
                - operationId
                - at
                - supersedes
      responses:
        '200':
          description: The settings after the change.
          content:
            application/json:
              schema:
                type: object
                properties:
                  settings:
                    $ref: '#/components/schemas/MessageSettings'
                required:
                  - settings
        '401':
          description: Unauthorized.
        '403':
          description: The request origin is not allowed.
        '409':
          description: >-
            `notifications.stale-settings`: the settings changed since
            `supersedes`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainError'
        '422':
          description: >-
            `notifications.invalid-command`: no change field, an hour outside
            the list, or an `unmute` not muted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/RequestTimeout'
      security:
        - session: []
components:
  schemas:
    MessageSettings:
      type: object
      properties:
        id:
          type: string
          nullable: true
          description: >-
            The current settings fact; `null` while the person has none and the
            defaults apply.
        nightTime:
          type: string
          enum:
            - '18:00'
            - '18:30'
            - '19:00'
            - '19:30'
            - '20:00'
            - '20:30'
            - '21:00'
            - '21:30'
            - '22:00'
            - '22:30'
          description: When the night message goes out, in the household's time zone.
        nightOn:
          type: boolean
        mode:
          type: string
          enum:
            - all
            - changes
          description: '`all` (Tudo) or `changes` (Só o que mudou).'
        mutedTopics:
          type: array
          items:
            type: object
            properties:
              topicId:
                type: string
              label:
                type: string
            required:
              - topicId
              - label
        stoppedAt:
          type: string
          nullable: true
          format: date-time
          description: When the person stopped their messages; `null` while receiving.
      required:
        - id
        - nightTime
        - nightOn
        - mode
        - mutedTopics
        - stoppedAt
    DomainError:
      type: object
      properties:
        code:
          type: string
        details:
          type: object
          additionalProperties:
            nullable: true
      required:
        - code
        - details
    Degraded:
      type: object
      properties:
        code:
          type: string
          enum:
            - request.timeout
            - service.unavailable
        correlationId:
          type: string
      required:
        - code
        - correlationId
  responses:
    ServiceUnavailable:
      description: A dependency is unavailable; retry after Retry-After seconds.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Degraded'
    RequestTimeout:
      description: The request outlived its deadline.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Degraded'
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: __Secure-better-auth.session_token
      description: The session cookie set when you sign in to the web app.

````

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