> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://api.docs.modulards.com/modular-ds-public-api/clients/client-contact-methods/update-a-client-s-contact-method/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server. # Update a client's contact method PATCH https://api.modulards.com/api/public/v1/clients/{client_id}/contact-methods/{contact_method_id} Content-Type: application/json Changes the value of a client's contact method. Changing the value lifts a permanent bounce block on the method, if it has one; a temporary rate-limit block stays. **Body** - `value` (string, required): at most 255 characters, checked against the method's own channel. **Errors** - **404**: the method is reached through another client's address, or through a contact id. - **422**: `channel` is sent: the channel of a method cannot change. Reference: https://api.docs.modulards.com/modular-ds-public-api/clients/client-contact-methods/update-a-client-s-contact-method ## Authentication - `Authorization` header (bearer token, required) — Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints. ## Request ### Path parameters - `client_id` (string, required) - `contact_method_id` (string, required) ### Body (application/json) This endpoint expects an object. - `value` (string, optional) ## Response ### 200 200 - Method updated - `data` (ApiPublicV1ClientsClientIdContactMethodsContactMethodIdPatchResponsesContentApplicationJsonSchemaData, optional) - `jsonapi` (ApiPublicV1ClientsClientIdContactMethodsContactMethodIdPatchResponsesContentApplicationJsonSchemaJsonapi, optional) ## Types ### ApiPublicV1ClientsClientIdContactMethodsContactMethodIdPatchResponsesContentApplicationJsonSchemaData - `attributes` (ApiPublicV1ClientsClientIdContactMethodsContactMethodIdPatchResponsesContentApplicationJsonSchemaDataAttributes, optional) - `id` (string, optional) - `type` (string, optional) ### ApiPublicV1ClientsClientIdContactMethodsContactMethodIdPatchResponsesContentApplicationJsonSchemaJsonapi - `version` (string, optional) ### ApiPublicV1ClientsClientIdContactMethodsContactMethodIdPatchResponsesContentApplicationJsonSchemaDataAttributes - `channel` (string, optional) - `created_at` (string, optional) - `updated_at` (string, optional) - `value` (string, optional) ## Examples ### 200 - Method updated **Response** ```json { "data": { "attributes": { "channel": "email", "created_at": "2026-08-10T09:00:00.000000Z", "updated_at": "2026-09-24T09:25:00.000000Z", "value": "alice.new@example.com" }, "id": "301", "type": "contact-methods" }, "jsonapi": { "version": "1.1" } } ``` **SDK Code** ```python 200 - Method updated import requests url = "https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id" headers = {"Authorization": "Bearer "} response = requests.patch(url, headers=headers) print(response.json()) ``` ```javascript 200 - Method updated const url = 'https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id'; const options = {method: 'PATCH', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go 200 - Method updated package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id" req, _ := http.NewRequest("PATCH", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby 200 - Method updated require 'uri' require 'net/http' url = URI("https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java 200 - Method updated import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id") .header("Authorization", "Bearer ") .asString(); ``` ```php 200 - Method updated request('PATCH', 'https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp 200 - Method updated using RestSharp; var client = new RestClient("https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift 200 - Method updated import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" request.allHTTPHeaderFields = headers 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() ``` ### Update a client's contact method **Request** ```json { "value": "alice.new@example.com" } ``` **Response** ```json { "data": { "attributes": { "channel": "email", "created_at": "2026-08-10T09:00:00.000000Z", "updated_at": "2026-09-24T09:25:00.000000Z", "value": "alice.new@example.com" }, "id": "301", "type": "contact-methods" }, "jsonapi": { "version": "1.1" } } ``` **SDK Code** ```python Update a client's contact method import requests url = "https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id" payload = { "value": "alice.new@example.com" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Update a client's contact method const url = 'https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id'; const options = { method: 'PATCH', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"value":"alice.new@example.com"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Update a client's contact method package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id" payload := strings.NewReader("{\n \"value\": \"alice.new@example.com\"\n}") req, _ := http.NewRequest("PATCH", 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 Update a client's contact method require 'uri' require 'net/http' url = URI("https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"value\": \"alice.new@example.com\"\n}" response = http.request(request) puts response.read_body ``` ```java Update a client's contact method import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"value\": \"alice.new@example.com\"\n}") .asString(); ``` ```php Update a client's contact method request('PATCH', 'https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id', [ 'body' => '{ "value": "alice.new@example.com" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Update a client's contact method using RestSharp; var client = new RestClient("https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"value\": \"alice.new@example.com\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Update a client's contact method import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["value": "alice.new@example.com"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/clients/client_id/contact-methods/contact_method_id")! 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() ```