---
title: "Create environment"
method: POST
path: "/environments"
tags: ["accounts"]
---

# Create environment

`POST /environments`

## Request body

- CreateEnvironmentRequestBody
  - `environment_type` 'development' | 'production' | 'staging', required
  - `name` string, required

## Response `201`

Created

- object
  - `data` EnvironmentDetailResponseData, required
    - `api_keys` ApiKeyResponseData[], required
      - `created_at` string, date-time, required
      - `description` string, nullable
      - `environment` EnvironmentResponseData
        - `created_at` string, date-time, required
        - `environment_type` 'development' | 'production' | 'staging', required
        - `id` string, required
        - `name` string, required
        - `updated_at` string, date-time, required
      - `environment_id` string, nullable
      - `id` string, required
      - `integration` ApiKeyIntegrationResponseData
        - `id` string, required
        - `state` 'active' | 'created' | 'pending', required
        - `type` 'clerk' | 'metronome' | 'orb' | 'stripe' | 'unknown' | 'workos', required
      - `last_used_at` string, date-time, nullable
      - `name` string, required
      - `rate_limit_percent` integer, nullable
      - `readonly` boolean, required
      - `scopes` ApiKeyScope[], required
      - `updated_at` string, date-time, required
    - `created_at` string, date-time, required
    - `environment_type` 'development' | 'production' | 'staging', required
    - `id` string, required
    - `name` string, required
    - `updated_at` string, date-time, required
  - `params` object, required — Input parameters

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Server error

## Changes

- **2026-07-31** `76c074144d62` — 1 info
  - added the optional property `data/api_keys/items/rate_limit_percent` to the response with the `201` status
- **2026-06-05** `d5456e7d9462` — 1 warning
  - added the new `metronome` enum value to the `data/api_keys/items/integration/type` response property for the response status `201`
- **2026-05-29** `f35c9997b2fd` — 1 warning
  - added the new `workos` enum value to the `data/api_keys/items/integration/type` response property for the response status `201`

[Change history](https://skmtc.dev/schematichq/apis/schematic-api/changes/environments/post.md)

---

[API](https://skmtc.dev/schematichq/apis/schematic-api.md) · [All operations](https://skmtc.dev/schematichq/apis/schematic-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/schematichq/schematic-api/revisions/0b238e148fa1/schema)
