> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # Update verified caller ID PUT https://%7BYour_Space_Name%7D.signalwire.com/api/relay/rest/verified_caller_ids/{id} Content-Type: application/json Changes the configurable label of an external verified caller-ID record by ID. Use it to maintain the record after verification; updating a project-owned phone number uses [Update phone number](/docs/apis/rest/phone-numbers/update-phone-number) instead. #### Permissions The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Voice_. [Learn more about API scopes](/docs/platform/your-signalwire-api-space). Reference: https://signalwire.com/docs/apis/rest/verified-caller-id/update-verified-caller-id ## Authentication - `Authorization` header (basic auth, required) — SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ``` ## Request ### Path parameters - `id` (string, required) — Unique ID of the verified caller ID. ### Body (application/json) This endpoint expects an UpdateVerifiedCallerIDRequest. - `name` (string, required) — The name portion of the caller ID. ## Response ### 200 The request has succeeded. - `id` (string, required) — The unique identifier of the Verified Caller ID on SignalWire. - `number` (string, required) — String representing the phone number for the caller ID. This must be a valid, routeable phone number in E.164 format. - `verified` (boolean, required) — A boolean representing whether the number has been verified or not. - `type` (string, optional) — The type of the returned object, this should be verified_caller_id. - `name` (string, optional) — String representing the name portion of the caller ID. If not provided, the default will be the formatted number that has been provided. - `extension` (string, optional) — String representing the extension of the phone number for the caller ID. This is only used when placing the verification call. - `verified_at` (datetime, optional) — Nullable DateTime field representing the date and time that the number was verified. If the number has not been verified, it will be null. - `status` (enum, optional) — The verification status for the caller ID. - Allowed values: `Verified`, `Awaiting Verification` ## Errors ### 401 Unauthorized Error Access is unauthorized. - `error` (enum, required) - Allowed values: `Unauthorized` ### 404 Not Found Error The server cannot find the requested resource. - `error` (enum, required) - Allowed values: `Not Found` ### 422 Unprocessable Entity Error The request failed validation. See errors for details. - `errors` (list of Types.StatusCodes.SpaceApiErrorItem, required) — List of validation errors. ### 500 Internal Server Error An internal server error occurred. - `error` (enum, required) - Allowed values: `Internal Server Error` ## Types ### Types.StatusCodes.SpaceApiErrorItem Details about a specific validation error. - `detail` (string, required) — A description of what caused the error. - `status` (string, required) — The HTTP status code. - `title` (string, required) — A short summary of the error type. - `code` (string, required) — The error code. ## Examples **Request** ```json { "name": "C-3P0" } ``` **Response** ```json { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "number": "+15551234567", "verified": false, "type": "verified_caller_id", "name": "C-3P0", "extension": "1234", "verified_at": "2024-01-15T09:30:00Z", "status": "Awaiting Verification" } ``` **SDK Code** ```python import requests url = "https://{your_space_name}.signalwire.com/api/relay/rest/verified_caller_ids/id" payload = { "name": "C-3P0" } headers = { "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers, auth=("", "")) print(response.json()) ``` ```javascript const url = 'https://{your_space_name}.signalwire.com/api/relay/rest/verified_caller_ids/id'; const credentials = btoa(":"); const options = { method: 'PUT', headers: { Authorization: `Basic ${credentials}`, 'Content-Type': 'application/json' }, body: '{"name":"C-3P0"}' }; 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://{your_space_name}.signalwire.com/api/relay/rest/verified_caller_ids/id" payload := strings.NewReader("{\n \"name\": \"C-3P0\"\n}") req, _ := http.NewRequest("PUT", url, payload) req.SetBasicAuth("", "") 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://{your_space_name}.signalwire.com/api/relay/rest/verified_caller_ids/id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request.basic_auth("", "") request["Content-Type"] = 'application/json' request.body = "{\n \"name\": \"C-3P0\"\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://{your_space_name}.signalwire.com/api/relay/rest/verified_caller_ids/id") .basicAuth("", "") .header("Content-Type", "application/json") .body("{\n \"name\": \"C-3P0\"\n}") .asString(); ``` ```php request('PUT', 'https://{your_space_name}.signalwire.com/api/relay/rest/verified_caller_ids/id', [ 'body' => '{ "name": "C-3P0" }', 'headers' => [ 'Content-Type' => 'application/json', ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://{your_space_name}.signalwire.com/api/relay/rest/verified_caller_ids/id"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.PUT); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"name\": \"C-3P0\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = [ "Authorization": "Basic \(credentials)", "Content-Type": "application/json" ] let parameters = ["name": "C-3P0"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/relay/rest/verified_caller_ids/id")! 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() ```