Skip to endpoints
Feelcouch ProjectsAPI reference · v1.24.0

Version 1.24.0-demo

Public demo API

Public read-only demonstration API. Every response contains static demo data and must not be treated as live production telemetry.

HTTP interface

Endpoints

15 operations
GET/api/demo/legal/[kind]

Read a synthetic legal PDF in the isolated hosted demo

Available only to authenticated synthetic accounts on the explicitly allowed hosted demo origin. These documents are demonstrations and are not approved course legal materials.

200
Synthetic PDF; private, no-store
404
Demo disabled, unapproved origin, non-demo account or unknown document kind
Session cookie
GET/api/billing

Read the authenticated tenant's plan and authorized invoices

Tenant scope comes only from the trusted runtime deployment, never a request parameter. Signed-in participants and facilitators receive the plan with an empty invoice array; only ADMIN callers receive tenant invoice details. No payment is submitted and no payment credentials are accepted. Missing platform billing configuration or unapplied billing migrations fail closed with a sanitized 503 response. Every response is private, no-store and noindex.

200
Tenant plan and ADMIN-only invoices; invoices are empty for other roles
401
UNAUTHENTICATED: no active authenticated account
404
Preview disabled: BILLING_PREVIEW_ENABLED must equal true; no authentication or database reads occur.
503
BILLING_NOT_CONFIGURED or BILLING_UNAVAILABLE: billing cannot be read; SQL and connection details are never returned
Session cookie
GET/api/platform/admin/billing

Read protected aggregate entitlement counts by plan

Requires the platform operator gate. Returns aggregate counts only: no tenant identifiers, invoices, participant data or payment credentials. Every response is private, no-store and noindex. This endpoint performs no payment operation.

200
Aggregate platform entitlement counts
403
FORBIDDEN: the request did not clear the platform operator gate
404
Preview disabled: BILLING_PREVIEW_ENABLED must equal true; no authentication or database reads occur.
503
BILLING_NOT_CONFIGURED or BILLING_UNAVAILABLE: billing tables or the platform connection are unavailable
platformAdminGate
GET/api/platform/templates

List available demo templates

200
Static template catalogue
Open, no sign-inView response
GET/api/platform/projects

List example platform projects

200
Static project inventory
Open, no sign-inView response
GET/api/platform/status

Get the privacy-safe platform status snapshot

200
Recorded probe history, or hosted-only public URL checks with real timestamps and latency. Public aggregates expire in 30 seconds; generic protected access checks are not functional login tests. Private URLs and per-tenant inventories are omitted.
Open, no sign-inView response
GET/api/health

Report runtime and database readiness

Used by the container healthcheck, the blue/green switch and the public status page. Never cached, and it reveals no configuration detail beyond the state word.

200
The runtime answers and its database query succeeds
503
Either the production configuration is incomplete or the database query failed
Open, no sign-inView response
GET/api/version

Report the release this container was built from

The release tag is baked into the image at build time. A deployment reads it through the public URL to prove the release it switched traffic to is the release actually answering, and every response also carries it as the X-Feelcouch-Release header.

200
The build identity of the running container
Open, no sign-inView response
GET/api/openapi

Serve this OpenAPI 3.1 document

200
The machine-readable contract
Open, no sign-inView response
GET/api/avatar/[userId]

Fetch a participant avatar through the server

Proxies the current Telegram profile photo. Visible to the user, administrators and people who share a group with them; anyone else gets 404.

200
The avatar image
401
No session on the request
404
No avatar, or the caller may not view it
Session cookie
GET/api/reports/final/[participantId]

Download the final course report as a PDF

A participant may fetch only their own report and only after the facilitator published it. A facilitator may fetch it at any time (preview) for participants of their own groups. Diary entries marked private-to-self are never included.

200
The report as a PDF attachment
401
No session on the request
403
The caller may not read this participant's report
404
The report is not published yet
Session cookie
GET/api/account/export

Download every record held about the signed-in participant

Answers the data portability request with the participant's own records only. The workbook answers carry the wording that was published when they were written, not the wording published today. Each successful export is written to the audit log.

200
A downloadable JSON document scoped to the caller
401
No participant session on the request
Session cookie
POST/api/telegram/auth

Exchange Telegram Mini App init data for a session

Verifies the init data signature, consumes an invite on first sign-in and sets the session cookie. Init data is never logged: only its digest is kept, and only to throttle replays.

200
Session established; the body names where to continue
400
Malformed body, init data or invite token
401
Init data failed verification, or the invite is used, revoked or expired
403
Untrusted request origin, or the account is suspended
413
The request body exceeds the accepted size
429
Too many attempts for the same init data
500
Temporary sign-in failure
503
The bot is not configured in this environment
Open, no sign-in · JSON body required
POST/api/telegram/webhook

Receive a Telegram Bot API update

Called by Telegram, never by a client. The shared secret header is compared in constant time. An update that cannot be processed is still acknowledged so Telegram does not retry a poison message forever.

200
The update was accepted, ignored or deduplicated
400
The body is not a JSON object
401
Missing or incorrect secret token header
413
The update exceeds the accepted size
502
A reply to Telegram could not be delivered
503
The bot is not configured in this environment
Secret token header · JSON body required
GET/api/platform/admin/operations

Read grouped counts of redacted operational events

Gated operator read over the retention window. Only event names, reason codes and counters are returned; no token, identifier, name or participant content is ever stored or served.

200
Grouped operational event counts over the retention window
403
The request did not clear the platform admin gate
platformAdminGate

OpenAPI 3.1

Contract schemas

BillingEntitlementBillingInvoiceBillingResponseBillingCountsResponseDemoMetaTemplateProjectLiveStatusMetaUptimePointStatusOverallStatusGroupTemplatesResponseProjectsResponseRuntimeVersionHealthOkHealthUnavailableErrorCodeErrorMessageWebhookAckTelegramAuthRequestTelegramAuthResponseAccountExportPublicStatusResponseStatusResponse