> For a complete page index, fetch https://developer.close.com/llms.txt

# Create a new status that can be applied to leads

POST https://api.close.com/api/v1/status/lead/
Content-Type: application/json

Reference: https://developer.close.com/api/resources/lead-statuses/create

## 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 <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an object.

- `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": "Potential"
}
```

**Response**

```json
{
  "color": null,
  "id": "stat_9ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
  "label": "Potential",
  "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH"
}
```

**SDK Code**

```python lead_statuses_create_example
import requests

url = "https://api.close.com/api/v1/status/lead/"

payload = { "label": "Potential" }
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<CLOSE_API_KEY>", ""))

print(response.json())
```

```javascript lead_statuses_create_example
const url = 'https://api.close.com/api/v1/status/lead/';
const credentials = btoa("<CLOSE_API_KEY>:");

const options = {
  method: 'POST',
  headers: {Authorization: `Basic ${credentials}`, 'Content-Type': 'application/json'},
  body: '{"label":"Potential"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go lead_statuses_create_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.close.com/api/v1/status/lead/"

	payload := strings.NewReader("{\n  \"label\": \"Potential\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.SetBasicAuth("<CLOSE_API_KEY>", "")
	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_create_example
require 'uri'
require 'net/http'

url = URI("https://api.close.com/api/v1/status/lead/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request.basic_auth("<CLOSE_API_KEY>", "")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"label\": \"Potential\"\n}"

response = http.request(request)
puts response.read_body
```

```java lead_statuses_create_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.close.com/api/v1/status/lead/")
  .basicAuth("<CLOSE_API_KEY>", "")
  .header("Content-Type", "application/json")
  .body("{\n  \"label\": \"Potential\"\n}")
  .asString();
```

```php lead_statuses_create_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.close.com/api/v1/status/lead/', [
  'body' => '{
  "label": "Potential"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<CLOSE_API_KEY>', ''],
]);

echo $response->getBody();
```

```csharp lead_statuses_create_example
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.close.com/api/v1/status/lead/");
client.Authenticator = new HttpBasicAuthenticator("<CLOSE_API_KEY>", "");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"label\": \"Potential\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```