> ## 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 multiple key-value pairs



## OpenAPI

````yaml /openapi/platform-api.yaml put /store/{store}/kv/batch
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/batch:
    put:
      tags:
        - kv store
      summary: Set multiple key-value pairs
      operationId: BatchSetKV
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchSetKVRequest'
      responses:
        '200':
          description: Batch operation results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchSetKVResponse'
components:
  schemas:
    BatchSetKVRequest:
      type: object
      properties:
        entries:
          $ref: '#/components/schemas/BatchEntries'
      required:
        - entries
    BatchSetKVResponse:
      $ref: '#/components/schemas/KVBatchResult'
    BatchEntries:
      type: array
      items:
        $ref: '#/components/schemas/BatchEntry'
    KVBatchResult:
      type: object
      properties:
        successes:
          type: array
          items:
            $ref: '#/components/schemas/KVCommitResult'
        failures:
          type: array
          items:
            $ref: '#/components/schemas/KVBatchFailure'
      required:
        - successes
        - failures
    BatchEntry:
      type: object
      properties:
        key:
          type: array
          items:
            type: string
        value:
          description: Any JSON value
        options:
          $ref: '#/components/schemas/SetOptions'
      required:
        - key
        - value
    KVCommitResult:
      type: object
      properties:
        ok:
          type: boolean
          description: Whether the operation was successful
        versionstamp:
          type: string
          description: New version identifier
        committed:
          type: boolean
          description: Whether the transaction was committed
      required:
        - ok
        - versionstamp
        - committed
    KVBatchFailure:
      type: object
      properties:
        key:
          $ref: '#/components/schemas/KVKey'
        error:
          type: string
      required:
        - key
        - error
    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
    KVKey:
      type: array
      items:
        type: string
  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

````