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

# Generate an unsaved scenario draft from a captured session



## OpenAPI

````yaml /api-reference/openapi.json post /v1/scenarios/draft-from-session
openapi: 3.1.0
info:
  title: Feather API
  description: >-
    Unified customer experience platform API. Manages identity, conversations,
    memory, agents, procedures, policies, model routing, knowledge bases,
    integrations, and runtime execution.
  version: 1.21.0
servers:
  - url: https://api-sandbox.featherhq.com
    description: Sandbox
  - url: http://localhost:8000
    description: Local dev
security: []
paths:
  /v1/scenarios/draft-from-session:
    post:
      tags:
        - scenarios
      summary: Generate an unsaved scenario draft from a captured session
      operationId: draftScenarioFromSession
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScenarioDraftFromSessionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDraft'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ScenarioDraftFromSessionRequest:
      properties:
        session_id:
          type: string
          format: uuid
          title: Session Id
      type: object
      required:
        - session_id
      title: ScenarioDraftFromSessionRequest
    ScenarioDraft:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        intent:
          type: string
          maxLength: 500
          minLength: 1
          title: Intent
        journey:
          type: string
          maxLength: 20000
          title: Journey
          default: ''
        mock_world:
          additionalProperties: true
          type: object
          title: Mock World
        source:
          $ref: '#/components/schemas/ScenarioSource'
          default: manual
        source_brief:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Source Brief
        source_agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Agent Id
        source_persona_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Persona Id
        tags:
          items:
            type: string
          type: array
          title: Tags
        agent_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Agent Ids
        source_agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Agent Name
        source_persona_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Persona Name
      type: object
      required:
        - name
        - intent
      title: ScenarioDraft
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response returned by all API error handlers.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ScenarioSource:
      type: string
      enum:
        - manual
        - drafted
      title: ScenarioSource
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````