> 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. # Define a custom verb POST https://api.withwrit.com/v1/verbs Content-Type: application/json API key required. Adds a tenant-specific verb to the vocabulary so the tenant's own domain language (e.g. `phi.export`, `trade.settle`) can carry policy. Names are lowercase domain.action-style: 1–64 characters of letters, digits, dots, and underscores, with at least one dot — bare words are reserved for built-in verbs. A name may not collide with a built-in verb (case-insensitive) or an existing custom verb. A custom verb can be used in verb policies the moment it is created. Writes a VERB_CREATE receipt. Limited to 200 verbs per tenant, including deprecated ones. Reference: https://docs.withwrit.com/api-reference/custom-verbs/define-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 ### Body (application/json) This endpoint expects an object. - `name` (string, required) — The verb name, e.g. phi.export. Stored lowercase. - `description` (string, optional) — What the verb means — shown in the dashboard and docs. ## Response ### 201 The created verb record. ## Errors ### 400 Bad Request Error Invalid name or a built-in collision. ### 401 Unauthorized Error API key required — missing, malformed, or unknown key. - `any` ### 409 Conflict Error The 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.export", "description": "Agent exported PHI outside the enclave" } ``` **Response** ```json { "aliasOf": null, "builtin": false, "createdAt": 1759000000, "deprecatedAt": null, "description": "Agent exported PHI outside the enclave", "name": "phi.export", "status": "live" } ``` **SDK Code** ```python Custom verbs_defineACustomVerb_example import requests url = "https://api.withwrit.com/v1/verbs" payload = { "name": "phi.export", "description": "Agent exported PHI outside the enclave" } headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Custom verbs_defineACustomVerb_example const url = 'https://api.withwrit.com/v1/verbs'; const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"phi.export","description":"Agent exported PHI outside the enclave"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Custom verbs_defineACustomVerb_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.withwrit.com/v1/verbs" payload := strings.NewReader("{\n \"name\": \"phi.export\",\n \"description\": \"Agent exported PHI outside the enclave\"\n}") req, _ := http.NewRequest("POST", 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_defineACustomVerb_example require 'uri' require 'net/http' url = URI("https://api.withwrit.com/v1/verbs") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "{\n \"name\": \"phi.export\",\n \"description\": \"Agent exported PHI outside the enclave\"\n}" response = http.request(request) puts response.read_body ``` ```java Custom verbs_defineACustomVerb_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.withwrit.com/v1/verbs") .header("Content-Type", "application/json") .body("{\n \"name\": \"phi.export\",\n \"description\": \"Agent exported PHI outside the enclave\"\n}") .asString(); ``` ```php Custom verbs_defineACustomVerb_example request('POST', 'https://api.withwrit.com/v1/verbs', [ 'body' => '{ "name": "phi.export", "description": "Agent exported PHI outside the enclave" }', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Custom verbs_defineACustomVerb_example using RestSharp; var client = new RestClient("https://api.withwrit.com/v1/verbs"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"name\": \"phi.export\",\n \"description\": \"Agent exported PHI outside the enclave\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Custom verbs_defineACustomVerb_example import Foundation let headers = ["Content-Type": "application/json"] let parameters = [ "name": "phi.export", "description": "Agent exported PHI outside the enclave" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.withwrit.com/v1/verbs")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ```