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

# Set a value for a key



## OpenAPI

````yaml /openapi/platform-api.yaml put /store/{store}/kv/{key}
openapi: 3.1.0
info:
  title: Versori Platform API
  version: 0.0.1
  license:
    name: UNLICENSED
servers:
  - description: Production
    url: https://platform.versori.com/api/v2
  - description: Staging
    url: https://platform-staging.versori.com/api/v2
  - description: Development
    url: http://localhost:8901
security:
  - bearerToken: []
  - cookie: []
paths:
  /store/{store}/kv/{key}:
    put:
      tags:
        - kv store
      summary: Set a value for a key
      operationId: SetKV
      parameters:
        - in: path
          name: store
          required: true
          schema:
            type: string
            format: ulid
            x-go-type: ulid.ULID
            x-go-name: OrganisationID
            x-go-type-import:
              path: versori.dev/vergo/ulid
        - in: path
          name: key
          required: true
          schema:
            type: string
            description: The key to set data (products/123)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  description: The value to store
                options:
                  $ref: '#/components/schemas/SetOptions'
      responses:
        '200':
          description: Value set successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetKVResponse'
components:
  schemas:
    SetOptions:
      type: object
      properties:
        expireIn:
          type: number
          description: TTL in milliseconds
        expireAt:
          type: string
          format: date-time
          description: Absolute expiration time
        refreshOnAccess:
          type: boolean
          description: Whether to refresh TTL on access
        ifVersionstamp:
          type: string
          description: Only set if current versionstamp matches
        ifNotExists:
          type: boolean
          description: Only set if key doesn't exist
        overwrite:
          type: boolean
          description: Whether to overwrite existing values
        metadata:
          type: object
          description: Additional metadata to store with the entry
    SetKVResponse:
      type: object
      properties:
        versionstamp:
          type: string
        committed:
          type: boolean
        ok:
          type: boolean
  securitySchemes:
    bearerToken:
      description: >
        Bearer token authentication used by the Versori Platform. External
        consumers must provide an API key, however

        internal consumers must provide a JWT id_token issued by our IdP.
      type: http
      scheme: bearer
    cookie:
      description: Cookie authentication used by the Versori Platform.
      type: apiKey
      in: cookie
      name: cookie

````