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

# Edit the plan

> Edit the generated plan while the simulation is in status `planned`.



## OpenAPI

````yaml https://api.semilattice.ai/openapi.json patch /v1/simulations/{simulation_id}/plan
openapi: 3.1.0
info:
  title: Semilattice API
  description: API for human behaviour simulation.
  contact:
    name: Semilattice API
    url: https://semilattice.ai/
    email: support@semilattice.ai
  version: v1.0.0
servers: []
security: []
paths:
  /v1/simulations/{simulation_id}/plan:
    patch:
      tags:
        - Simulations
      summary: Edit the plan
      description: Edit the generated plan while the simulation is in status `planned`.
      operationId: update_plan_route_v1_simulations__simulation_id__plan_patch
      parameters:
        - name: simulation_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Simulation Id
        - name: authorization
          in: header
          required: false
          schema:
            type: string
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePlanBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdatePlanBody:
      properties:
        question_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Question Text
        hypothesis_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Hypothesis Text
        survey_questions:
          anyOf:
            - items:
                $ref: '#/components/schemas/SurveyQuestionIn'
              type: array
            - type: 'null'
          title: Survey Questions
        journey_task:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Journey Task
      type: object
      title: UpdatePlanBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SurveyQuestionIn:
      properties:
        question_text:
          type: string
          title: Question Text
        question_type:
          type: string
          title: Question Type
          default: single_choice
        answer_options:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Answer Options
        insight:
          anyOf:
            - type: string
            - type: 'null'
          title: Insight
        variable_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Variable Name
      type: object
      required:
        - question_text
      title: SurveyQuestionIn
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````