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

# Create an environment

> Creates a new isolated environment (e.g. sandbox, production).



## OpenAPI

````yaml post /v1/environments
openapi: 3.0.0
info:
  title: Revstack API
  version: 1.0.0
  description: >-
    Open Source Billing OS for Developers. The scalable, developer-first billing
    engine with subscriptions, invoicing, usage metering, and entitlements.
servers:
  - url: http://localhost:6900
    description: Revstack API (Local Development)
security: []
paths:
  /v1/environments:
    post:
      tags:
        - Environments
      summary: Create an environment
      description: Creates a new isolated environment (e.g. sandbox, production).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                slug:
                  type: string
                  minLength: 1
                is_default:
                  type: boolean
                  default: false
                project_id:
                  type: string
              required:
                - name
                - slug
      responses:
        '201':
          description: Environment created
          content:
            application/json:
              schema:
                nullable: true

````