Does removing the SPAM label via the Gmail API have the same effect as clicking "Not spam"?

Hello,

I have a question regarding how Gmail’s spam classification interacts with third-party applications using the Gmail API.

We use Front as a support inbox connected to a Google Workspace Gmail account. Front has confirmed that it relies on Gmail’s spam classification and that spam status is synchronised bidirectionally with Gmail.

When a message is classified as spam, Front allows us to “restore” the message. Front has confirmed that this removes the spam status and synchronises the message back to the Gmail Inbox.

However, Front cannot confirm whether this provides Gmail with the same spam-classification feedback as a user manually selecting “Not spam” within the Gmail interface.

Could you please clarify:

When a third-party application uses the Gmail API to remove the SPAM label from a message and add it back to the INBOX, does Gmail treat this as equivalent to the user selecting “Not spam” in the Gmail interface?
Specifically, does removing the SPAM label via the Gmail API provide the same feedback to Gmail’s spam classifier that the message was incorrectly identified as spam?
If not, is there a specific Gmail API operation that a third-party application can use to explicitly indicate that a message is “Not spam” and provide the same feedback as the Gmail UI?

We’re particularly interested in understanding whether restoring legitimate spam messages through Front contributes to Gmail’s spam classification/training in the same way as manually selecting “Not spam” in Gmail.

Front has confirmed that the message is moved from Spam back to the Inbox, but has advised that they cannot confirm whether the same spam-classification feedback is provided.

Thanks for your help.

This is an interesting distinction between changing the message labels and actually providing feedback to Gmail’s spam classifier. I’d also be curious to know whether the Gmail API has a documented operation that is equivalent to selecting “Not spam” in the Gmail UI, rather than simply removing the SPAM label and adding INBOX. That clarification would be especially useful for applications like Front that restore legitimate messages automatically.

I expect that removing the SPAM label via API feeds back into Gmail’s personalised adaptive filter for that mailbox. However, it doesn’t go through the usual Gmail UI flow to automatically add the sender’s email address to the user’s personal Contacts/Allowlist if configured.

Hello,

Thanks all for your responses here - it would be great if someone could give a definitive response if possible!

Thanks,

Lewis