---
title: "Rename a draft"
method: PATCH
path: "/agent/{id}/drafts/{draftId}"
tags: ["Agent Versioning - Drafts"]
---

# Rename a draft

`PATCH /agent/{id}/drafts/{draftId}`

Rename a draft. For config changes, use PATCH /agent/{id}/drafts/{draftId}/config instead.

## Path parameters

- `id` string, required
- `draftId` string, required

## Request body

- object
  - `draftName` string, required — New name for the draft (1–100 characters)

## Response `200`

Draft renamed successfully

- object
  - `status` boolean
  - `data` object
    - `draftName` string

## Other responses

- `400` — Invalid input
- `401` — Unauthorized access
- `403` — Forbidden access
- `404` — Agent or draft not found
- `500` — Internal server error

## Changes

- **2026-05-26** `5a6b4e19f353` — 1 breaking, 2 info
  - the `draftName` request property's minLength was increased from `0` to `1`
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`
- **2026-04-20** `801f1d220d57` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/smallest-inc/apis/agent-management-api/changes/agent/:id/drafts/:draftId/patch.md)

---

[API](https://skmtc.dev/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.dev/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/revisions/ee98cf1af6bc/schema)
