Messages

Mark as spam

POST https://getinboxtriage.com/api/inboxes/{id}/messages/{messageId}/spam

Moves one message to the provider's Spam or Junk folder. It is not a permanent delete.

Headers

NameTypeRequiredDescription
Authorization string Required Bearer followed by your API key.

Path parameters

NameTypeRequiredDescription
id string Required Inbox id from List inboxes, like inbox_lx2k9a1b.
messageId string Required Message id from List messages.

Response

200 OK.

NameTypeDescription
ok boolean true when the message moved.
isDemo boolean true for sample data. Nothing moved at the provider.
undoId string When present, the person can undo the move from Activity.

Errors

StatusErrorMeaning
400 action_failed The provider refused the move. error_description has the reason.
404 inbox_not_found The inbox id is wrong or the inbox was removed.
404 message_not_found The message id is wrong.
409 inbox_paused The person paused this inbox. They resume it on the Inboxes page.
409 not_connected The inbox has no working credential. The person connects it first.

Any route can also return 401 for a bad key, 402 when the trial ended or payment failed, and 429 when you send too many requests. See Errors.