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

# Update my preferences

> This API updates the preferences of the signed-in user. It needs no extra permission, because the data is the user's own. An API key has no user, so the request is refused. The `put` method works too.

> [!NOTE]
>
> Replace `{your-subdomain}` with your workspace's subdomain. \
> Learn how to find your subdomain in [Workspace subdomain](https://apidocs.neetokb.com/api/workspace-subdomain.md).


## OpenAPI

````yaml bundled/my-preferences.yaml PATCH /my_preferences
openapi: 3.0.3
info:
  title: NeetoKB My Preferences API
  description: APIs to read and update the preferences of the signed-in user.
  version: 1.0.0
servers:
  - description: NeetoKB API
    url: https://{your-subdomain}.neetokb.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/api/workspace-subdomain).
security: []
paths:
  /my_preferences:
    patch:
      tags:
        - My preferences
      summary: Update my preferences
      description: >-
        This API updates the preferences of the signed-in user. It needs no
        extra permission, because the data is the user's own. An API key has no
        user, so the request is refused. The `put` method works too.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - my_preferences
              properties:
                my_preferences:
                  type: object
                  properties:
                    monthly_reports_mail:
                      type: boolean
                      description: Whether to email the monthly report to the user.
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/my_preferences'
        '401':
          $ref: '#/components/responses/unauthorized_response'
        '422':
          description: >-
            Unprocessable Entity - The request used an API key, which has no
            signed-in user, or `my_preferences.monthly_reports_mail` is missing
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: No changes were given, so nothing was updated.
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/api/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
  schemas:
    my_preferences:
      type: object
      properties:
        monthly_reports_mail:
          type: boolean
          example: true
  responses:
    unauthorized_response:
      description: Unauthorized - API key is missing or invalid

````

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