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

# Update an existing session

> Updates the session data associated with the specified `sessionId`.



## OpenAPI

````yaml put /accounts/sessions/{sessionId}
openapi: 3.1.0
info:
  title: OwnID API
  version: 1.0.0
  description: Server API for integrating with the OwnID
servers:
  - url: https://server.ownid.com/{appId}
security:
  - AdminAccessToken: []
paths:
  /accounts/sessions/{sessionId}:
    put:
      tags:
        - Session
      summary: Update an existing session
      description: Updates the session data associated with the specified `sessionId`.
      operationId: updateSession
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
          description: The session ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WithSessionPayload'
      responses:
        '200':
          description: Successfully updated the session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '404':
          description: Session with the requested session ID does not exist.
components:
  schemas:
    WithSessionPayload:
      properties:
        payload:
          type: object
          additionalProperties: true
      examples:
        - payload:
            preferences:
              theme: dark
              resolution: wide
    Session:
      type: object
      required:
        - created
      allOf:
        - properties:
            created:
              type: string
              format: date-time
            timeout:
              type: integer
            lastActive:
              type: string
              format: date-time
        - $ref: '#/components/schemas/WithSessionPayload'
      examples:
        - created: '2000-10-31T06:30:00.000Z'
          timeout: 10000
          lastActive: '2000-10-31T06:30:00.000Z'
          payload:
            preferences:
              theme: dark
              resolution: wide
  securitySchemes:
    AdminAccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````