Skip to content

Site · API

Creating a Custom API Endpoint

Last updated 18 November 2026

Creating a Custom API Endpoint defines a URL path on your Site that external systems can call to send or retrieve data. Each endpoint maps to a Liquid file that handles the request and shapes the response. The create form is a two-step wizard: fill out the Details tab, then write the endpoint content in the Body tab.

  1. Navigate to API from the main menu.
  2. Select Custom API Endpoints.
  3. Select CREATE CUSTOM API ENDPOINT.
  4. Fill out the Details tab (explained below). Select NEXT to continue.
  5. Write the endpoint content in the Body tab.
  6. Select CREATE CUSTOM API ENDPOINT to save.

Details

The Details tab captures the core configuration for the endpoint: what it is called, where it lives in the file system, how it accepts requests, and which Authorization Policies protect it.

Input LabelTypeRequiredDescription
Custom API Endpoint NameTextYesA display name for the endpoint. Used to identify it in the list view.
SlugTextYesThe URL path for the endpoint. A preview shows the full URL: https://<instance-url>/<slug>.json
File PathText with folder pickerYesThe file location for the endpoint logic. It is filled in from the Custom API Endpoint Name as you type. Use the folder picker to select a different module path.
Request MethodDropdownYesThe HTTP method this endpoint responds to. Options: GET, POST, PUT, PATCH, DELETE. Defaults to GET.
Authorization PoliciesMulti-select dropdownNoOne or more Authorization Policies to protect this endpoint. The list shows the policies that exist on the site, plus two fixed options: Site API Key and None.
Redirect toTextNoA URL to redirect API users to.
Redirect CodeDropdownNoThe redirect type. Options: 301 (Moved Permanently) or 302 (Moved Temporarily).

Body

The Body tab contains the Liquid code that runs when the endpoint receives a request. This is where you define what data is fetched, processed, and returned. Press F10 to enter fullscreen mode in the editor.

Input LabelTypeRequiredDescription
BodyCode editorYesThe Liquid content that powers the endpoint response. The output of this template is returned to the caller.