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

# Set initialization workflow

> Sets which workflow the agent runs at launch, replacing the one set before, or clears the setting when `workflowID` is null. Only a workflow ID from the workflow list is accepted, and compiling the environment is what makes a test conversation use it.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json put /v1/stable/agent/initialization-workflow
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/agent/initialization-workflow:
    put:
      tags:
        - Agent
      summary: Set initialization workflow
      description: Sets which workflow the agent runs at launch, replacing the one set
        before, or clears the setting when `workflowID` is null. Only a workflow
        ID from the workflow list is accepted, and compiling the environment is
        what makes a test conversation use it.
      operationId: StableAgentController_setInitializationWorkflow
      parameters:
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StableAgentInitializationWorkflowRequest"
      responses:
        "200":
          description: Confirms which workflow now runs before the user's first turn, or
            that none does, and names the workflow it replaced when there was
            one.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableUpdateResponse"
          x-vf-doc:
            description: Confirms which workflow now runs before the user's first turn, or
              that none does, and names the workflow it replaced when there was
              one.
      security:
        - token: []
components:
  schemas:
    StableAgentInitializationWorkflowRequest:
      type: object
      properties:
        workflowID:
          nullable: true
          description: The workflow to run before the user's first turn, or null to run
            none.
          type: string
          minLength: 1
      required:
        - workflowID
      additionalProperties: false
    StableUpdateResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable message confirming the update.
      required:
        - message
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
