For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDashboard
Getting StartedAPI ReferenceRoadmapBlog
Getting StartedAPI ReferenceRoadmapBlog
    • Resources
    • Authentication
    • Pagination
    • Rate limiting
  • API Keys
    • GETList api keys
    • GETGet api key
    • POSTCreate api key
    • PUTUpdate api key
    • DELDelete api key
  • Environments
    • POSTCreate environment
    • PUTUpdate environment
    • DELDelete environment
  • Plans
    • The Plan object
    • GETList plans
    • GETGet plan
    • POSTCreate plan
    • PUTUpdate plan
    • DELDelete plan
  • Companies
    • The Company object
    • GETList companies
    • POSTUpsert company
    • GETLookup company
    • DELDelete company
    • POSTDelete company by keys
    • GETList company memberships
    • POSTGet or create company membership
    • DELDelete company membership
    • POSTUpsert company trait
  • Users
    • The User object
    • GETList users
    • GETLookup user
    • POSTUpsert user
    • DELDelete user
    • POSTDelete user by keys
    • POSTUpsert user trait
  • Events
    • The Event object
    • GETList events
    • POSTCreate event
    • POSTCreate event batch
    • GETGet event
  • Features
    • The Feature object
    • GETList features
    • GETGet feature
    • POSTCreate feature
    • PUTUpdate feature
    • DELDelete feature
  • Flags
    • The Flag object
    • GETList flags
    • GETGet flag
    • POSTCreate flag
    • PUTUpdate flag
    • DELDelete flag
    • PUTUpdate flag rules
    • POSTCheck flag
    • POSTCheck flags
  • Entitlements
    • GETList company overrides
    • GETGet company override
    • POSTCreate company override
    • PUTUpdate company override
    • DELDelete company override
    • GETList plan entitlements
    • GETGet plan entitlement
    • POSTCreate plan entitlement
    • PUTUpdate plan entitlement
    • DELDelete plan entitlement
  • Feature Usage
    • GETList feature usage
  • Billing Credits
    • GETList credits
    • POSTCreate credit
    • GETGet credit
    • PUTUpdate credit
    • DELDelete credit
    • GETList credit bundles
    • POSTCreate credit bundle
    • GETGet credit bundle
    • PUTUpdate credit bundle
    • DELDelete credit bundle
    • POSTGrant credits to company
    • GETList company credit grants
    • GETList credit grants
    • PUTZero out credit grant
    • GETList plan credit grants
    • POSTCreate plan credit grant
    • DELDelete plan credit grant
    • GETGet credit ledger
  • Account Members
    • GETList account members
    • GETGet account member
LogoLogo
SupportDashboard
Environments

Create environment

POST
https://api.schematichq.com/environments
POST
/environments
1import { SchematicClient } from "@schematichq/schematic-typescript-node";
2
3async function main() {
4 const client = new SchematicClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.accounts.createEnvironment({
8 environmentType: "development",
9 name: "Dev Environment Alpha",
10 });
11}
12main();
1{
2 "data": {
3 "api_keys": [
4 {
5 "created_at": "2024-04-10T08:45:00Z",
6 "id": "key_abcdef1234567890",
7 "name": "Dev API Key 1",
8 "readonly": true,
9 "scopes": [
10 "admin"
11 ],
12 "updated_at": "2024-04-10T08:45:00Z",
13 "description": "Primary API key for development environment",
14 "environment": {
15 "created_at": "2024-04-10T08:45:00Z",
16 "environment_type": "development",
17 "id": "env_1234567890abcdef",
18 "name": "Dev Environment Alpha",
19 "updated_at": "2024-04-10T08:45:00Z"
20 },
21 "environment_id": "env_1234567890abcdef",
22 "integration": {
23 "id": "int_clerk_001",
24 "state": "active",
25 "type": "clerk"
26 },
27 "last_used_at": "2024-04-15T12:00:00Z"
28 }
29 ],
30 "created_at": "2024-04-10T08:45:00Z",
31 "environment_type": "development",
32 "id": "env_1234567890abcdef",
33 "name": "Dev Environment Alpha",
34 "updated_at": "2024-04-10T08:45:00Z"
35 },
36 "params": {}
37}
Was this page helpful?
Previous

Update environment

Next
Built with

Authentication

X-Schematic-Api-Keystring
API Key authentication via header

Request

This endpoint expects an object.
environment_typeenumRequired
Allowed values:
namestringRequired1-256 characters

Response

Created
dataobject
paramsobject
Input parameters

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error