When marking one or multiple emails at once as Spam, you might receive the following error:
JSON API Error: Could not load /api/0/spam/
The reason for this error is because you are trying to mark as Spam a case that is not in the database anymore.
This can happen when the ElasticSearch Index of FogBugz is out-of-sync with the FogBugz database's content. Because of this FogBugz is showing cases in search results that have been already removed from the database.
Follow the instructions described for Cases Missing in Search Results on FogBugz.