Skip to Content
Uptimeify Docs
Customers

Delete Customer

Permanently deletes a customer and deactivates or deletes the users assigned only to it.

DELETE /api/customers/:customerPublicId

Permanently deletes a customer. Its monitors, check history, incidents, reports and screenshots are removed with it. This cannot be undone.

Organization admins, editors and global admins may delete customers. Readonly users, global supporters, responders and customer-scoped API tokens receive 403. An editor assigned to specific customers can delete only those customers (any other id answers 404); an editor without customer assignments can delete every customer of the organization.

Two things stay with admins. Only an admin may send userAction=delete; an editor gets 403 with customerUserDeleteAdminOnly and uses the default deactivate. An editor assigned to customers cannot delete the last of them: they would end up without a customer and deactivate their own account, so the request answers 409 with cannotDeleteOwnLastCustomer. Both checks run before anything is deleted.

Users of the customer

Users who have access only to this customer cannot keep their account without one. One of two things always happens to them, chosen with the userAction query parameter:

userActionEffect
deactivate (default)The users are deactivated. They can no longer use the dashboard or the API and can be reactivated later with Update User.
deleteThe users are deleted permanently.

Users who also have access to other customers keep their account and only lose access to the deleted customer. There is no option to keep users without a customer.

Authentication

BASE_URL="https://uptimeify.io"
TOKEN="wsm_<your-api-token>"

Example Request

curl -X DELETE "$BASE_URL/api/customers/6bfec6f6-245a-47ce-843b-157d97d56f88?userAction=delete" \
  -H "Authorization: Bearer $TOKEN"

Example Response

{
  "success": true,
  "message": "Customer deleted successfully",
  "userAction": "delete",
  "affectedUsers": 1
}

affectedUsers is the number of users that were deactivated or deleted.

Common errors

  • 400 Bad Request with data.code: "invalidUserAction" when userAction is neither deactivate nor delete. Nothing is deleted.
  • 403 Forbidden with data.code: "forbidden" when the caller is neither an organization admin nor an editor (readonly, global supporter, responder) or uses a customer-scoped token
  • 403 Forbidden with data.code: "customerUserDeleteAdminOnly" when an editor sends userAction=delete. Nothing is deleted.
  • 409 Conflict with data.code: "cannotDeleteOwnLastCustomer" when an editor assigned to customers would delete the last of them. Nothing is deleted.
  • 404 Not Found with data.code: "customerNotFound" when the customer does not exist in your organization

On this page