> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Call Exposed APIs ## Article: Call Exposed APIs ## Article Link: https://dev.wix.com/docs/develop-websites-sdk/code-your-site/build-a-custom-backend/expose-services/call-exposed-apis.md ## Article Content: # Call Exposed APIs When you define [HTTP functions](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/build-a-custom-backend/expose-services/write-an-http-function.md) in your site's backend, you expose custom site APIs that allow you to interact with your site externally. You can call your custom site APIs using the HTTP functions you defined in your site's backend. Use the [endpoints](#endpoints) below to call your HTTP functions through custom site APIs. Call these endpoints with the [method](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/build-a-custom-backend/expose-services/http-function-methods.md) defined in your HTTP function. Make sure to define your [variables](#variables) correctly for the function.
Important: The endpoints in this article call custom site APIs without [authentication context](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/build-a-custom-backend/expose-services/about-custom-site-apis.md#authentication-context). You can [call your custom site APIs with authentication context](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/build-a-custom-backend/expose-services/about-custom-site-apis.md#with-authentication-context) using the HTTP Functions [REST API](https://dev.wix.com/docs/rest/assets/http-functions/introduction.md) or [SDK module](https://dev.wix.com/docs/sdk/backend-modules/http-functions/functions/introduction.md).
## Variables You need to define the following variables to construct your API calls. ### `baseUrl` The base URL of the site hosting the HTTP functions: - **Premium sites**: `https://www.` - **Free sites**: `https://.wixsite.com/` > **Note:** The top level domain for free sites may not be `.com`. For example, for UK based sites, it may be `.co.uk`. ### `functionName` The name of the HTTP function your custom site API calls without its method prefix. For example, for an HTTP function defined by `export function get_myFunction(request) { }`, the `functionName` is `myFunction`. ## Endpoints Use the following endpoints to call your custom site APIs. ### Production Accesses the latest code published to the production site: `/_functions/` ### Test sites Accesses the latest code published to a [test site](https://dev.wix.com/docs/develop-websites-sdk/test-your-site/work-with-test-sites/about-test-sites.md): `/_functions/?rc=test-site` ### Sites with [Git Integration](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/git-integration/about-git-integration-with-wix-cli.md) Accesses the code pushed in the specified branch (`branchId`) in the specified commit hash (`revisionNumber`): `/_functions/?siteRevision=&branchId=` ### Editor preview Accesses the latest code in the site editor: `/_functions-dev/` > **Note:** You must [create a test site](https://support.wix.com/en/article/test-sites-creating-a-test-site) to use this endpoint. ## See also - [About custom site APIs](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/build-a-custom-backend/expose-services/about-custom-site-apis.md) - [Write an HTTP function](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/build-a-custom-backend/expose-services/write-an-http-function.md) - [Methods for HTTP functions](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/build-a-custom-backend/expose-services/http-function-methods.md)