Instance · API
Custom API Endpoints Introduction
Last updated 1 November 2026
Addresses on your instance that other programs call for JSON, each with its own body and policy.
A Custom API Endpoint is an address on your instance that another program can call to read or change your data. Each endpoint is a page that answers in JSON, with its own Liquid body and its own authorization policy. Use one to give a partner system, a mobile app or a script exactly the data it needs, and nothing more.
Where to find them
In the admin, open API and choose Custom API Endpoints. The list shows JSON pages from across your instance in one place. Each endpoint has a Details tab and a Body tab.
| Field | Meaning |
|---|---|
| Name | The display name in the list |
| Slug | The address, for example api/orders/recent |
| Request method | GET, POST, PUT, PATCH or DELETE. One method per endpoint |
| Authorization policy | Who may call it. Choose a policy, or Instance API Key |
| Body | The Liquid that builds the response |
Example: a GET endpoint
app/views/pages/api/pages/count.liquid
---
slug: api/pages/count
format: json
layout: ''
authorization_policies:
- modules/insites_crm/has_valid_instance_api_authorization
---
{%- graphql r -%}
query { admin_pages(per_page: 1) { total_entries } }
{%- endgraphql -%}
{ "pages": {{ r.admin_pages.total_entries }} }The admin_pages query in this body returned 63 when run read-only on the docs.insites.io instance on 1 November 2026. Callers send the instance API key in the Authorization header.
Warning
The form lets you save an endpoint with no policy. That endpoint is then open to anyone on the internet. Always choose a policy.
Common mistakes
- Handling two methods in one endpoint. A page has one request method; make a second endpoint for the write.
- POSTing to a GET endpoint. The instance answers with its Not Found page and status 200, which looks like a missing page.
- Expecting module endpoints in the list. Endpoints shipped by Insites modules are listed in the instance API reference at
/admin/api.