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

# Delete a context

> **Not implemented.** Returns 501. Reserved for future use.




## OpenAPI

````yaml /openapi/private/specs/services/context.yml delete /context/{context_id}
openapi: 3.1.0
info:
  title: Context Service API
  description: >
    Manages context data for council sages. Context represents the job
    description,

    role, and AI-generated analysis (summary, categories, metrics) used during

    screening interviews.


    ## Authentication

    All endpoints require authentication via one of two methods:

    - **API Key**: Pass the key in the `X-Auth` header (service-to-service
    calls)

    - **JWT Token**: Pass a Bearer token in the `Authorization` header
    (user-facing calls)


    The required permission level is noted per endpoint.


    ## Context Lifecycle

    1. **Create** -- Context is created with job description, role, and role
    level

    2. **Store** -- Context is saved to Redis for fast retrieval during
    screening

    3. **Generate** -- AI analyzes the context to produce summary, categories,
    and metrics

    4. **Save** -- Generated data is persisted to the Prompt Library (PL)
    service


    ## Business Rules

    - Context is stored in Redis for low-latency access during interviews

    - `context_id` must be provided and valid for all read operations

    - The generate endpoint calls AI to produce structured analysis from the job
    context

    - Update and Delete endpoints are not yet implemented (return 501)
  version: 1.0.0
  contact:
    name: Platform Team
servers:
  - url: '{protocol}://{host}:{port}'
    description: Context Service
    variables:
      protocol:
        default: https
        enum:
          - http
          - https
      host:
        default: localhost
      port:
        default: '5000'
security: []
tags:
  - name: Context
    description: Context CRUD and AI generation
  - name: Service
    description: Health checks and initialization
paths:
  /context/{context_id}:
    delete:
      tags:
        - Context
      summary: Delete a context
      description: |
        **Not implemented.** Returns 501. Reserved for future use.
      operationId: deleteContext
      parameters:
        - $ref: '#/components/parameters/ContextId'
        - $ref: '#/components/parameters/RequiredPermission_admin_sage'
      responses:
        '401':
          $ref: '#/components/responses/Unauthorized'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              example:
                message: Not Implemented
      security:
        - jwtAuth: []
components:
  parameters:
    ContextId:
      name: context_id
      in: path
      required: true
      description: UUID of the context record
      schema:
        type: string
        format: uuid
      example: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
    RequiredPermission_admin_sage:
      name: X-Permission-Info
      in: header
      required: false
      description: >-
        **Required JWT permission: `admin_sage`** (informational only --
        enforced server-side)
      schema:
        type: string
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            noApiKey:
              summary: Missing API key
              value:
                error: Unauthorized - API key required
            invalidApiKey:
              summary: Invalid API key
              value:
                error: Unauthorized - Invalid API key
            noToken:
              summary: Missing JWT token
              value:
                error: Unauthorized - No valid token
            invalidToken:
              summary: Invalid or expired JWT
              value:
                error: Unauthorized3
            insufficientPermissions:
              summary: Token lacks required permission
              value:
                error: Unauthorized4
  schemas:
    MessageResponse:
      type: object
      properties:
        message:
          type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: User JWT token passed in Authorization header

````