Ouath return unknown error

Hi Wix Support Team,

I’m faced with an issue with the Wix API and would appreciate your help understanding the expected behavior.

Working in
Wix API

Site link

What I’m trying to do
When a site is moved to trash or deleted, any API request (including OAuth token requests) now returns:

{
  "error": "unknown_error"
}

HTTP Status: 400 Bad Request

Previous behavior:
A few months ago, the same scenario returned a clear and descriptive error:

  • "The requested meta-site was not found"
  • or error code: ERROR_SITE_NOT_FOUND_CODE

This allowed us to reliably detect when a site had been trashed or deleted.

Current behavior:
The generic unknown_error makes it impossible to distinguish between:

  1. A site that has been moved to trash or permanently deleted
  2. A real unexpected server-side error

My question:
Could you clarify how we are supposed to detect that a site has been moved to trash or deleted?

  • Is unknown_error now the intended response for this case?
  • Was the previous SITE_NOT_FOUND error removed intentionally?
  • Is there a recommended approach — such as a specific error code, a webhook, or a status field in the Site object — to handle this scenario reliably?

Thank you for your time!

1 Like