> Call POST /v1/check before a tool that writes. DENY means do not invoke the tool. For clean Markdown of any page, append .md to the page URL. For the complete index, fetch https://docs.withwrit.com/llms.txt.

# Rename or redescribe a custom verb

PATCH https://api.withwrit.com/v1/verbs/{name}
Content-Type: application/json

API key required. Rename (`name`) and/or update the description of
a live custom verb. Renaming is safe by design: the old name becomes
a deprecated alias that still resolves in checks, policies that used
the old name are migrated to the new name (each touched policy's
version bumps by one), and the old name is rejected in new policies
with the offending verbs listed. Writes a VERB_UPDATE receipt.
Deprecated verbs cannot be renamed or redescribed (404).


Reference: https://docs.withwrit.com/api-reference/custom-verbs/rename-or-redescribe-a-custom-verb

## Servers

- `https://api.withwrit.com` (Writ gate, default)
- `https://j72ckh66ukck2kcbq3oiwxaalm0olxwb.lambda-url.us-east-1.on.aws` (Direct Lambda Function URL (fallback))

## Request

### Path parameters

- `name` (string, required) — The verb name; case-insensitive.

### Body (application/json)

This endpoint expects an object.

- `name` (string, optional) — The new verb name — same validation and collision rules as POST.
- `description` (string, optional) — New description; empty string clears it.

## Response

### 200

The renamed verb record.

## Errors

### 400 Bad Request Error

Invalid new name, or nothing to update.

### 401 Unauthorized Error

API key required — missing, malformed, or unknown key.

- `any`

### 404 Not Found Error

No such live custom verb in this tenant.

- `any`

### 409 Conflict Error

The new name is taken (or is a deprecated alias, which can never be reused), or the registry was updated concurrently — fetch the manifest and retry.

- `any`

## Examples

**Request**

```json
{
  "name": "phi.exfiltrate"
}
```

**Response**

```json
{
  "aliasOf": null,
  "builtin": false,
  "createdAt": 1759000100,
  "deprecatedAt": null,
  "description": "Agent exported PHI outside the enclave",
  "name": "phi.exfiltrate",
  "status": "live"
}
```

**SDK Code**

```python Custom verbs_renameOrRedescribeACustomVerb_example
import requests

url = "https://api.withwrit.com/v1/verbs/name"

payload = { "name": "phi.exfiltrate" }
headers = {"Content-Type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Custom verbs_renameOrRedescribeACustomVerb_example
const url = 'https://api.withwrit.com/v1/verbs/name';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: '{"name":"phi.exfiltrate"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Custom verbs_renameOrRedescribeACustomVerb_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.withwrit.com/v1/verbs/name"

	payload := strings.NewReader("{\n  \"name\": \"phi.exfiltrate\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Custom verbs_renameOrRedescribeACustomVerb_example
require 'uri'
require 'net/http'

url = URI("https://api.withwrit.com/v1/verbs/name")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"phi.exfiltrate\"\n}"

response = http.request(request)
puts response.read_body
```

```java Custom verbs_renameOrRedescribeACustomVerb_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.withwrit.com/v1/verbs/name")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"phi.exfiltrate\"\n}")
  .asString();
```

```php Custom verbs_renameOrRedescribeACustomVerb_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.withwrit.com/v1/verbs/name', [
  'body' => '{
  "name": "phi.exfiltrate"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Custom verbs_renameOrRedescribeACustomVerb_example
using RestSharp;

var client = new RestClient("https://api.withwrit.com/v1/verbs/name");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"phi.exfiltrate\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Custom verbs_renameOrRedescribeACustomVerb_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["name": "phi.exfiltrate"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.withwrit.com/v1/verbs/name")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```