> 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. # Submit a signed CI attestation manifest POST https://api.withwrit.com/v1/manifests Content-Type: application/json Accepts a manifest signed by the tenant's HMAC key. The signature is verified, the manifest stored as the latest for (tenant, repoId), and a drift analysis is computed vs the previous manifest. Drift includes new ungated sites, resolved sites, policy hash changes, and scanner version changes. Reference: https://docs.withwrit.com/api-reference/enforcement/submit-a-signed-ci-attestation-manifest ## 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. - `repoId` (string, required) - `manifest` (V1ManifestsPostRequestBodyContentApplicationJsonSchemaManifest, required) — \{repoId, commitSha, scannerVersion, findings, ungatedSites, policyFileHash, timestamp} - `signature` (string, required) — HMAC-SHA256 hex signature ## Response ### 200 Signature verification failed. - `ok` (boolean, optional) - `reason` (string, optional) ### 201 Manifest accepted and drift computed. - `ok` (boolean, optional) - `repoId` (string, optional) - `drift` (V1ManifestsPostResponsesContentApplicationJsonSchemaDrift, optional) - `createdAt` (integer, optional) ## Types ### V1ManifestsPostRequestBodyContentApplicationJsonSchemaManifest \{repoId, commitSha, scannerVersion, findings, ungatedSites, policyFileHash, timestamp} ### V1ManifestsPostResponsesContentApplicationJsonSchemaDrift - `newUngatedSites` (list of any, optional) - `resolvedSites` (list of any, optional) - `policyHashChanged` (boolean, optional) - `scannerVersionChanged` (boolean, optional) ## Examples ### Example 1 **Request** ```json { "repoId": "string", "signature": "string" } ``` **Response** ```json { "ok": true, "reason": "string" } ``` **SDK Code** ```python import requests url = "https://api.withwrit.com/v1/manifests" payload = { "repoId": "string", "signature": "string" } headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.withwrit.com/v1/manifests'; const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"repoId":"string","signature":"string"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.withwrit.com/v1/manifests" payload := strings.NewReader("{\n \"repoId\": \"string\",\n \"signature\": \"string\"\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 require 'uri' require 'net/http' url = URI("https://api.withwrit.com/v1/manifests") 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 \"repoId\": \"string\",\n \"signature\": \"string\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.withwrit.com/v1/manifests") .header("Content-Type", "application/json") .body("{\n \"repoId\": \"string\",\n \"signature\": \"string\"\n}") .asString(); ``` ```php request('POST', 'https://api.withwrit.com/v1/manifests', [ 'body' => '{ "repoId": "string", "signature": "string" }', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.withwrit.com/v1/manifests"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"repoId\": \"string\",\n \"signature\": \"string\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [ "repoId": "string", "signature": "string" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.withwrit.com/v1/manifests")! 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() ``` ### Example 2 **Request** ```json { "repoId": "string", "signature": "string" } ``` **Response** ```json { "ok": true, "reason": "string" } ``` **SDK Code** ```python import requests url = "https://api.withwrit.com/v1/manifests" payload = { "repoId": "string", "signature": "string" } headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.withwrit.com/v1/manifests'; const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"repoId":"string","signature":"string"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.withwrit.com/v1/manifests" payload := strings.NewReader("{\n \"repoId\": \"string\",\n \"signature\": \"string\"\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 require 'uri' require 'net/http' url = URI("https://api.withwrit.com/v1/manifests") 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 \"repoId\": \"string\",\n \"signature\": \"string\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.withwrit.com/v1/manifests") .header("Content-Type", "application/json") .body("{\n \"repoId\": \"string\",\n \"signature\": \"string\"\n}") .asString(); ``` ```php request('POST', 'https://api.withwrit.com/v1/manifests', [ 'body' => '{ "repoId": "string", "signature": "string" }', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.withwrit.com/v1/manifests"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"repoId\": \"string\",\n \"signature\": \"string\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [ "repoId": "string", "signature": "string" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.withwrit.com/v1/manifests")! 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() ```