Search the docs

Search guides, API endpoints and MCP tools.

Catalog

create_environment

Write grant

Create an environment: a place products run, such as staging or production. Its class says whether it holds real customer data and never changes. No other environment, archived ones included, may use the slug or name. Returns the new environment. Needs write access.

Inputs

slugstringRequired

The environment's slug: 2 to 48 lowercase letters, numbers or hyphens, such as staging.

namestringRequired

The environment's display name, up to 80 characters, such as Staging.

classstringRequired

production for real customer data or the live system customers use; non-production for fake or disposable data, such as staging. It cannot change later.

One ofproductionnon-production
descriptionstring

What the environment is for, up to 200 characters.

emojistring

An emoji shown with the name, up to 8 characters, such as 🧪.

tools/callJSON-RPC
{  "jsonrpc": "2.0",  "id": 1,  "method": "tools/call",  "params": {    "name": "create_environment",    "arguments": {      "slug": "staging",      "name": "Staging",      "class": "non-production",      "description": "Pre-release builds with test data.",      "emoji": "🧪"    }  }}
POST/agent/v1/environments:create
curl -X POST https://api.qa.clankership.net/agent/v1/environments:create \  -H "Authorization: Bearer $CLANKER_AGENT_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "slug": "staging",    "name": "Staging",    "class": "non-production",    "description": "Pre-release builds with test data.",    "emoji": "🧪"  }'
The same call over the agent HTTP API. Set CLANKER_AGENT_TOKEN to an agent OAuth access token.