Columns API
Access column (stage) information within your CRM boards.
Get Column
GET/api/crm/boards/:boardId/columns/:columnId
Retrieve details for a specific column.
bash
curl -X GET "https://api.cekat.ai/api/crm/boards/board_abc123/columns/col_001" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK
{
"success": true,
"data": {
"id": "col_001",
"board_id": "board_abc123",
"name": "Lead",
"position": 0,
"color": "#4CAF50",
"items_count": 42,
"settings": {
"wip_limit": 50,
"auto_archive_days": null
},
"created_at": "2025-01-15T08:00:00Z",
"updated_at": "2025-03-27T10:00:00Z"
}
}
Get Column by Name
POST/api/crm/boards/:boardId/columns/by-name
Find a column by its name within a board.
This is useful when you know the column name (e.g., "Lead", "Closed Won") but not the ID.
Request Body
namestring*
The column name to find (case-insensitive)
bash
curl -X POST "https://api.cekat.ai/api/crm/boards/board_abc123/columns/by-name" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Lead"
}'
Response
200 OK
{
"success": true,
"data": {
"id": "col_001",
"board_id": "board_abc123",
"name": "Lead",
"position": 0,
"color": "#4CAF50",
"items_count": 42
}
}
Error Response
404 Error
{
"success": false,
"error": {
"code": "COLUMN_NOT_FOUND",
"message": "Column with name 'Lead' not found in board"
}
}
Column Object
| Field | Type | Description |
|---|---|---|
id | string | Unique column identifier |
board_id | string | Parent board ID |
name | string | Column display name |
position | integer | Order position (0-based) |
color | string | Hex color code |
items_count | integer | Number of items in column |
settings | object | Column configuration |
created_at | string | Creation timestamp |
updated_at | string | Last update timestamp |
Code Examples
javascript
// Get column by ID
const getColumn = async (boardId, columnId) => {
const response = await fetch(
`https://api.cekat.ai/api/crm/boards/${boardId}/columns/${columnId}`,
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
return response.json();
};
// Get column by name
const getColumnByName = async (boardId, columnName) => {
const response = await fetch(
`https://api.cekat.ai/api/crm/boards/${boardId}/columns/by-name`,
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: columnName })
}
);
return response.json();
};
// Usage
const leadColumn = await getColumnByName('board_abc123', 'Lead');
console.log(`Lead column has ${leadColumn.data.items_count} items`);
Common Use Cases
1
Find Column ID by Name
Use the by-name endpoint when you need the column ID but only know the stage name.
2
Create Item in Specific Stage
First find the column ID, then create an item in that column.
3
Check WIP Limits
Read column settings to check work-in-progress limits before adding items.
