# Update a plan (name, active and metadata only; pricing is immutable)

`PATCH /api/v1/plans/{id}`

At least one field is required. `metadata` replaces the stored object; it is not merged.

Needs the `catalog:write` scope, or a full-access key.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | required |  |

## Request body

JSON Schema:

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "active": {
      "type": "boolean"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "maxLength": 500
      },
      "description": "At most 20 keys; values up to 500 characters."
    }
  }
}
```

## Responses

### 200

The plan, as `GET /plans/{id}` returns it.

JSON Schema:

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        },
        "name": {
          "type": "string"
        },
        "active": {
          "type": "boolean"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "maxLength": 500
          },
          "description": "At most 20 keys; values up to 500 characters."
        }
      },
      "required": [
        "id",
        "name",
        "active",
        "metadata"
      ],
      "additionalProperties": {}
    },
    "_agent": {
      "type": "object",
      "properties": {
        "summary": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "ok"
          ]
        },
        "next_actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "summary",
        "status",
        "next_actions",
        "warnings"
      ]
    },
    "api_version": {
      "type": "string",
      "example": "2026-07-01"
    }
  },
  "required": [
    "data",
    "_agent",
    "api_version"
  ]
}
```
