Beam Help
Get help now

How-to · Zoho DESK

How to empty spam events in Zoho Desk

Clear all spam events from your Zoho Desk spam folder.

Emptying spam events in Zoho Desk permanently removes all events sitting in the spam folder via a dedicated API endpoint — a clean, one-call operation distinct from simply deleting individual spam records.


Why this matters


Over time, Zoho Desk can accumulate a backlog of events flagged as spam. While you can delete individual spam events one by one, the "empty spam" operation clears the entire spam folder in a single request, keeping your Desk environment tidy. This is especially useful during periodic maintenance or after a spam surge has filled the queue. Note that this is independent of similar operations available for tasks and calls.


Step-by-step


Step 1. Ensure your OAuth token includes the correct Zoho Desk events scope before making any API call. The scope you need is Desk.events.DELETE (or the broader Desk.events.ALL), both of which grant permission to perform destructive operations on event records. [2]


Step 2. Confirm you understand the difference between two related but distinct endpoints. The DELETE /api/v1/events/spam endpoint removes specific spam events you target with parameters, whereas DELETE /api/v1/events/emptySpam is the bulk-purge operation that clears everything in the spam folder at once. Choose the latter when your goal is a full purge. [1][3]


Step 3. Send a DELETE request to the endpoint /api/v1/events/emptySpam. No complex body payload is required — the operation accepts an optional parameters dictionary (p), but the call can be made with no additional arguments to empty the entire spam queue. [1]


Using Python, the call looks like this:


# Assuming `client` is your authenticated Zoho Desk API client instance
response = client.delete_empty_spam_events()

The method issues a DELETE request to /api/v1/events/emptySpam and returns the server response. [1]


Step 4. Check the HTTP response status. A successful purge will return a 2xx status code. If you receive an authentication error, revisit your OAuth scopes (Step 1) and confirm the token has not expired. [2]


Common pitfalls


  • Wrong endpoint for targeted deletion. If you only want to remove specific spam events rather than all of them, use DELETE /api/v1/events/spam with the appropriate filter parameters instead of the empty-spam endpoint. Calling emptySpam is irreversible and clears everything. [3]

  • Missing or insufficient OAuth scope. The Desk.events.DELETE scope (or Desk.events.ALL) must be present in your token. If your integration was set up with only read or write scopes, the API will reject the request. Review the full list of Desk event scopes — READ, WRITE, CREATE, UPDATE, and DELETE — and regenerate your token if necessary. [2]

  • Confusing events with tasks or calls. Zoho Desk has parallel spam-management endpoints for tasks (DELETE /api/v1/tasks/spam/empty) and calls (DELETE /api/v1/calls/emptySpam). These are separate resources; emptying event spam does not affect spam tasks or spam calls. [4][5]

What to check


  • Scope verification: Confirm your active OAuth token contains Desk.events.DELETE or Desk.events.ALL before calling the endpoint. [2]
  • Response status: Verify the API returns a 2xx response to confirm the spam folder was successfully emptied rather than silently failing. [1]
  • Related queues: If you also need to clear spam tasks or spam calls, remember to call their respective endpoints separately after handling events. [4][5]

---


*Beam Help provides independent expert support for Zoho products and is not official Zoho support. Always test destructive API operations in a sandbox environment before running them against production data.*

Sources cited

  1. [1] DELETE /api/v1/events/emptySpam
  2. [2] config.py
  3. [3] DELETE /api/v1/events/spam
  4. [4] DELETE /api/v1/tasks/spam/empty
  5. [5] DELETE /api/v1/calls/emptySpam
  6. [6] index.html
  7. [7] DELETE /api/v1/tasks/spam
  8. [8] app.js
Empty Spam Events in Zoho Desk | Beam Help — Beam Help