addCrmClientStatus
Creates a new CRM client status or updates an existing one if status_id is provided. A new status is appended at the end of the status list within its group.
Input parameters
| status_id | int | Status ID. Provide to update an existing status. Leave empty or omit when creating a new status. |
| name | varchar(30) | Status name displayed in the panel. |
| color | varchar(7) | Status color in hex format (e.g., "#FF0000"). |
| group_id | int | Status group ID. If omitted on create, the status is placed in the main (default) group. On update, if not provided, the existing group assignment is kept. |
Output data
The method returns the data in JSON format.
| status | varchar(30) | SUCCESS - request executed correctly ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code |
| status_id | int | ID of the created or updated status. |
Sample
Input data:Output data:
A sample request in PHP: