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

# Remove a session

> Permanently removes one session and terminates its active connection when needed.

Organization API-key callers require `sessions:manage`; dashboard callers require current organization membership and authorization.



## OpenAPI

````yaml /api-reference/openapi.management.json delete /v1/sessions/{sessionId}
openapi: 3.0.3
info:
  title: Polymorfa Management API
  version: 1.0.0
  description: >-
    Public customer management surface (25 HTTP operations).


    Each public `/v1` operation declares its supported credential: a scoped
    `titan_` organization key or a verified dashboard JWT, or dashboard-only
    authorization when a specific user's authority is required. The `/v1`
    boundary rejects `titan_pt_` project tokens.


    Most transitional body/response schemas remain loose (`additionalProperties:
    true`); session-control operations use explicit strict schemas.
servers:
  - url: https://api.polymorfa.com
  - url: http://localhost:8080
    description: local dev
security: []
paths:
  /v1/sessions/{sessionId}:
    delete:
      tags:
        - sessions
      summary: Remove a session
      description: >-
        Permanently removes one session and terminates its active connection
        when needed.


        Organization API-key callers require `sessions:manage`; dashboard
        callers require current organization membership and authorization.
      operationId: sessions.remove
      parameters:
        - name: sessionId
          in: path
          required: true
          description: Database session UUID or stable session slug.
          schema:
            $ref: '#/components/schemas/SessionIdentifier'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    $ref: '#/components/schemas/SessionRemoveResult'
                required:
                  - data
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - ApiKeyAuth: []
        - ConsoleSession: []
components:
  schemas:
    SessionIdentifier:
      type: string
      minLength: 1
      maxLength: 64
      description: Database session UUID or stable session slug.
    SessionRemoveResult:
      type: object
      additionalProperties: false
      properties:
        removed:
          type: boolean
          enum:
            - true
        sessionId:
          type: string
          format: uuid
      required:
        - removed
        - sessionId
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
      required:
        - error
  responses:
    Unauthorized:
      description: Missing/invalid credential for this audience.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: Authenticated but lacks the required scope/role/audience.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: >-
        The requested resource was not found inside the authenticated
        organization or project scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Polymorfa server credential: a scoped titan_ organization key. Public
        /v1 operations reject titan_pt_ project tokens.
    ConsoleSession:
      type: http
      scheme: bearer
      description: >-
        Verified dashboard JWT for signed-in Console requests. This is not a
        server credential.

````