Docsfrontbacked.js reference
On this page

Endpoint calls reference

Call named endpoints and cancel pending requests.

Method signatures

js

Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →

Before you begin: Client method signatures.

All network helpers use the endpoint configured in Frontbacked.init(). They return JSON responses, usually shaped like { ok: boolean, error?: string, message?: string }. Authenticated helpers include the stored bearer token automatically. If a response includes { ok: true, localEmail: { sent: true, mailboxUrl } }, Frontbacked shows a local development notification with a mailbox link for 20 seconds.

Call a custom FRL endpoint by its declared name:

js

Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →

Endpoint calls require a signed-in visitor by default. Set allowGuest: true for an endpoint that should also run when no one is signed in. Frontbacked still sends the visitor's authentication whenever it is available, regardless of allowGuest.

js

Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →

Pass an AbortSignal when a newer action should be able to cancel an older request. A canceled call returns { ok: false, aborted: true }.

js

Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →

Use the FRL Endpoints and Dedupe guide to define the endpoint rule, request guard, response, and repeat-request behavior.

Continue with Initialization and admin reference.