Delete a lead status Run in API Explorer
Ask AI
Soft deletes the lead status. The default status and the firm's last status cannot be deleted. Leads on the status, including deleted leads, move to the replacement status, except promoted and disqualified leads, which keep the deleted status.
DELETE
/api/v1/lead-statuses/{uuid}
curl \
--request DELETE 'https://api.plannrcrm.com/api/v1/lead-statuses/6ff8f7f6-1eb3-3525-be4a-3932c805afed' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
--data '{
"replacement_status_uuid": "d4f104ee-0a98-46fe-98c1-0f0b4da80fc6"
}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"replacement_status_uuid": "d4f104ee-0a98-46fe-98c1-0f0b4da80fc6"
}
Response examples (403)
{
"message": "This action is unauthorized."
}
Response examples (404)
{
"message": "Not found."
}
Response examples (422)
Deleting the default status
{
"message": "Set another status as the default first.",
"errors": {
"status": [
"Set another status as the default first."
]
}
}
{
"message": "A firm must keep at least one status.",
"errors": {
"status": [
"A firm must keep at least one status."
]
}
}
{
"message": "Status currently in use by leads. Choose a replacement status or archive it instead.",
"errors": {
"status": [
"Status currently in use by leads. Choose a replacement status or archive it instead."
]
}
}
{
"message": "The replacement status must be a different status.",
"errors": {
"replacement_status_uuid": [
"The replacement status must be a different status."
]
}
}
{
"message": "The selected replacement status uuid is invalid.",
"errors": {
"replacement_status_uuid": [
"The selected replacement status uuid is invalid."
]
}
}