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

# Write a preference

> Writes one key of the person's own preferences and answers every key.



## OpenAPI

````yaml openapi/en/control.json PUT /v1/users/me/preferences/{key}
openapi: 3.1.0
info:
  title: Niadra control API
  version: '1'
  description: >-
    Tenants, projects, sources, keys, people, configuration and usage. It never
    receives customer content.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/users/me/preferences/{key}:
    put:
      summary: Write a preference
      description: >-
        Writes one key and answers every key. A person keeps at most 16 keys of
        4096 bytes of JSON each;

        past either, 422.


        **Authentication.** Person token issued by the control plane
        (`Authorization: Bearer <JWT>`), with the role the operation needs.
      operationId: set_my_preference_v1_users_me_preferences__key__put
      parameters:
        - in: path
          name: key
          required: true
          schema:
            title: Key
            type: string
          description: >-
            The name of the preference: 1 to 64 characters of a-z, 0-9, `_`, `.`
            and `-`, starting with a letter.
          example: welcome_seen
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreferenceIn'
            example:
              value: true
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreferencesOut'
              example:
                preferences:
                  tutorials:
                    done:
                      tour: '2026-09-22T11:20:00.000Z'
                  welcome_seen: true
          description: Every preference of the person, with the key written.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - personToken: []
components:
  schemas:
    PreferenceIn:
      additionalProperties: false
      properties:
        value:
          description: Any JSON value but null, at most 4096 bytes once serialized.
          title: Value
      required:
        - value
      title: PreferenceIn
      type: object
    PreferencesOut:
      additionalProperties: false
      description: What the Console keeps for the signed-in person across browsers, by key.
      properties:
        preferences:
          additionalProperties: true
          title: Preferences
          type: object
      required:
        - preferences
      title: PreferencesOut
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
  securitySchemes:
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````