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

# PreStop Hook

> Kubernetes PreStop hook endpoint for graceful shutdown



## OpenAPI

````yaml post /v1/lifecycle/prestop
openapi: 3.0.0
info:
  title: Health and Lifecycle API
  description: API endpoints for health checks and lifecycle management
  version: 1.0.0
servers:
  - url: https://api.corebanq.com
    description: API server
security:
  - PreStopToken: []
tags:
  - name: Health
    description: Health check endpoints
  - name: Lifecycle
    description: Lifecycle management endpoints
paths:
  /v1/lifecycle/prestop:
    post:
      tags:
        - Lifecycle
      summary: PreStop Hook
      description: Kubernetes PreStop hook endpoint for graceful shutdown
      operationId: postPreStop
      parameters:
        - name: Accept-Language
          in: header
          required: false
          schema:
            type: string
            enum:
              - en
              - de
              - fr
              - it
      responses:
        '200':
          description: Shutdown signal accepted
          content:
            text/plain:
              schema:
                type: string
                example: Shutdown request received
        '401':
          description: Unauthorized - Invalid PreStop token
          content:
            text/plain:
              schema:
                type: string
                example: Unauthorized
        '403':
          description: Forbidden - Invalid IP address
          content:
            text/plain:
              schema:
                type: string
                example: 'Invalid IP address for preStop request: 1.2.3.4'
        '503':
          description: Server is already in shutdown process
          content:
            text/plain:
              schema:
                type: string
                example: Already shutting down
      security:
        - PreStopToken: []
components:
  securitySchemes:
    PreStopToken:
      type: apiKey
      name: X-PreStop-Token
      in: header
      description: Token for authenticating PreStop hook requests

````