Make REST API Calls with an API Key

Once you've generated an API key and obtained the IDs for your Wix account or site, you can authenticate and perform admin operations.

Step 1 | Set authorization headers

To make an API call using an API key, include the key from the API Keys Manager in the Authorization header. You must also include one of the following headers, depending on the type of call:

  • wix-account-id: The ID of the Wix account that owns the API key. Required for account-level API calls.
  • wix-site-id: The ID of the Wix site you're working with. Required for site-level API calls.

Notes:

  • API calls require either the wix-account-id header or the wix-site-id header, but not both. Most APIs are site-level, while account-level APIs are specified as such in the reference documentation.
  • Site-level calls only work with API keys that belong to the account that owns the site.

A complete header for an account-level API request looks like this:

Copy

A complete header for a site-level API request looks like this:

Copy

Step 2 | Make a REST API call

With your headers set up, call Wix APIs. The following example calls Query Product and retrieves a list of visible products from a specific site:

Copy

Common errors

403 forbidden

If you receive a 403 Forbidden error, check that you have:

  • An Authorization header with your API key.
  • The correct permissions configured for your API key.
  • A wix-site-id header for site-level methods, or a wix-account-id header for account-level methods.
  • An API key that can access the site you're calling. A key scoped to specific sites only works for those sites.
  • An API key that belongs to the account that owns the site you're calling. A key works only for sites in its own account, no matter which account member generated it.

Unable to generate a key

If you don't receive an SMS for 2-step verification when generating a key, contact Wix Support.

See also

Last updated: 1 September 2026

Did this help?