Skip to content

Delete End Customer

This endpoint soft-deletes an existing end customer by ID.

DELETE /v1/end-customers/end-customers/:id

Include your API key in the x-api-key header. See Authentication.

end-customers:write
ParameterTypeRequiredDescription
idstringYesEnd customer ID to delete.

This endpoint does not accept a request body.

Terminal window
curl -X DELETE "https://api.crewsum.com/v1/end-customers/end-customers/endcustomer-abc123def4567890" \
-H "x-api-key: $CREWSUM_API_KEY"

On success, the API returns HTTP 200 OK. The response has no data field.

{
"message": "Successfully deleted end customer: endcustomer-abc123def4567890"
}
  • This is a soft delete. The end customer is marked isDeleted: true. It no longer appears in List End Customers, but Get End Customer still returns it.
  • Only the end customer record changes. Projects that use this end customer keep their endCustomerId, and their responses show endCustomerDeleted: true.
  • The API does not check that the end customer exists. An unknown ID returns 200 with the success message, and no webhook is sent. Deleting an end customer that is already deleted also returns 200.
  • After the end customer is deleted, Crewsum attempts to send the end-customers.deleted webhook event. A webhook failure does not change the response.
StatusMeaning
400{"message": "EndCustomerID not supplied"}. The ID path segment is empty.
500{"message": "Error deleting end customer: <id>"}. Crewsum could not delete the end customer.

Authentication and scope failures are described in Errors.