API reference
Labels
The labels your company has set up for cards, such as HOT or BUSINESS. Put them on a deal with Change the labels of a deal.
Endpoints
List labels
GET
/api/v1/deal-labels
All labels of your company, in the order of the pipeline settings. You manage labels in Klantly itself.
- Scope
-
deals.read— Read deals and pipeline stages - Required feature
pipeline
Example request
curl "https://app.klantly.com/api/v1/deal-labels" \
-H "Authorization: Bearer $KLANTLY_API_KEY"$client = new \GuzzleHttp\Client([
'base_uri' => 'https://app.klantly.com/api/v1/',
'headers' => ['Authorization' => 'Bearer ' . getenv('KLANTLY_API_KEY')],
]);
$response = $client->request('GET', 'deal-labels');
$data = json_decode((string) $response->getBody(), true)['data'];const response = await fetch('https://app.klantly.com/api/v1/deal-labels', {
headers: {
Authorization: `Bearer ${process.env.KLANTLY_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://app.klantly.com/api/v1/deal-labels",
headers={
"Authorization": f"Bearer {os.environ['KLANTLY_API_KEY']}",
},
)
data = response.json()["data"]Response 200
The response is a list with cursor pagination: data contains the objects, meta the pagination.
{
"data": [
{
"object": "deal_label",
"id": "4b8e2c10-7d3a-4f6e-9a1b-2c3d4e5f6a70",
"name": "HEET",
"color": "#DC2626",
"group": "Urgentie"
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJpZCI6IjlkM2Y2YzFlIn0",
"prev_cursor": null
}
}Possible errors
-
403
insufficient_scope— This API key has no access to this action.
The object
All fields are always present; a field without a value is null.
| Field | Type | Description |
|---|---|---|
object |
string | Always "deal_label". |
id |
string (uuid) | Unique id (UUID). |
name |
string | Name of the label, such as HOT. |
color |
string | Colour on the board (hex). |
group |
string | Labels in the same group exclude each other (a deal is HOT or SPRING); null = combines with anything. can be empty (null) |