Make API Calls with an API Key

Share your feedback
Reach out to us with feedback and suggestions to improve the Wix Headless experience, and join the Headless channel of the Devs on Wix Discord community to discuss features and connect with our growing community of developers.

Once you have generated an API key and obtained the IDs for your Wix account and Wix site, follow these instructions to make REST API calls with your key.

Prerequisites

Make API Calls

To make API call with an API Key, use the following headers:

  • Authorization: An API key that you generated in the API Key Manager.
  • wix-account-id: ID of the Wix account the API key belongs to. Required for account-level API calls.
  • wix-site-id: ID of the Wix site or project you are working with. Required for site-level API calls.
Copy
1
curl POST \
2
'https://www.wixapis.com/site-folders/v2/folders' \
3
-H 'Authorization: <API_KEY>' \
4
-H 'wix-account-id: <ACCOUNT_ID>' \
5
-H 'wix-site-id: <SITE_ID>' \

Example

This API call retrieves a list of products from a specific site. To make this call, you need an API key and the ID of the site you are querying.

Copy
1
curl POST \
2
'https://www.wixapis.com/stores/v1/products/query' \
3
-H 'Content-Type: application/json' \
4
-H 'Accept: application/json, text/plain, */*' \
5
-H 'Authorization: <API_KEY>' \
6
-H 'wix-site-id: <SITE_ID>' \
7
-d '{
8
"query": {
9
"filter": "{\"paymentStatus\":\"PAID\"}",
10
"sort": "{\"number\": \"desc\"}",
11
"paging": {
12
"limit": "50"
13
}
14
}
15
}'
Was this helpful?
Yes
No