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.
- Navigate to API from the main menu.
- Select Custom API Endpoints.
- Select CREATE CUSTOM API ENDPOINT.
- Fill out the Details tab (explained below). Select NEXT to continue.
- Write the endpoint content in the Body tab.
- 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 Label | Type | Required | Description |
|---|---|---|---|
| Custom API Endpoint Name | Text | Yes | A display name for the endpoint. Used to identify it in the list view. |
| Slug | Text | Yes | The URL path for the endpoint. A preview shows the full URL: https://<instance-url>/<slug>.json |
| File Path | Text with folder picker | Yes | The 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 Method | Dropdown | Yes | The HTTP method this endpoint responds to. Options: GET, POST, PUT, PATCH, DELETE. Defaults to GET. |
| Authorization Policies | Multi-select dropdown | No | One 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 to | Text | No | A URL to redirect API users to. |
| Redirect Code | Dropdown | No | The 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 Label | Type | Required | Description |
|---|---|---|---|
| Body | Code editor | Yes | The Liquid content that powers the endpoint response. The output of this template is returned to the caller. |