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

# Kill Exec Session

> Kill an exec session by session ID. Returns streaming NDJSON with kill progress.



## OpenAPI

````yaml /sprites/api/openapi.json post /v1/sprites/{name}/exec/{session_id}/kill
openapi: 3.1.0
info:
  title: Sprites API
  version: 0.1.12
  x-sprite-env-version: v0.0.1-rc48
servers:
  - url: https://api.sprites.dev
security: []
paths:
  /v1/sprites/{name}/exec/{session_id}/kill:
    post:
      tags:
        - Exec
      summary: Kill Exec Session
      description: >-
        Kill an exec session by session ID. Returns streaming NDJSON with kill
        progress.
      operationId: sprite_env_kill__exec__session
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
        - in: path
          name: session_id
          required: true
          schema:
            type: string
        - description: 'Signal to send (default: `SIGTERM`)'
          in: query
          name: signal
          required: false
          schema:
            description: 'Signal to send (default: `SIGTERM`)'
            type: string
        - description: 'Timeout waiting for process to exit (default: `10s`)'
          in: query
          name: timeout
          required: false
          schema:
            description: 'Timeout waiting for process to exit (default: `10s`)'
            type: integer
      responses:
        '200':
          content:
            application/x-ndjson:
              example:
                - message: Signaling SIGTERM to process group 1847
                  pid: 1847
                  signal: SIGTERM
                  type: signal
                - message: Process exited
                  type: exited
                - exit_code: 0
                  type: complete
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ExecKillSignalEvent'
                  - $ref: '#/components/schemas/ExecKillTimeoutEvent'
                  - $ref: '#/components/schemas/ExecKillExitedEvent'
                  - $ref: '#/components/schemas/ExecKillKilledEvent'
                  - $ref: '#/components/schemas/ExecKillErrorEvent'
                  - $ref: '#/components/schemas/ExecKillCompleteEvent'
          description: Success - Streaming NDJSON response
        '404':
          description: Not Found - Resource not found
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  schemas:
    ExecKillSignalEvent:
      example:
        message: Signaling SIGTERM to process group 1847
        pid: 1847
        signal: SIGTERM
        type: signal
      properties:
        message:
          description: Status message
          type: string
        pid:
          description: Target process ID
          type: integer
        signal:
          description: Signal name (e.g., `SIGTERM`)
          type: string
        type:
          const: signal
          type: string
      required:
        - type
        - message
        - signal
        - pid
      type: object
    ExecKillTimeoutEvent:
      example:
        message: Timeout after 10s, sending SIGKILL
        type: timeout
      properties:
        message:
          description: Status message
          type: string
        type:
          const: timeout
          type: string
      required:
        - type
        - message
      type: object
    ExecKillExitedEvent:
      example:
        message: Process exited
        type: exited
      properties:
        message:
          description: Status message
          type: string
        type:
          const: exited
          type: string
      required:
        - type
        - message
      type: object
    ExecKillKilledEvent:
      example:
        message: Process killed
        type: killed
      properties:
        message:
          description: Status message
          type: string
        type:
          const: killed
          type: string
      required:
        - type
        - message
      type: object
    ExecKillErrorEvent:
      example:
        message: 'Warning: process may not have terminated'
        type: error
      properties:
        message:
          description: Error message
          type: string
        type:
          const: error
          type: string
      required:
        - type
        - message
      type: object
    ExecKillCompleteEvent:
      example:
        exit_code: 0
        type: complete
      properties:
        exit_code:
          description: Process exit code
          type: integer
        type:
          const: complete
          type: string
      required:
        - type
        - exit_code
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````