Endpoints
HTTP routes this app exposes.
HTTP endpoints (Next.js route handlers)
Endpoint: GET /.well-known/nostr.json
- Purpose: Proxies NIP-05
nostr.jsonfrom the api onto the site apex. CORS*. - Errors: Upstream 502/503.
- Used by: Damus verification.
- Auth: none.
Endpoint: GET /.well-known/lnurlp/[username]
- Purpose: Proxies LUD-16 payRequest from the api onto the site apex so wallets can pay
[email protected]. CORS*. Settlement stays on the linked Wallet of Satoshi callback. - Errors: Upstream 404/502.
- Used by: Lightning wallets.
- Auth: none.
Endpoint: OPTIONS /.well-known/lnurlp/[username]
- Purpose: CORS preflight for LUD-16.
- Errors: none.
- Used by: Browsers and wallets.
- Auth: none.
Endpoint: OPTIONS /.well-known/nostr.json
- Purpose: CORS preflight for NIP-05.
- Errors: none.
- Used by: Browsers.
- Auth: none.
Endpoint: GET /healthz
- Purpose: Liveness JSON
{ status: 'ok' }fromsrc/app/healthz/route.ts. - Errors: None if the process is up (always 200).
- Used by: Container probes and Playwright smoke.
- Auth: Public.
Endpoint: POST /auth/passkey/authenticate/begin
- Purpose: Same-origin proxy of api
POST /auth/passkey/authenticate/begin. - Errors: Upstream status, or 502 if the api is unreachable.
- Used by:
startPasskeyAuthentication. - Auth: Public.
Endpoint: POST /auth/passkey/authenticate/finish
- Purpose: Same-origin proxy of api
POST /auth/passkey/authenticate/finish. - Errors: Upstream status, or 502 if the api is unreachable.
- Used by:
finishPasskeyAuthentication. - Auth: Public.
Endpoint: POST /auth/passkey/register/begin
- Purpose: Same-origin proxy of api
POST /auth/passkey/register/begin. Optional JSON body{ viewKey }(64 hex) claims an existing public profile; omit the body for a new registration. - Errors: Upstream status (including 404 / 409 with
{ error }), or 502 if the api is unreachable. - Used by:
startPasskeyRegistration. - Auth: Public.
Endpoint: POST /auth/passkey/register/finish
- Purpose: Same-origin proxy of api
POST /auth/passkey/register/finish. - Errors: Upstream status, or 502 if the api is unreachable.
- Used by:
finishPasskeyRegistration. - Auth: Public.
Endpoint: GET /gifts
- Purpose: Same-origin proxy of api
GET /gifts?day=YYYY-MM-DD(individual outbound gifts that UTC day). - Errors: Upstream 400/503, or 502 if the api is unreachable.
- Used by:
fetchGiftDayon/stats/[day]. - Auth: Public.
Endpoint: GET /gifts/stats
- Purpose: Same-origin proxy of api
GET /gifts/stats(aggregated outbound gift totals; optionalrecipientquery forwarded). - Errors: Upstream 503, or 502 if the api is unreachable.
- Used by:
fetchGiftStatson/stats,/welcome,/messages/[id],/members/[accountId], and the staff payout-goal widget on/moderate. - Auth: Public.
Endpoint: GET /lightning-address
- Purpose: Same-origin proxy of public LUD-16 resolve.
- Errors: Upstream 400/502, or 502 if the api is unreachable.
- Used by:
resolveLightningAddress(LUD-16 helper). - Auth: Public.
Endpoint: POST /me/name
- Purpose: Same-origin proxy to set or replace the display name.
- Errors: Upstream 400, or 502 if the api is unreachable.
- Used by:
setName. - Auth: Bearer.
Endpoint: POST /me/username
- Purpose: Same-origin proxy to set the unique
@21.giftsusername (LUD-16 / NIP-05 local-part). - Errors: Upstream 400/409, or 502 if the api is unreachable.
- Used by:
setUsername. - Auth: Bearer.
Endpoint: POST /me/location
- Purpose: Same-origin proxy to set, replace, or clear the free-text profile location (
{ location }; empty string clears). - Errors: Upstream 400 (
Location must be at most 80 characters), 401, or 502 if the api is unreachable. - Used by:
setLocation/LocationForm. - Auth: Bearer.
Endpoint: PUT /me/about
- Purpose: Same-origin proxy of api
PUT /me/about(set or replace the signed-in About me note). JSON{ text, photo? }:photoomitted keeps a stored image,nullclears it,{ contentType, data }sets a JPEG/PNG/WebP like a forum post. - Errors: Upstream 400/401/409, or 502 if the api is unreachable.
- Used by:
putAboutMe. - Auth: Bearer.
Endpoint: GET /me/about/photo
- Purpose: Same-origin Bearer proxy of api
GET /me/about/photo(raw JPEG/PNG/WebP bytes for the signed-in About me note). Always render via blob URLs — not bare<img src>. - Errors: Upstream 401/404, or 502 if the api is unreachable.
- Used by:
fetchAboutMePhoto. - Auth: Bearer.
Endpoint: GET /view-key/[viewKey]/about/photo
- Purpose: Same-origin public proxy of api
GET /view/:viewKey/about/photo(raw JPEG/PNG/WebP bytes for the view-key About me note). Always render via blob URLs — not bare<img src>. - Errors: Upstream 404, or 502 if the api is unreachable.
- Used by:
fetchViewAboutMePhoto. - Auth: none.
Endpoint: POST /me/setup/skip
- Purpose: Same-origin proxy to skip the name or Lightning Address onboarding step (
{ step }). - Errors: Upstream 400/401, or 502 if the api is unreachable.
- Used by:
skipSetup. - Auth: Bearer.
Endpoint: GET /forum/members/[accountId]
- Purpose: Same-origin proxy of api
GET /members/:accountIdfor signed-in member profiles. - Errors: Upstream 401/404/409
missing_requirements, or 502 if the api is unreachable. - Used by:
fetchMemberviaMemberProfileLoader. - Auth: Bearer.
Endpoint: GET /forum/members/[accountId]/activity
- Purpose: Same-origin Bearer proxy of api
GET /members/:accountId/activityfor a member's given and received series. - Errors: Upstream 401/404/409
missing_requirements, 503{ error: "Gift stats are unavailable" }, or 502 if the api is unreachable. - Used by:
fetchMemberActivityviaMemberProfileLoader. - Auth: Bearer.
Endpoint: GET /forum/members/[accountId]/posts
- Purpose: Same-origin proxy of api
GET /members/:accountId/postsfor a signed-in member's top-level forum posts. - Errors: Upstream 401/404/409
missing_requirements, or 502 if the api is unreachable. - Used by:
fetchMemberPostsviaMemberProfileScreen. - Auth: Bearer.
Endpoint: GET /forum/members/[accountId]/replies
- Purpose: Same-origin proxy of api
GET /members/:accountId/repliesfor a signed-in member's forum replies. - Errors: Upstream 401/404/409
missing_requirements, or 502 if the api is unreachable. - Used by:
fetchMemberRepliesviaMemberProfileScreen. - Auth: Bearer.
Endpoint: POST /me/forum-laws-dismissed
- Purpose: Same-origin proxy to permanently dismiss the welcome-forum living-room laws hint (
forumLawsDismissed: trueon the account). - Errors: Upstream 401, or 502 if the api is unreachable.
- Used by:
dismissForumLaws. - Auth: Bearer.
Endpoint: POST /me/notification-level
- Purpose: Same-origin Bearer proxy of api POST
/me/notification-level. JSON body{ level: "all"|"active"|"mentions" }returns the owner Account. - Errors: Upstream 401, 400 invalid level, or 502 if the api is unreachable.
- Used by:
postNotificationLevel. - Auth: Bearer.
Endpoint: POST /me/rules-agreement
- Purpose: Same-origin proxy to record living-room rules agreement on the signed-in account (
rulesAgreedAt). - Errors: Upstream 401, or 502 if the api is unreachable.
- Used by:
agreeToRules. - Auth: Bearer.
Endpoint: GET /me
- Purpose: Same-origin proxy of the signed-in account, including optional
funding(nullforbasis). - Errors: Upstream 401, or 502 if the api is unreachable.
- Used by:
fetchMe. - Auth: Bearer.
Endpoint: GET /me/activity
- Purpose: Same-origin Bearer proxy of api
GET /me/activityfor given and received sat totals plus both cumulative day series (house gifts and forum zaps). - Errors: Upstream 401, 503
{ error: "Gift stats are unavailable" }, or 502 if the api is unreachable. - Used by:
fetchAccountActivityviauseAccountTotalson/profileand the signed-in menu. - Auth: Bearer.
Endpoint: GET /view-key/[viewKey]
- Purpose: Same-origin public proxy of api
GET /view/:viewKey. - Errors: Upstream 404
{ error: "Not found" }, or 502 if the api is unreachable. - Used by:
fetchViewProfile. - Auth: Public.
Endpoint: GET /view-key/[viewKey]/activity
- Purpose: Same-origin public proxy of api
GET /view/:viewKey/activityfor the public profile given and received series. - Errors: Upstream 404, 503
{ error: "Gift stats are unavailable" }, or 502 if the api is unreachable. - Used by:
fetchViewActivityviaViewProfileLoader. - Auth: Public.
Endpoint: GET /forum/messages
- Purpose: Same-origin Bearer proxy of api GET
/messages(public forum list, newest-first), forwarding optionalmode,limit, andcursorquery parameters. App path is/forum/messagesso/messages/[id]can serve HTML. The welcome client always sendslimit=20; the JSON body may include opaquenextCursor(omitted at end of feed). - Errors: Upstream 401, or 502 if the api is unreachable.
- Used by:
fetchMessages. - Auth: Bearer.
Endpoint: GET /forum/messages/hidden
- Purpose: Same-origin Bearer proxy of api GET
/messages/hidden(hidden living-room notes for moderators). App path is/forum/messages/hiddenso HTML/moderate/hiddencan serve the page. - Errors: Upstream 401/403, or 502 if the api is unreachable.
- Used by:
listHiddenMessagesviaHiddenNotesScreenon/moderate/hidden. - Auth: Bearer; moderator role on the api.
Endpoint: POST /forum/messages
- Purpose: Same-origin Bearer proxy of api POST
/messages(create a public forum message or reply with optional photo). - Errors: Upstream 401/400/403/429, or 502 if the api is unreachable. 403 is an unpaid-reply rejection (
A reply needs a Bitcoin payment, or the api error string). - Used by:
postMessage. - Auth: Bearer.
Endpoint: GET /forum/messages/[id]/replies
- Purpose: Same-origin Bearer proxy of api GET
/messages/:id/replies(oldest-first replies for one note). - Errors: Upstream 401/404, or 502 if the api is unreachable.
- Used by:
fetchReplies. - Auth: Bearer.
Endpoint: GET /public-messages/[id]
- Purpose: Same-origin public proxy of api GET
/messages/:id(one note as JSON, no Bearer). The HTML public note is/messages/[id]. - Errors: Upstream 404
{ error: "Not found" }, or 502 if the api is unreachable. - Used by:
fetchPublicMessage. - Auth: Public.
Endpoint: GET /public-messages/[id]/replies
- Purpose: Same-origin public proxy of api GET
/messages/:id/replies(oldest-first live replies, no Bearer). The HTML public thread is/messages/[id]. - Errors: Upstream 404
{ error: "Not found" }, or 502 if the api is unreachable. - Used by:
fetchPublicReplies. - Auth: Public.
Endpoint: POST /messages/[id]/invoice
- Purpose: Same-origin Bearer proxy of api POST
/messages/:id/invoice(pay a forum note; optionaltextis the zap comment and is omitted when empty). - Errors: Upstream 401/400/404/409/429/503, or 502 if the api is unreachable. 409
missing_requirementsis a setup overlay, not a pay-sheet error. - Used by:
postMessageInvoice. - Auth: Bearer.
Endpoint: POST /contact/submit
- Purpose: Same-origin Bearer proxy of api POST
/contact(create an in-app contact message to 21.gifts). Nested under/contact/submitbecause the UI page already owns/contact. - Errors: Upstream 401/400, or 502 if the api is unreachable.
- Used by:
postContact. - Auth: Bearer.
Endpoint: GET /messages/[id]/photo
- Purpose: Same-origin proxy of api GET
/messages/:id/photo(raw JPEG/PNG/WebP bytes for one forum message). Signed-in clients send Authorization (fetchMessagePhoto); the public note page fetches without Bearer (fetchPublicMessagePhoto). Always render via blob URLs — not bare<img src>. - Errors: Upstream 401/404, or 502 if the api is unreachable.
- Used by:
fetchMessagePhoto,fetchPublicMessagePhoto. - Auth: Optional Bearer (api photo is public; forum board still sends Bearer).
Endpoint: GET /messages/[id]/photo/[file]
- Purpose: Same-origin proxy of api extra stills at GET
/messages/:id/photo/{1-9}.jpg. App Routerfilemust match{1-9}.{jpg|jpeg|png|webp}; other names 404 without proxying. The proxy always requests{n}.jpgfrom the api (same bytes as.jpeg/.png/.webpaliases). - Errors: Route 404 for unknown
file; upstream 404/502 when the extra still is missing or unreachable. - Used by:
fetchMessagePhoto/fetchPublicMessagePhotowith index 1–9. - Auth: Optional Bearer.
Endpoint: GET /messages/[id]/[file]
- Purpose: App Router GET that proxies
video.mp4/video.webm/video.movto the 21.gifts api at runtime viagetApiUrl()(not next.config rewrites). Otherfilevalues return 404 without proxying. Public; missing files 404 from the api. - Errors: Route 404 for unknown
file; upstream 404/502 for known video names when missing or unreachable. - Used by: Feed
<video src>viaforumVideoSrc. - Auth: None required.
Endpoint: POST /me/lightning-address
- Purpose: Same-origin proxy to link or replace a Wallet of Satoshi address.
- Errors: Upstream 400, or 502 if the api is unreachable.
- Used by:
setLightningAddress. - Auth: Bearer.
Endpoint: DELETE /me/lightning-address
- Purpose: Same-origin proxy to unlink a Wallet of Satoshi address.
- Errors: Upstream status, or 502 if the api is unreachable.
- Used by:
unlinkLightningAddress. - Auth: Bearer.
Endpoint: GET /push/vapid-public
- Purpose: Same-origin Bearer proxy of api GET
/push/vapid-public(VAPID application server public key for Web Push subscribe). - Errors: Upstream 401, 503
{ error: "Push is not configured" }, or 502 if the api is unreachable. - Used by:
fetchVapidPublicKeyviaenablePushon/profileand viaenablePushfrom the SignedInChrome Notifications click. - Auth: Bearer.
Endpoint: POST /me/push-subscriptions
- Purpose: Same-origin Bearer proxy of api POST
/me/push-subscriptions(register a browser push subscription:{ endpoint, keys: { p256dh, auth } }). - Errors: Upstream 400
{ error: "Invalid subscription" }, 401, 503{ error: "Push is not configured" }, or 502 if the api is unreachable. - Used by:
postPushSubscriptionviaenablePushon/profile, viaenablePushfrom the SignedInChrome Notifications click, and viaresyncPushSubscriptioninSignedInChrome. - Auth: Bearer.
Endpoint: GET /conversations
- Purpose: Same-origin Bearer proxy of api GET
/conversations(incoming threads, plus the member's own 21.gifts contact thread when it has a message; empty and outbound-only member/Damus threads are omitted). GET/conversationsnever lists themoderator_groupthread, even for moderators. Each item has requiredkind:member_member|member_platform|member_damus|moderator_group, requiredlastFromMe, requiredlastSats,unread(default false),unreadMessageCount(default 0, inbound unread messages), optionalaccountId(counterpart), and the envelope includesunreadCount(default 0, unread thread count). - Errors: Upstream 401/503, or 502 if the api is unreachable.
- Used by:
fetchConversationson/messages,useUnreadCount,NotificationsLoader,refreshUnreadAppBadge. - Auth: Bearer.
Endpoint: GET /conversations/moderator-group
- Purpose: Same-origin Bearer proxy of api GET
/conversations/moderator-group(singleton closed staff room as{ conversation }, same item fields as GET/conversationsincludingunreadandunreadMessageCount). - Errors: Upstream 401/403/404, or 502 if the api is unreachable.
- Used by:
fetchModeratorGroupviaModeratorGroupScreenon/moderate/groupand viaInboxLoaderon/messages(unlisted?c=guard for a moderator). - Auth: Bearer; moderator on the api.
Endpoint: POST /conversations
- Purpose: Same-origin Bearer proxy of api POST
/conversationswith{ forumMessageId }to open or return the thread with that note's author. Response is the same conversation list-row shape, including requiredkind, requiredlastFromMe, and optionalaccountId(counterpart). - Errors: Upstream 400 (self), 404 (unknown note), 401/503, or 502 if the api is unreachable.
- Used by:
openConversationfrom the member-profile Message button. - Auth: Bearer.
Endpoint: GET /conversations/[id]
- Purpose: Same-origin Bearer proxy of api GET
/conversations/:id(oldest-first messages). Each message has requiredfromMe(true iff this session is the actor) andsats,hasPhoto/photoCount(client defaults omitted fields to false / 0), and optionalaccountId(sender). For a staff viewer, incomingnameand optionalaccountIdare the actor. Members still see platform identity (21.gifts) on official replies. Optional querysinceMessageIdis forwarded for gift pay-sheet polling. - Errors: Upstream 401/404/503, or 502 if the api is unreachable.
- Used by:
fetchConversationon/messages?c=and on/moderate/group. - Auth: Bearer.
Endpoint: POST /conversations/[id]
- Purpose: Same-origin Bearer proxy of api POST
/conversations/:idwith{ text }(1–500 characters) and optional{ photo, photos }(JPEG/PNG/WebP, at most 10). Empty text is allowed on the Moderators group when at least one photo is present. Staff replies on official threads still send as the platform account on the api, but JSONfromMe,name, andaccountIdfollow the actor. The created message has requiredfromMe,hasPhoto,photoCount, and optionalaccountId(sender). - Errors: Upstream 400/401/404/503, or 502 if the api is unreachable.
- Used by:
postConversationMessagein the inbox composer and inModeratorGroupScreen. - Auth: Bearer.
Endpoint: GET /conversations/[id]/messages/[messageId]/photo
- Purpose: Same-origin Bearer proxy of api GET
/conversations/:id/messages/:messageId/photo(still 0). Staff-room stills are private; 401 without a session. - Errors: Upstream 401/404/503, or 502 if the api is unreachable.
- Used by:
fetchConversationMessagePhotofromModeratorGroupScreen. - Auth: Bearer.
Endpoint: GET /conversations/[id]/messages/[messageId]/photo/[file]
- Purpose: Same-origin Bearer proxy of api GET
/conversations/:id/messages/:messageId/photo/:file. Filename must match{1-9}.{jpg|jpeg|png|webp}; otherwise 404 without calling the api. The proxy always requests{n}.jpgfrom the api. - Errors: 404 for an unsupported filename; upstream 401/404/503, or 502 if the api is unreachable.
- Used by:
fetchConversationMessagePhotofor indices 1–9. - Auth: Bearer.
Endpoint: POST /conversations/[id]/invoice
- Purpose: Same-origin Bearer proxy of api POST
/conversations/:id/invoicewith{ sats, text? }. Success{ pr, amountSats, messageId }for the inbox pay sheet. - Errors: Upstream 400/401/404/429/503, or 502 if the api is unreachable.
- Used by:
postConversationInvoicein the inbox composer. - Auth: Bearer.
Endpoint: POST /conversations/[id]/read
- Purpose: Same-origin Bearer proxy of api POST
/conversations/:id/read(mark one conversation read). - Errors: Upstream 401/404/503, or 502 if the api is unreachable.
- Used by:
markConversationReadfromInboxLoaderafter a successful thread fetch. - Auth: Bearer.
Endpoint: GET /forum/notifications
- Purpose: Same-origin Bearer proxy of api GET
/notifications(posts, replies, payments, and moderator appointment for the session). App path is/forum/notificationsso HTML/notificationscan serve the page. - Errors: Upstream 401/503, or 502 if the api is unreachable.
- Used by:
fetchNotificationsviaNotificationsLoaderon/notifications, viauseUnreadCountinSignedInChrome, viaForumLoaderon/welcome, and viarefreshUnreadAppBadge(fromInboxLoaderafter mark-read). - Auth: Bearer.
Endpoint: POST /forum/notifications/read-all
- Purpose: Same-origin Bearer proxy of api POST
/notifications/read-all(mark every notification read). - Errors: Upstream 401/503, or 502 if the api is unreachable.
- Used by:
markAllNotificationsReadfromNotificationsLoader. - Auth: Bearer.
Endpoint: POST /forum/notifications/[id]/read
- Purpose: Same-origin Bearer proxy of api POST
/notifications/:id/read(mark one notification read). - Errors: Upstream 401/404/503, or 502 if the api is unreachable.
- Used by:
markNotificationReadfromNotificationsLoaderon row click and fromForumLoaderon the welcome appointment pill. - Auth: Bearer.
Endpoint: DELETE /me/push-subscriptions
- Purpose: Same-origin Bearer proxy of api DELETE
/me/push-subscriptions(remove a browser push subscription by{ endpoint }). - Errors: Upstream 400, 401, 404, 503
{ error: "Push is not configured" }, or 502 if the api is unreachable. - Used by:
deletePushSubscriptionviadisablePushon/profile. - Auth: Bearer.
Endpoint: GET /trust/graph
- Purpose: Same-origin Bearer proxy of api
GET /trust-chain(nodes and stored edges). Lives at/trust/graphso it does not collide with the signed-in HTML page/trust-chain. - Errors: Upstream 401, 403, 503, or 502 if the api is unreachable.
- Used by:
fetchTrustChainon signed-in/trust-chain(forwards?around=). - Auth: Bearer.
Endpoint: GET /trust/proposals
- Purpose: Same-origin Bearer proxy of api
GET /trust/proposals(open moderator proposals for moderators). Lives under/trust/proposalsbecause Next.js forbids aroute.tsbeside the HTML page at/moderate/proposals. - Errors: Upstream 401 without a Bearer session, 403 when the account is not a moderator, 503 when the api is unavailable, or 502 JSON if this proxy cannot reach the api origin.
- Used by:
fetchTrustProposalsviaProposalsScreenon/moderate/proposals.ModerateScreenon/moderatedoes not call this GET. Confirm uses existingPOST /trust/confirm-moderator(postTrustConfirm), not appoint. - Auth: Bearer session; the api requires a moderator. The app does not fetch this list for other signed-in roles (forbidden copy, no request).
Endpoint: POST /trust/verify
- Purpose: Same-origin Bearer proxy of api
POST /trust/verifywith{ accountId }. - Errors: Upstream 400/401/403/404/409/503, or 502 if the api is unreachable.
- Used by:
postTrustVerifyinMemberTrustActions. - Auth: Bearer (moderator).
Endpoint: POST /trust/propose-moderator
- Purpose: Same-origin Bearer proxy of api
POST /trust/propose-moderatorwith{ accountId }. - Errors: Upstream 400/401/403/404/409/503, or 502 if the api is unreachable.
- Used by:
postTrustProposeinMemberTrustActions. - Auth: Bearer (moderator).
Endpoint: POST /trust/confirm-moderator
- Purpose: Same-origin Bearer proxy of api
POST /trust/confirm-moderatorwith{ accountId }. - Errors: Upstream 400/401/403/404/409/503, or 502 if the api is unreachable.
- Used by:
postTrustConfirminMemberTrustActionsandProposalsScreen. - Auth: Bearer (moderator, not the proposer).
Endpoint: POST /trust/appoint-moderator
- Purpose: Same-origin Bearer proxy of api
POST /trust/appoint-moderatorwith{ accountId }. - Errors: Upstream 400/401/403/404/409/503, or 502 if the api is unreachable.
- Used by:
postTrustAppointinMemberTrustActions. - Auth: Bearer (founder).
Endpoint: POST /funding/apply
- Purpose: Same-origin Bearer proxy of api
POST /funding/apply. Rolebasisis 403. Effectivenoneorrejectedbecomes pending. - Errors: Upstream 401/403/409/503, or 502 if the api is unreachable.
- Used by:
postFundingApplyviaFundingStatusCardon/profile. - Auth: Bearer session; the api requires a role other than
basis.
Endpoint: GET /funding/applications
- Purpose: Same-origin Bearer proxy of api
GET /funding/applications(open grant applications for moderators). Lives under/funding/applicationsbecause Next.js forbids aroute.tsbeside the HTML page at/moderate/applications. - Errors: Upstream 401 without a Bearer session, 403 when the account is not founder or moderator, 503 when the api is unavailable, or 502 JSON if this proxy cannot reach the api origin.
- Used by:
fetchFundingApplicationsviaFundingApplicationsScreenon/moderate/applications.ModerateScreenon/moderatedoes not call this GET. - Auth: Bearer session; the api requires founder or moderator. The app does not fetch this list for other signed-in roles (forbidden copy, no request).
Endpoint: GET /funding/applications/[accountId]
- Purpose: Same-origin Bearer proxy of api
GET /funding/applications/:accountId(staff review payload: account, grant, living-room posts). - Errors: Upstream 401/403/404/503, or 502 if the api is unreachable.
- Used by:
fetchFundingApplicationviaFundingApplicationDetailScreenon/moderate/applications/[accountId]. - Auth: Bearer session; the api requires founder or moderator.
Endpoint: POST /funding/trial
- Purpose: Same-origin Bearer proxy of api
POST /funding/trialwith{ accountId }. Target must be effective pending. - Errors: Upstream 400/401/403/404/409/503, or 502 if the api is unreachable.
- Used by:
postFundingTrialinFundingApplicationDetailScreen. - Auth: Bearer (founder or moderator).
Endpoint: POST /funding/admit
- Purpose: Same-origin Bearer proxy of api
POST /funding/admitwith{ accountId }. Target pending or trial. - Errors: Upstream 400/401/403/404/409/503, or 502 if the api is unreachable.
- Used by:
postFundingAdmitinFundingApplicationDetailScreen. - Auth: Bearer (founder or moderator).
Endpoint: POST /funding/reject
- Purpose: Same-origin Bearer proxy of api
POST /funding/rejectwith{ accountId }. The subject may re-apply. - Errors: Upstream 400/401/403/404/409/503, or 502 if the api is unreachable.
- Used by:
postFundingRejectinFundingApplicationDetailScreen. - Auth: Bearer (founder or moderator).
Endpoint: GET /forum/messages/[id]
- Purpose: Same-origin Bearer proxy of api GET
/messages/:id. App path is/forum/messages/[id]so HTML/messages/[id]can stay the page. Staff (founder/moderator) receive a soft-hidden row withdeletedAt/deletedBy; unsigned/non-staff hidden ids stay 404. - Errors: Upstream 401/403/404, or 502 if the api is unreachable.
- Used by:
fetchForumMessageviaPublicMessageLoaderon/messages/[id]. - Auth: Bearer; staff hide-stamps only when the api role is founder or moderator.
Endpoint: DELETE /forum/messages/[id]
- Purpose: Same-origin moderation proxy to DELETE /messages/:id.
- Auth: Forwards Bearer authorization; the API requires live moderator role.
- Returns: Upstream 204, 401, 403, 404 or 503; proxy failures return 502.
- Side effects: Deletes the post, direct replies and stored media on 21.gifts. Does not refund gifts or erase external Nostr relay copies.
Endpoint: GET /translate
- Purpose:
{ available: boolean }fromTRANSLATE_URL(no upstream call). Always 200. - Errors: none (invalid URL treated as unavailable).
- Used by:
fetchTranslateAvailableinNoteTranslate. - Auth: Public.
Endpoint: POST /translate
- Purpose:
{ text, target }→ LibreTranslate-compatible upstream; returns{ translatedText }.filmaps totl. Max 500 chars. 15s timeout. Does not forward Authorization. - Errors: 400 invalid body, 503 not configured, 502 upstream.
- Used by:
translateNotefromNoteTranslate. - Auth: Public.