Create Route
Authentication
Enter your API key with the Bearer prefix, e.g. ‘Bearer sk_…’.
Path parameters
Hosted API id (prefixed external id, api_...).
Headers
Request
Lowercase segments of letters, digits, . _ - or a {param}; /openapi.json and /_runs are reserved.
What answers a route. type selects the fields that apply:
store_query (store_id, collection, where, order_by, limit),
store_document (store_id, collection, document_id),
store_aggregate (store_id, collection, where, group_by, metrics:
a summary in one request, from the same implementation as the
collection’s aggregate operation),
store_write (store_id, collection, write_mode, document_id: the
request body lands as a document, the fast path past a run for the
one thing a read resolver cannot do; POST only, never on a public
API, and on an API that names its caller the document is that
person’s),
run_latest (trigger_id of a schedule trigger),
run (trigger_id of a webhook trigger, wait_seconds),
file (file_path of one published file; or, on a route whose path
ends in *, file_root and file_index for a whole published tree).
Response headers
Response
Lowercase segments, one-segment {params}, and optionally a trailing * that serves a published tree (file routes only).
What answers a route. type selects the fields that apply:
store_query (store_id, collection, where, order_by, limit),
store_document (store_id, collection, document_id),
store_aggregate (store_id, collection, where, group_by, metrics:
a summary in one request, from the same implementation as the
collection’s aggregate operation),
store_write (store_id, collection, write_mode, document_id: the
request body lands as a document, the fast path past a run for the
one thing a read resolver cannot do; POST only, never on a public
API, and on an API that names its caller the document is that
person’s),
run_latest (trigger_id of a schedule trigger),
run (trigger_id of a webhook trigger, wait_seconds),
file (file_path of one published file; or, on a route whose path
ends in *, file_root and file_index for a whole published tree).
Cache-Control max-age on GET responses, and the shared response cache’s lifetime for store and run_latest routes; 0 disables caching, except on a public API, where a GET route with 0 is served with the platform default of 60 seconds so an anonymous crawler never reads storage per request. File routes are never in the response cache; they carry the header for the edge.