FriendChise Docs

API Route Reference

Complete public inventory of app/api routes, methods, and auth requirements

Complete public inventory of HTTP routes in app/api. Internal admin routes are excluded. For full request/response documentation, see the linked endpoint pages.

Mobile authentication

MethodRouteAuthDescription
GET/api/mobile-auth/oauth-start/[provider]NoneStart OAuth flow for mobile. provider: google or linkedin. Requires callbackUrl query param.
GET/api/mobile-auth/completeSession cookieComplete OAuth; requires callbackUrl, encodes the session into JWT, and redirects with ?token=<jwt>.
GET/api/mobile-auth/demoNoneDev only (404 in production). Provision a demo session.
GET/api/mobile-auth/devNoneDev only (404 in production). Sign in as a seeded dev user.
GET/api/mobile-auth/dev-usersNoneDev only (404 in production). List available dev users.

Full docs: Mobile Authentication

Mobile identity

These routes use bearer token authentication (Authorization: Bearer <token>).

MethodRouteAuthDescription
GET/api/mobile/meBearerCurrent user profile (id, name, email, image).
GET/api/mobile/me/organizationsBearerAll orgs the user is a member of.
GET/api/mobile/me/organizationBearerFirst org by name (default org for new sessions).

Full docs: Users and Accounts

Account management

MethodRouteAuthDescription
DELETE/api/account/deleteBearer or sessionPermanently delete the current user's account. Body: { confirmText: <user email> }.

Full docs: Users and Accounts

Web identity

MethodRouteAuthDescription
GET/api/me/organizationsSessionPaginated org list for the current web session user.

Full docs: Users and Accounts

Tasks

MethodRouteAuthDescription
POST/api/orgs/[orgId]/tasksMANAGE_TASKSCreate a new task (recipe, procedure, checklist).
GET/api/orgs/[orgId]/tasks/[taskId]MemberGet a single task by ID.
PATCH/api/orgs/[orgId]/tasks/[taskId]Member (franchise-scoped)Partially update a task.
GET/api/orgs/[orgId]/tasks/paginatedMemberCursor-based task list for infinite scroll.
GET/api/orgs/[orgId]/tasks/simpleMemberLightweight task list for pickers.

Full docs: Tasks

Organizations

MethodRouteAuthDescription
GET/api/orgs/[orgId]/membershipsMemberPaginated member list with roles.
GET/api/orgs/[orgId]/announcementsMemberPaginated org announcements.
GET/api/orgs/[orgId]/roster-entriesMemberRoster entries for requested week-start dates.
GET/api/orgs/[orgId]/is-parent-ownerSigned inCheck if current user is the franchisor owner.

Full docs: Organizations

Images and storage

MethodRouteAuthDescription
POST/api/orgs/[orgId]/images/upload-urlMemberGet a presigned URL for uploading an image to storage.
POST/api/orgs/[orgId]/storage/read-urlMemberGet a signed read URL for a private storage object.
GET/api/orgs/[orgId]/imagesMemberPaginated org image library.
POST/api/orgs/[orgId]/imagesMemberSave an uploaded image to the org image library.
DELETE/api/orgs/[orgId]/images/[imageId]MemberDelete an image from the org image library.

Full docs: Images and File Uploads

Tools

MethodRouteAuthDescription
GET/api/orgs/[orgId]/task-tools?kind=MemberList tools of a given kind: conversion, item-list, or roster.
GET/api/orgs/[orgId]/tools/item-listMemberPaginated item-list tool items with signed image URLs.
GET/api/orgs/[orgId]/tools/scan-to-task/historyMANAGE_TASKSCursor-paged scan-to-task results with AI-extracted drafts and duplicate candidates.
POST/api/orgs/[orgId]/tools/scan-to-task/upload-urlMANAGE_TASKSCreate a short-lived upload URL for a scan source.
POST/api/orgs/[orgId]/tools/scan-to-taskMANAGE_TASKSScan uploaded files into draft task suggestions.
POST/api/orgs/[orgId]/tools/scan-to-task/confirmMANAGE_TASKSConfirm a reviewed scan result and create a task.
POST/api/orgs/[orgId]/tools/scan-to-task/clearMANAGE_TASKSClear a scan result from the active queue.
GET/api/orgs/[orgId]/tools/menu/[menuId]MemberGet a menu by ID.
GET/api/orgs/[orgId]/tools/menu/[menuId]/itemsMemberItems on a menu.

Full docs: Tools

Public routes

MethodRouteAuthDescription
GET/api/menu/[token]/itemsNonePublic menu items for a shared menu token.

Full docs: Tools — Menu items (public)

Framework routes

MethodRouteAuthDescription
GET / POST/api/auth/[...nextauth]Auth.js handler. No custom app logic.
GET/api/test/loginNonePlaywright test login. Only active when TEST_MODE=1.

Admin routes (internal)

These routes are for internal admin tooling only and are intentionally excluded from the public API inventory above.