Call a declared app route or its unmatched-request fallback

External callers must use Bearer auth. The platform strips /app/<id> so the app sees /api/<operation>. A declared route handler returns exactly its outputSchema value without adding a transport envelope unless those fields belong to the schema; Charming validates it and wraps HTTP success as { ok: true, value }. window.charming.api uses renderToken and unwraps that envelope, so in-page callers receive the value directly. If no declared route matches, the optional default.fetch handles the request and its Response passes through unchanged; without that fallback, Charming returns a 404. Direct callers should use appToken or userToken.

post/app/{id}/api/{operation}

Request

  • Base URL: https://charm.ing
  • URL: https://charm.ing/app/{id}/api/{operation}
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Request body

object required

Input defined by the selected app operation. Fetch the app-specific /app/{id}/openapi.json document for its typed schema before generating a function input.

Response

A declared route returns { ok: true, value }, where value matches its outputSchema. A custom unmatched-request fallback response passes through unchanged.

object required

Declared route success uses { ok: true, value }; the route handler returns exactly the outputSchema value and does not add a transport envelope unless those fields belong to the schema. The open object schema also permits the author-defined body from an unmatched request handled by default.fetch.

Changes

No recorded changes to this operation across all 1 revision of this API.