> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.cable.tech/v-2-0/api-documentation/api-reference/risk-assessment/update-risk-assessments/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cable.tech/_mcp/server. # Update risk assessment in batch PUT https://api.cable.tech/v2/risk_assessment Content-Type: application/json Reference: https://docs.cable.tech/api-documentation/api-reference/risk-assessment/update-risk-assessments ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Body (application/json) This endpoint expects a list of RiskAssessment. - `list of RiskAssessment` ## Response ### 200 Risk assessment updated successfully - `success` (boolean, required) — Indicates if the write operation was successful. - `write_count` (integer, required) — The number of records written to the database. - `message` (string, required) — Provides additional information about the operation result. - `organization_id` (string, required) — The organization ID for which the operation was performed. ## Errors ### 400 Bad Request Error Invalid risk assessment data - `code` (integer, required) - `message` (string, required) - `errors` (list of GeneralErrorErrorsItems, optional) — Detailed information about errors in specific fields. ### 401 Unauthorized Error Unauthorized request - `code` (integer, required) - `message` (string, required) - `errors` (list of GeneralErrorErrorsItems, optional) — Detailed information about errors in specific fields. ### 404 Not Found Error Risk assessment not found - `code` (integer, required) - `message` (string, required) - `errors` (list of GeneralErrorErrorsItems, optional) — Detailed information about errors in specific fields. ### 429 Too Many Requests Error Rate limit exceeded - `code` (integer, required) - `message` (string, required) - `errors` (list of GeneralErrorErrorsItems, optional) — Detailed information about errors in specific fields. ### 500 Internal Server Error Server error - `code` (integer, required) - `message` (string, required) - `errors` (list of GeneralErrorErrorsItems, optional) — Detailed information about errors in specific fields. ## Types ### RiskAssessment Request body for adding risk assessment information for a parent entity, applicable to both retail and business contexts - `assessment_id` (string, required) — Unique identifier for a risk assessment belonging to a risk assessment. This is the primary key for a risk assessment and should be unique across all risk assessments. Updates to a risk assessment should be made using this identifier. - `timestamp` (datetime, required) — When the risk assessment was performed, not when reported to Cable. Use ISO 8601 format. - `type` (string, required) — Type of risk assessment (e.g., pre-onboarding risk rating, risk band, risk engine score) - `outcome` (string, required) — The outcome of the assessment. One of: LOW, MEDIUM, HIGH, CRITICAL - `related_company_id` (string, optional) — Unique identifier of the related company entity (used for business contexts). Only one of related_company_id and related_person_id can be specified. - `related_person_id` (string, optional) — Unique identifier of the related person entity (used for retail contexts or when a person is the subject). Only one of related_company_id and related_person_id can be specified. ### GeneralErrorErrorsItems - `field` (string, optional) - `message` (string, optional) ## Examples **Request** ```json [ { "assessment_id": "ra-9f8b7c6d5e4a3b2c1d0e", "timestamp": "2024-01-15T09:30:00Z", "type": "onboarding risk band", "outcome": [ "MEDIUM" ] } ] ``` **Response** ```json { "success": true, "write_count": 1, "message": "Risk assessment updated successfully.", "organization_id": "org-1234567890abcdef" } ``` **SDK Code** ```python import requests url = "https://api.cable.tech/v2/risk_assessment" payload = [ { "assessment_id": "ra-9f8b7c6d5e4a3b2c1d0e", "timestamp": "2024-01-15T09:30:00Z", "type": "onboarding risk band", "outcome": ["MEDIUM"] } ] headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.cable.tech/v2/risk_assessment'; const options = { method: 'PUT', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '[{"assessment_id":"ra-9f8b7c6d5e4a3b2c1d0e","timestamp":"2024-01-15T09:30:00Z","type":"onboarding risk band","outcome":["MEDIUM"]}]' }; 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.cable.tech/v2/risk_assessment" payload := strings.NewReader("[\n {\n \"assessment_id\": \"ra-9f8b7c6d5e4a3b2c1d0e\",\n \"timestamp\": \"2024-01-15T09:30:00Z\",\n \"type\": \"onboarding risk band\",\n \"outcome\": [\n \"MEDIUM\"\n ]\n }\n]") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("Authorization", "Bearer ") 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.cable.tech/v2/risk_assessment") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "[\n {\n \"assessment_id\": \"ra-9f8b7c6d5e4a3b2c1d0e\",\n \"timestamp\": \"2024-01-15T09:30:00Z\",\n \"type\": \"onboarding risk band\",\n \"outcome\": [\n \"MEDIUM\"\n ]\n }\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.put("https://api.cable.tech/v2/risk_assessment") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("[\n {\n \"assessment_id\": \"ra-9f8b7c6d5e4a3b2c1d0e\",\n \"timestamp\": \"2024-01-15T09:30:00Z\",\n \"type\": \"onboarding risk band\",\n \"outcome\": [\n \"MEDIUM\"\n ]\n }\n]") .asString(); ``` ```php request('PUT', 'https://api.cable.tech/v2/risk_assessment', [ 'body' => '[ { "assessment_id": "ra-9f8b7c6d5e4a3b2c1d0e", "timestamp": "2024-01-15T09:30:00Z", "type": "onboarding risk band", "outcome": [ "MEDIUM" ] } ]', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.cable.tech/v2/risk_assessment"); var request = new RestRequest(Method.PUT); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "[\n {\n \"assessment_id\": \"ra-9f8b7c6d5e4a3b2c1d0e\",\n \"timestamp\": \"2024-01-15T09:30:00Z\",\n \"type\": \"onboarding risk band\",\n \"outcome\": [\n \"MEDIUM\"\n ]\n }\n]", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ [ "assessment_id": "ra-9f8b7c6d5e4a3b2c1d0e", "timestamp": "2024-01-15T09:30:00Z", "type": "onboarding risk band", "outcome": ["MEDIUM"] ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.cable.tech/v2/risk_assessment")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" 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() ```