{"title":"API configuration","slug":"api-configuration","url":"https://support.storeconnect.com/articles/api-configuration","url_markdown":"https://support.storeconnect.com/articles/api-configuration.md","subtitle":null,"summary":"Set up the StoreConnect API by creating an api subdomain, configuring a store record, requesting an API key, and testing authenticated requests with curl.","type":"Developer_Documentation","video_url":"","keywords":"api configuration, storeconnect api, api setup, api key, custom domain, api subdomain, bearer token, authentication, curl, rest api, api authentication, store record","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"## Configuring StoreConnect to enable the API\n\nThere are several steps to set up StoreConnect to enable the API:\n\n1.  Create a Custom Domain for the API\n2.  Configure a new store record to respond to the API\n3.  Request an API Key from support\n\nThese steps are covered below:\n\n### Create a custom domain for the API\n\nTo begin, you need to create a custom domain to use with the API.  This MUST have \"`api`\" as the subdomain. So if your domain name is `example.com`, then you would need to create a custom domain called `api.example.com`.  If your site was `mysite.example.com.au` then your api domain would be `api.mysite.example.com.au`.\n\nTo create a web domain to use with your stores, follow the [Add a Custom Domain to Your Website](https://support.getstoreconnect.com/article/Add-a-Custom-Domain-to-Your-Website) article.\n\nOnce done and verified, move onto the next step:\n\n### Configure a store to be used for the API\n\nOnce you have the domain name, you need to make a new store record and set it's domain name to the one you created in the previous step, when complete, you should be able to visit your store (such as at `api.mysite.example.com`.au) and see the API documentation.\n\nOnce set up, the API can be accessed, and with the correct API key (see below) you can access any of your Stores regardless of the domain used.\n\n### Request an API key from support\n\nIn order to make requests to the API, your requests need to be authenticated with an API Key. In future you will be able to generate API keys from Salesforce, however for now you will need to ask our Support team to generate one for you.\n\nIn your Support request, please supply the Salesforce record ID of the Store that has the api domain name on it that you created in the previous step.  This is how we know which Store has the API configured on it.\n\n\u003e **Please note:** API keys should be kept secret. Anyone who has access to the API key could make requests to the API.\n\n### Testing the API\n\nWhen you are ready to use the API, please visit https://api./ in your browser to view the API documentation.\n\nLet's say your store Salesforce record ID is `a2ABC001234` and your API key was `1234APIKEY5678` and your domain name was `api.example.com` then you can do a test request like this:\n\n~ $ curl -H \"Authorization: Bearer `a2ABC001234`:`1234APIKEY5678`\" \\\\\n              -H \"Accept: application/json\" \\\\\n              -X GET [https://api.example.com/v1/store](https://api.example.com/v1/store) \n\nThis should produce output like this:\n\n{ \"name\":\"Test Store\",\"currency\":{\"code\":\"AUD\",\"symbol\":\"$\"}, \"locale\":\"en\",\"timezone\":\"Australia/Sydney\" }"}