> For a complete page index, fetch https://developer.close.com/llms.txt # Rename a lead status PUT https://api.close.com/api/v1/status/lead/{id}/ Content-Type: application/json Update a lead status. The `label` and `color` can be changed. To update the status of a particular lead, see PUT `/lead/{lead_id}/`. Reference: https://developer.close.com/api/resources/lead-statuses/update ## Authentication - `Authorization` header (basic auth, required) — Use your API key as the username and leave the password empty. - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `id` (string, required) ### Body (application/json) This endpoint expects a CreateOrUpdateLeadStatus. - `label` (string, required) - `color` (enum, optional, nullable) - Allowed values: `blue`, `gray`, `green`, `magenta`, `orange`, `purple`, `teal`, `yellow` ## Response ### 200 Successful response - `color` (enum, required, nullable) - Allowed values: `blue`, `gray`, `green`, `magenta`, `orange`, `purple`, `teal`, `yellow` - `id` (string, required) - `label` (string, required) - `organization_id` (string, required) ## Errors ### 400 Bad Request Error Bad request - `any` ### 401 Unauthorized Error Unauthorized - `any` ### 404 Not Found Error Not found - `any` ## Examples **Request** ```json { "label": "Renamed" } ``` **Response** ```json { "color": null, "id": "stat_9ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Renamed", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } ``` **SDK Code** ```python lead_statuses_update_example import requests url = "https://api.close.com/api/v1/status/lead/id/" payload = { "label": "Renamed" } headers = { "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers, auth=("", "")) print(response.json()) ``` ```javascript lead_statuses_update_example const url = 'https://api.close.com/api/v1/status/lead/id/'; const credentials = btoa(":"); const options = { method: 'PUT', headers: {Authorization: `Basic ${credentials}`, 'Content-Type': 'application/json'}, body: '{"label":"Renamed"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go lead_statuses_update_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.close.com/api/v1/status/lead/id/" payload := strings.NewReader("{\n \"label\": \"Renamed\"\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 lead_statuses_update_example require 'uri' require 'net/http' url = URI("https://api.close.com/api/v1/status/lead/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 \"label\": \"Renamed\"\n}" response = http.request(request) puts response.read_body ``` ```java lead_statuses_update_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://api.close.com/api/v1/status/lead/id/") .basicAuth("", "") .header("Content-Type", "application/json") .body("{\n \"label\": \"Renamed\"\n}") .asString(); ``` ```php lead_statuses_update_example request('PUT', 'https://api.close.com/api/v1/status/lead/id/', [ 'body' => '{ "label": "Renamed" }', 'headers' => [ 'Content-Type' => 'application/json', ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp lead_statuses_update_example using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://api.close.com/api/v1/status/lead/id/"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.PUT); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"label\": \"Renamed\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ```