> 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: Site API Calls ## Article: Site API Calls ## Article Link: https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/integrations/exposing-services/site-api-calls.md ## Article Content: # Custom Site API Calls 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/articles/coding-with-velo/integrations/exposing-services/methods-for-http-functions.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/articles/coding-with-velo/integrations/exposing-services/about-custom-site-apis.md). You can [call your custom site APIs with authentication context](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/integrations/exposing-services/about-custom-site-apis.md) using the HTTP Functions [REST API](https://dev.wix.com/docs/rest/assets/http-functions/rest/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://support.wix.com/en/article/about-test-sites): `/_functions/?rc=test-site` ### Sites using [Git Integration](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/git-integration-wix-cli/about-git-integration-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/articles/coding-with-velo/integrations/exposing-services/about-custom-site-apis.md) - [Write an HTTP function](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/integrations/exposing-services/write-an-http-function.md) - [Methods for HTTP functions](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/integrations/exposing-services/methods-for-http-functions.md)