contentstack Environments API

Endpoints for managing deployment environments (e.g., production, staging) within a stack.

Operations 7

GET /environments Get all environments #
GET /projects/{project_uid}/environments Get all environments #
POST /projects/{project_uid}/environments Create an environment #
GET /projects/{project_uid}/environments/{env_uid} Get an environment #
PUT /projects/{project_uid}/environments/{env_uid} Update an environment #
DELETE /projects/{project_uid}/environments/{env_uid} Delete an environment #
POST /projects/{project_uid}/environments/{env_uid}/revalidate-cache Revalidate CDN cache #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/contentstack-environments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

contentstack-environments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Contentstack Environments API
  contact:
    name: Contentstack Support
    url: https://www.contentstack.com/contact
  termsOfService: https://www.contentstack.com/legal/terms-of-service
  version: '1.0'
  description: 'Operations tagged Environments across 2 of this provider''s published API definitions: contentstack-content-management-api-openapi.yml, contentstack-launch-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.contentstack.io/v3
  description: AWS North America Production Server
- url: https://eu-api.contentstack.com/v3
  description: AWS Europe Production Server
- url: https://au-api.contentstack.com/v3
  description: AWS Australia Production Server
- url: https://azure-na-api.contentstack.com/v3
  description: Azure North America Production Server
- url: https://azure-eu-api.contentstack.com/v3
  description: Azure Europe Production Server
- url: https://launch-api.contentstack.com
  description: AWS North America Production Server
- url: https://eu-launch-api.contentstack.com
  description: AWS Europe Production Server
- url: https://au-launch-api.contentstack.com
  description: AWS Australia Production Server
- url: https://azure-na-launch-api.contentstack.com
  description: Azure North America Production Server
- url: https://azure-eu-launch-api.contentstack.com
  description: Azure Europe Production Server
tags:
- name: Environments
  description: Endpoints for managing deployment environments (e.g., production, staging) within a stack.
paths:
  /environments:
    get:
      operationId: getAllEnvironments
      summary: Get all environments
      description: Retrieves all deployment environments configured for the stack, such as production, staging, and development.
      tags:
      - Environments
      parameters:
      - $ref: '#/components/parameters/StackApiKey'
      - $ref: '#/components/parameters/AuthToken'
      responses:
        '200':
          description: A list of environments in the stack.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentList'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - authtokenAuth: []
      - managementTokenAuth: []
    servers:
    - url: https://api.contentstack.io/v3
      description: AWS North America Production Server
    - url: https://eu-api.contentstack.com/v3
      description: AWS Europe Production Server
    - url: https://au-api.contentstack.com/v3
      description: AWS Australia Production Server
    - url: https://azure-na-api.contentstack.com/v3
      description: Azure North America Production Server
    - url: https://azure-eu-api.contentstack.com/v3
      description: Azure Europe Production Server
  /projects/{project_uid}/environments:
    get:
      operationId: getAllEnvironments
      summary: Get all environments
      description: Retrieves all deployment environments configured for a Launch project, including their domain configurations and current deployment status.
      tags:
      - Environments
      parameters:
      - $ref: '#/components/parameters/ProjectUid'
      responses:
        '200':
          description: A list of environments for the project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentList_2'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - bearerAuth: []
      - authtokenAuth: []
    post:
      operationId: createEnvironment
      summary: Create an environment
      description: Creates a new deployment environment for a Launch project. Each environment can have its own domain, build configuration, and deployment settings.
      tags:
      - Environments
      parameters:
      - $ref: '#/components/parameters/ProjectUid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnvironmentRequest'
      responses:
        '201':
          description: The newly created environment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Environment_2'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - bearerAuth: []
      - authtokenAuth: []
    servers:
    - url: https://launch-api.contentstack.com
      description: AWS North America Production Server
    - url: https://eu-launch-api.contentstack.com
      description: AWS Europe Production Server
    - url: https://au-launch-api.contentstack.com
      description: AWS Australia Production Server
    - url: https://azure-na-launch-api.contentstack.com
      description: Azure North America Production Server
    - url: https://azure-eu-launch-api.contentstack.com
      description: Azure Europe Production Server
  /projects/{project_uid}/environments/{env_uid}:
    get:
      operationId: getEnvironment
      summary: Get an environment
      description: Retrieves details for a specific deployment environment including its domain configuration, framework settings, and latest deployment status.
      tags:
      - Environments
      parameters:
      - $ref: '#/components/parameters/ProjectUid'
      - $ref: '#/components/parameters/EnvUid'
      responses:
        '200':
          description: The requested environment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Environment_2'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
      - bearerAuth: []
      - authtokenAuth: []
    put:
      operationId: updateEnvironment
      summary: Update an environment
      description: Updates the configuration of a deployment environment such as domain settings or build configuration.
      tags:
      - Environments
      parameters:
      - $ref: '#/components/parameters/ProjectUid'
      - $ref: '#/components/parameters/EnvUid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnvironmentRequest'
      responses:
        '200':
          description: The updated environment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Environment_2'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - bearerAuth: []
      - authtokenAuth: []
    delete:
      operationId: deleteEnvironment
      summary: Delete an environment
      description: Permanently deletes a deployment environment and its deployment history. This action is irreversible.
      tags:
      - Environments
      parameters:
      - $ref: '#/components/parameters/ProjectUid'
      - $ref: '#/components/parameters/EnvUid'
      responses:
        '200':
          description: Environment deleted successfully.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
      - bearerAuth: []
      - authtokenAuth: []
    servers:
    - url: https://launch-api.contentstack.com
      description: AWS North America Production Server
    - url: https://eu-launch-api.contentstack.com
      description: AWS Europe Production Server
    - url: https://au-launch-api.contentstack.com
      description: AWS Australia Production Server
    - url: https://azure-na-launch-api.contentstack.com
      description: Azure North America Production Server
    - url: https://azure-eu-launch-api.contentstack.com
      description: Azure Europe Production Server
  /projects/{project_uid}/environments/{env_uid}/revalidate-cache:
    post:
      operationId: revalidateCache
      summary: Revalidate CDN cache
      description: Triggers a CDN cache revalidation for the specified environment, forcing the CDN to fetch fresh content on the next request. Subject to cache revalidation quota limits per organization.
      tags:
      - Environments
      parameters:
      - $ref: '#/components/parameters/ProjectUid'
      - $ref: '#/components/parameters/EnvUid'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                paths:
                  type: array
                  description: Specific URL paths to revalidate. If empty, all paths are revalidated.
                  items:
                    type: string
      responses:
        '200':
          description: Cache revalidation triggered successfully.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
      - bearerAuth: []
      - authtokenAuth: []
    servers:
    - url: https://launch-api.contentstack.com
      description: AWS North America Production Server
    - url: https://eu-launch-api.contentstack.com
      description: AWS Europe Production Server
    - url: https://au-launch-api.contentstack.com
      description: AWS Australia Production Server
    - url: https://azure-na-launch-api.contentstack.com
      description: Azure North America Production Server
    - url: https://azure-eu-launch-api.contentstack.com
      description: Azure Europe Production Server
components:
  schemas:
    EnvironmentList:
      type: object
      description: A list of deployment environments.
      properties:
        environments:
          type: array
          description: Array of environment objects.
          items:
            $ref: '#/components/schemas/Environment'
    Environment:
      type: object
      description: A deployment environment for publishing content.
      properties:
        uid:
          type: string
          description: Unique identifier of the environment.
        name:
          type: string
          description: Display name of the environment.
        urls:
          type: array
          description: List of URL configurations for the environment.
          items:
            type: object
            properties:
              url:
                type: string
                format: uri
                description: The URL for the environment.
              locale:
                type: string
                description: The locale associated with this URL.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the environment was created.
    Error:
      type: object
      description: Standard error response.
      properties:
        error_message:
          type: string
          description: Human-readable description of the error.
        error_code:
          type: integer
          description: Numeric error code.
        errors:
          type: object
          description: Field-level validation errors.
    EnvironmentList_2:
      type: object
      description: A list of deployment environments.
      properties:
        data:
          type: array
          description: Array of environment objects.
          items:
            $ref: '#/components/schemas/Environment_2'
    CreateEnvironmentRequest:
      type: object
      description: Parameters for creating or updating an environment.
      required:
      - name
      properties:
        name:
          type: string
          description: Display name for the environment.
        domain:
          type: string
          description: Custom domain for the environment.
    Environment_2:
      type: object
      description: A deployment environment within a Launch project.
      properties:
        uid:
          type: string
          description: Unique identifier of the environment.
        name:
          type: string
          description: Display name of the environment.
        domain:
          type: string
          description: The custom domain assigned to this environment.
        status:
          type: string
          description: Current status of the environment.
          enum:
          - active
          - inactive
          - deploying
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the environment was created.
    Error_2:
      type: object
      description: Standard error response.
      properties:
        message:
          type: string
          description: Human-readable description of the error.
        error_code:
          type: integer
          description: Numeric error code.
  responses:
    Unauthorized:
      description: Authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error_2'
    BadRequest:
      description: The request is malformed or contains invalid parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error_2'
  parameters:
    StackApiKey:
      name: api_key
      in: header
      required: true
      description: The API key identifying the Contentstack stack.
      schema:
        type: string
    AuthToken:
      name: authtoken
      in: header
      required: false
      description: User session token for authentication. Required if not using management token.
      schema:
        type: string
    ProjectUid:
      name: project_uid
      in: path
      required: true
      description: The unique identifier of the Launch project.
      schema:
        type: string
    EnvUid:
      name: env_uid
      in: path
      required: true
      description: The unique identifier of the deployment environment.
      schema:
        type: string
  securitySchemes:
    authtokenAuth:
      type: apiKey
      in: header
      name: authtoken
      description: User session token obtained from the login endpoint.
    managementTokenAuth:
      type: apiKey
      in: header
      name: authorization
      description: Management token in the format "Bearer {management_token}" for server-to-server authentication without user sessions.
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.0 Bearer token with launch:manage or launch.projects scopes.
x-refined-from:
- contentstack-content-management-api-openapi.yml
- contentstack-launch-api-openapi.yml