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

# List deployments for an environment



## OpenAPI

````yaml GET /v1/agents/{agentId}/deployments
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/deployments:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - Deployments
      summary: List deployments for an environment
      parameters:
        - name: environment
          in: query
          required: true
          schema:
            enum:
              - sandbox
              - pre-release
              - live
            type: string
          description: Environment to list deployments for (sandbox, pre-release, live)
        - name: limit
          in: query
          required: false
          schema:
            type: integer
          description: Max number of deployments to return
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDeploymentsResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized – missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden – insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    GetDeploymentsResponse:
      description: Deployments for the requested environment, ordered newest first.
      type: object
      properties:
        deployments:
          type: array
          items:
            $ref: '#/components/schemas/DeploymentResponse'
      required:
        - deployments
    Error:
      type: object
      description: Standard PolyAI API error envelope.
      required:
        - success
        - error
        - error_id
        - error_code
        - error_message
        - data
      properties:
        success:
          type: boolean
          description: Always false for error responses.
          example: false
        error:
          type: string
          description: Human-readable error message.
        error_id:
          type: string
          description: >-
            Unique request identifier from the X-PolyAI-Correlation-Id header.
            Include this when contacting support.
        error_code:
          type: string
          description: Machine-readable error code in UPPER_SNAKE_CASE.
        error_message:
          type: string
          description: Human-readable error message.
        data:
          nullable: true
          description: Always null for error responses.
    DeploymentResponse:
      description: |-
        A deployment of an agent version to a specific environment, plus
        who created it and when.
      type: object
      properties:
        id:
          description: Unique deployment identifier
          type: string
        accountId:
          description: Account this deployment belongs to
          type: string
        agentId:
          description: Agent (project) this deployment belongs to
          type: string
        environment:
          description: Environment (sandbox, pre-release, live)
          type: string
        artifactVersion:
          description: Artifact version reference
          type: string
        version:
          description: Version hash linking deployments across environments
          type: string
        createdBy:
          description: Email of user who created the deployment
          type: string
        createdAt:
          description: ISO 8601 timestamp of when the deployment was created
          type: string
        metadata:
          description: Deployment metadata (e.g. deployment_message)
          type: object
      required:
        - id
        - accountId
        - agentId
        - environment
        - artifactVersion
        - version
        - createdBy
        - createdAt
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````