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

# Delete a session

> Removes the session, its workflows and their versions. Run history and logs stay and age out with the log retention. Answers 409 with the run ids while runs are active, unless force=true, which cancels them first. ADMIN keys only; a key limited to sessions may delete only its own. Recorded in the control audit.



## OpenAPI

````yaml /api/openapi.json delete /api/sessions/{sessionId}
openapi: 3.1.0
info:
  description: >-
    Create sessions and workflows, start and steer executions, and read their
    status, logs and results. Alpha: paths and schemas may change before v0.1.0.
  title: Yukta REST API
  version: 0.1.0-alpha.3
servers: []
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - description: Supervisors and control planes on the control bus
    name: Supervisors API
  - description: List the saved versions and roll back
    name: Workflow Versions API
  - description: Endpoints for starting workflows and listing their executions
    name: Workflow API
  - description: Edition, licence and features of this build
    name: Edition API
  - description: Stop, restart and observe workflow executions
    name: Execution API
  - description: Find runs across sessions
    name: Execution Search API
  - description: >-
      Endpoints for control bus operations, node management, and execution
      observability
    name: Control Bus & Observability API
  - description: Who is calling and what the key may do
    name: Session API
  - description: Read part of the output of a node
    name: Node Output API
  - description: Pause, resume, step and stop nodes
    name: Execution Control API
  - description: Endpoints for session and workflow discovery, configuration management
    name: Session API
  - description: Validate a draft workflow without saving it
    name: Session API
  - description: Workers connected to the control plane
    name: Workers API
  - description: Live feed of execution events
    name: Events API
  - description: Workflow DAG graph with plugin metadata and per-workflow execution history
    name: Workflow Details API
  - description: Follow the result of an execution
    name: Execution Results API
  - description: Stream execution logs
    name: Execution Logs API
  - description: Control commands and who sent them
    name: Control audit API
  - description: Example sessions to start from
    name: Templates API
  - description: Signed inbound calls that start a workflow
    name: Webhook API
  - description: Check a working directory before creating a session
    name: Session API
  - description: Endpoints for discovering workflow plugins
    name: Plugin API
paths:
  /api/sessions/{sessionId}:
    delete:
      tags:
        - Session API
      summary: Delete a session
      description: >-
        Removes the session, its workflows and their versions. Run history and
        logs stay and age out with the log retention. Answers 409 with the run
        ids while runs are active, unless force=true, which cancels them first.
        ADMIN keys only; a key limited to sessions may delete only its own.
        Recorded in the control audit.
      operationId: deleteSession
      parameters:
        - description: The unique identifier of the session
          in: path
          name: sessionId
          required: true
          schema:
            type: string
        - description: Cancel active runs first
          in: query
          name: force
          required: false
          schema:
            default: false
            type: boolean
      responses:
        '200':
          description: OK
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    apiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.