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

# Update environment for prompt template version

> 
Deploy a prompt version to one or more environments. Use to promote versions through dev, staging, and production.



## OpenAPI

````yaml https://app.freeplay.ai/openapi.json post /api/v2/projects/{project_id}/prompt-templates/id/{template_id}/versions/{version_id}/environments
openapi: 3.1.0
info:
  title: Freeplay API
  version: 0.1.0
servers: []
security:
  - BearerAuth: []
paths:
  /api/v2/projects/{project_id}/prompt-templates/id/{template_id}/versions/{version_id}/environments:
    post:
      tags:
        - Prompt Templates
      summary: Update environment for prompt template version
      description: >-

        Deploy a prompt version to one or more environments. Use to promote
        versions through dev, staging, and production.
      operationId: post_update_template_version_environments
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: template_id
          in: path
          required: true
          schema:
            type: string
        - name: version_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                environments:
                  items:
                    type: string
                  title: Environments
                  type: array
              required:
                - environments
              title: UpdateTemplateVersionEnvironmentsRequest
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties: {}
                title: EmptyResponse
                type: object
          description: EmptyResponse()
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````