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

# List deployments

> List all deployments for the authenticated environment, ordered by most recent first.



## OpenAPI

````yaml v3-openapi GET /api/v1/deployments
openapi: 3.1.0
info:
  title: Trigger.dev v3 REST API
  description: >-
    The REST API lets you trigger and manage runs on Trigger.dev. You can
    trigger a run, get the status of a run, and get the results of a run. 
  version: 2024-04
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.trigger.dev
    description: Trigger.dev API
security: []
paths:
  /api/v1/deployments:
    get:
      tags:
        - deployments
      summary: List deployments
      description: >-
        List deployments for the authenticated environment, ordered by most
        recent first.
      operationId: list_deployments_v1
      parameters:
        - in: query
          name: page[after]
          schema:
            type: string
          description: The deployment ID to start the search from, to get the next page.
        - in: query
          name: page[size]
          schema:
            type: integer
            minimum: 5
            maximum: 100
            default: 20
          description: The number of deployments to return (default 20, min 5, max 100).
        - in: query
          name: status
          schema:
            type: string
            enum:
              - PENDING
              - BUILDING
              - DEPLOYING
              - DEPLOYED
              - FAILED
              - CANCELED
              - TIMED_OUT
          description: Filter deployments by status.
        - in: query
          name: period
          schema:
            type: string
          description: Filter deployments created within this period (e.g. 1d, 7d, 3h).
        - in: query
          name: from
          schema:
            type: string
          description: Filter deployments created on or after this date (ISO 8601).
        - in: query
          name: to
          schema:
            type: string
          description: >-
            Filter deployments created on or before this date (ISO 8601). Only
            applied when `from` is also provided.
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The deployment ID
                        createdAt:
                          type: string
                          format: date-time
                          description: When the deployment was created
                        shortCode:
                          type: string
                          description: The short code for the deployment
                        version:
                          type: string
                          description: The deployment version (e.g., "20250228.1")
                        runtime:
                          type: string
                          nullable: true
                          description: The runtime used (e.g., "node")
                        runtimeVersion:
                          type: string
                          nullable: true
                          description: The runtime version
                        status:
                          type: string
                          enum:
                            - PENDING
                            - BUILDING
                            - DEPLOYING
                            - DEPLOYED
                            - FAILED
                            - CANCELED
                            - TIMED_OUT
                          description: The current status of the deployment
                        deployedAt:
                          type: string
                          format: date-time
                          nullable: true
                          description: When the deployment was promoted to DEPLOYED
                        git:
                          type: object
                          nullable: true
                          description: Git metadata associated with the deployment
                        error:
                          type: object
                          nullable: true
                          description: Error data if the deployment failed
                  pagination:
                    type: object
                    properties:
                      next:
                        type: string
                        description: >-
                          Cursor for the next page. Pass as `page[after]` to get
                          the next page. Omitted if there are no more results.
        '401':
          description: Unauthorized - Access token is missing or invalid
      security:
        - secretKey: []
      x-codeSamples:
        - lang: typescript
          source: |-
            const response = await fetch(
              "https://api.trigger.dev/api/v1/deployments",
              {
                method: "GET",
                headers: {
                  "Authorization": `Bearer ${secretKey}`,
                },
              }
            );
            const { data, pagination } = await response.json();
        - lang: curl
          source: |-
            curl -X GET "https://api.trigger.dev/api/v1/deployments" \
              -H "Authorization: Bearer tr_dev_1234"
components:
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >
        Use your project-specific Secret API key. Will start with `tr_dev_`,
        `tr_prod`, `tr_stg`, etc.


        You can find your Secret API key in the API Keys section of your
        Trigger.dev project dashboard.


        Our TypeScript SDK will default to using the value of the
        `TRIGGER_SECRET_KEY` environment variable if it is set. If you are using
        the SDK in a different environment, you can set the key using the
        `configure` function.


        ```typescript

        import { configure } from "@trigger.dev/sdk";


        configure({ accessToken: "tr_dev_1234" });

        ```

````