Customer management
APIs
Update phone
1 min
{ "name" "endpoint /core/v1/cm/customers/{customerid}/phones", "method" "post", "url" "https //sandbox crbcos com/core/v1/cm/customers/{customerid}/phones", "description" "the customer record is the primary resource that contains customer information this api allows for updates to the customer phone number ", "tab" "examples", "examples" { "languages" \[ { "id" "xk0mdfrnuxtc3hlnjr8 m", "language" "curl", "code" "curl l 'https //sandbox crbcos com/core/v1/cm/customers/bbe09f0a f38b 4daa a0a2 b2ff00f4e887/phones' ^\n d '{\n \\"isprimary\\" true,\n \\"phonetype\\" \\"work\\",\n \\"phonenumber\\" \\"2015551212\\",\n \\"extension\\" \\"123\\"\n}\n'", "customlabel" "" }, { "id" "ikn pxxwetvuu7ts0a1vg", "language" "nodejs", "code" "var https = require('follow redirects') https;\nvar fs = require('fs');\n\nvar options = {\n 'method' 'post',\n 'hostname' 'sandbox crbcos com',\n 'path' '/core/v1/cm/customers/bbe09f0a f38b 4daa a0a2 b2ff00f4e887/phones',\n 'headers' {\n },\n 'maxredirects' 20\n};\n\nvar req = https request(options, function (res) {\n var chunks = \[];\n\n res on(\\"data\\", function (chunk) {\n chunks push(chunk);\n });\n\n res on(\\"end\\", function (chunk) {\n var body = buffer concat(chunks);\n console log(body tostring());\n });\n\n res on(\\"error\\", function (error) {\n console error(error);\n });\n});\n\nvar postdata = \\"{\\\r\\\n \\\\\\"isprimary\\\\\\" true,\\\r\\\n \\\\\\"phonetype\\\\\\" \\\\\\"work\\\\\\",\\\r\\\n \\\\\\"phonenumber\\\\\\" \\\\\\"2015551212\\\\\\",\\\r\\\n \\\\\\"extension\\\\\\" \\\\\\"123\\\\\\"\\\r\\\n}\\\r\\\n\\";\n\nreq write(postdata);\n\nreq end();", "customlabel" "" }, { "id" " parfletwtmccfpop6pj7", "language" "python", "code" "import requests\n\nurl = \\"https //sandbox crbcos com/core/v1/cm/customers/bbe09f0a f38b 4daa a0a2 b2ff00f4e887/phones\\"\n\npayload = \\"{\\\r\\\n \\\\\\"isprimary\\\\\\" true,\\\r\\\n \\\\\\"phonetype\\\\\\" \\\\\\"work\\\\\\",\\\r\\\n \\\\\\"phonenumber\\\\\\" \\\\\\"2015551212\\\\\\",\\\r\\\n \\\\\\"extension\\\\\\" \\\\\\"123\\\\\\"\\\r\\\n}\\\r\\\n\\"\nheaders = {}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "3ftl4k3m64eg39sfis sa", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //sandbox crbcos com/core/v1/cm/customers/bbe09f0a f38b 4daa a0a2 b2ff00f4e887/phones\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http post new(url)\nrequest body = \\"{\\\r\\\n \\\\\\"isprimary\\\\\\" true,\\\r\\\n \\\\\\"phonetype\\\\\\" \\\\\\"work\\\\\\",\\\r\\\n \\\\\\"phonenumber\\\\\\" \\\\\\"2015551212\\\\\\",\\\r\\\n \\\\\\"extension\\\\\\" \\\\\\"123\\\\\\"\\\r\\\n}\\\r\\\n\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" }, { "id" "jcyn64ted91ifnxmbddwm", "language" "go", "code" "package main\n\nimport (\n \\"fmt\\"\n \\"strings\\"\n \\"net/http\"\n \\"io\\"\n)\n\nfunc main() {\n\n url = \\"https //sandbox crbcos com/core/v1/cm/customers/bbe09f0a f38b 4daa a0a2 b2ff00f4e887/phones\\"\n method = \\"post\\"\n\n payload = strings newreader(`{`+\\"\n\\"+`\n \\"isprimary\\" true,`+\\"\n\\"+`\n \\"phonetype\\" \\"work\\",`+\\"\n\\"+`\n \\"phonenumber\\" \\"2015551212\\",`+\\"\n\\"+`\n \\"extension\\" \\"123\\"`+\\"\n\\"+`\n}`+\\"\n\\"+`\n`)\n\n client = \&http client {\n }\n req, err = http newrequest(method, url, payload)\n\n if err != nil {\n fmt println(err)\n return\n }\n res, err = client do(req)\n if err != nil {\n fmt println(err)\n return\n }\n defer res body close()\n\n body, err = io readall(res body)\n if err != nil {\n fmt println(err)\n return\n }\n fmt println(string(body))\n}", "customlabel" "" } ], "selectedlanguageid" "xk0mdfrnuxtc3hlnjr8 m" }, "results" { "languages" \[ { "id" "zuoamzsuzjovanqserbuz", "language" "200", "code" "{\n \\"id\\" \\"a25e3529 bccd 4699 8386 b30400bf7e63\\",\n \\"customerid\\" \\"bbe09f0a f38b 4daa a0a2 b2ff00f4e887\\",\n \\"status\\" \\"active\\",\n \\"phonetype\\" \\"work\\",\n \\"isprimary\\" true,\n \\"phonenumber\\" \\"2015551212\\",\n \\"extension\\" \\"123\\",\n \\"createdat\\" \\"2025 06 22t07 37 12 4331184 04 00\\",\n \\"lastmodifiedat\\" \\"2025 06 22t07 37 12 4331184 04 00\\",\n \\"partnerid\\" \\"1101a33d fbd9 4b9e b169 b29500f12407\\"\n}", "customlabel" "" }, { "id" "qba0r7xrwobmux7s30mb7", "language" "400", "code" "{\n \\"errors\\" \[\n {\n \\"code\\" 2230,\n \\"message\\" \\"phone number already exists\\"\n }\n ]\n}", "customlabel" "" } ], "selectedlanguageid" "zuoamzsuzjovanqserbuz" }, "request" { "pathparameters" \[ { "name" "customerid", "kind" "required", "type" "string", "description" "the customerid of the customer record being updated", "" "the customerid of the customer record being updated" } ], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "isprimary", "kind" "required", "type" "boolean", "description" "true if this is the primary phone record for this customer otherwise, false ", "" "required" }, { "name" "phonetype", "kind" "required", "type" "string", "description" "the phone number calls a \n home\n mobile\n work\n fax", "" "the phone number calls a \n home\n mobile\n work\n fax" }, { "name" "phonenumber", "kind" "required", "type" "string", "description" "phone number with no spaces or other characters minimum 10, maximum 20", "" "phone number with no spaces or other characters minimum 10, maximum 20" }, { "name" "extension", "kind" "optional", "type" "string", "description" "if the phone rings a switchboard, the entity's direct extension 20 character maximum ", "" "if the phone rings a switchboard, the entity's direct extension 20 character maximum " }, { "name" "notes", "kind" "optional", "type" "string", "description" "additional phone information 255 character maximum", "" "additional phone information 255 character maximum" } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "response" \[ { "name" "id", "kind" "optional", "type" "string", "description" "cos id for the record, in guid format" }, { "name" "customerid", "kind" "optional", "type" "string", "description" "the customerid of the customer record being updated", "children" \[] }, { "name" "status", "kind" "optional", "type" "string", "description" "status of the customer record \n inactive\n active", "children" \[] }, { "name" "phonetype", "kind" "optional", "type" "string", "description" "the phone number calls a \n home\n mobile\n work\n fax", "children" \[] }, { "name" "isprimary", "kind" "optional", "type" "boolean", "description" "true if this is the primary address record for this customer otherwise, false ", "children" \[] }, { "name" "phonenumber", "kind" "optional", "type" "string", "description" "phone number with no spaces or other characters minimum 10, maximum 20", "children" \[] }, { "name" "extension", "kind" "optional", "type" "string", "description" "if the phone rings a switchboard, the entity's direct extension 20 character maximum ", "children" \[] }, { "name" "notes", "kind" "optional", "type" "string", "description" "additional phone information 255 character maximum ", "children" \[] }, { "name" "createdat", "kind" "optional", "type" "string", "description" "date and time the record was created in this case, the date and time are in this format yyyy mm ddthh\ mm\ ss\[ mmm]", "children" \[] }, { "name" "lastmodifiedat", "kind" "optional", "type" "string", "description" "internal cross river value date and time the database entry was last modified ", "children" \[] }, { "name" "partnerid", "kind" "optional", "type" "string", "description" "your partner id in the cross river system", "children" \[] } ] }