# update_environment

`tools/call` · `POST /agent/v1/environments:update`

Change an environment's slug, name, description or emoji. Only the fields given change; the class cannot. An archived environment cannot change. Returns the environment. Needs write access.

- Area: Catalog
- Needs the write grant. Idempotent.

## Inputs

- `environment` (string, required): The environment's slug, such as staging.
- `slug` (string): A new slug for the environment, such as preview.
- `name` (string): The environment's display name, up to 80 characters, such as Staging.
- `description` (nullable string): What the environment is for, up to 200 characters. null clears it.
- `emoji` (nullable string): An emoji shown with the name, up to 8 characters, such as 🧪. null clears it.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_environment",
    "arguments": {
      "environment": "staging",
      "description": "Release candidates with test data."
    }
  }
}
```

## HTTP request

The same call over the agent HTTP API, with an agent OAuth access token:

```bash
curl -X POST https://api.qa.clankership.net/agent/v1/environments:update \
  -H "Authorization: Bearer $CLANKER_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "environment": "staging",
    "description": "Release candidates with test data."
  }'
```
