statuses:write| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
name | string | Yes | max:255, unique per tenant | Status name |
color | string | No | max:7, hex format #RRGGBB (regex: /^#[0-9A-Fa-f]{6}$/) | Display color |
message: "Status created successfully".| Field | Type | Description |
|---|---|---|
id | integer | Status ID |
name | string | Status name |
color | string|null | Hex color code |
created_at | string | ISO 8601 datetime |
updated_at | string | ISO 8601 datetime |
| Status | Code | Description |
|---|---|---|
| 422 | VALIDATION_ERROR | Validation failed |
| 500 | INTERNAL_ERROR | Failed to create status |
| Field | Message |
|---|---|
name | Status name is required / A status with this name already exists |
color | Color must be a valid hex color code (e.g., #FF5733) |
curl --location --request POST '/statuses' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Hot Lead",
"color": "#FF5733"
}'{}