Pages

Publishes one self-contained HTML document as a hosted web page with a stable link — no site, no build, no deploy wait. For reports, briefs, plans, interactive charts and sortable tables: anything the user should open and keep. The HTML must inline its CSS and JS or load them from absolute CDN URLs, and runs sandboxed with no cookies or localStorage. Publishing the same slug again replaces the page at the same URL and keeps the previous version. Pages are capped at 2 MB. Not for a storefront or anything that needs a database or server logic — that is a site.

post/pages

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

object required
html, string

The page's HTML. Give exactly one of html or file_path.

file_path, string

Absolute path of the HTML file on the account's Crevio computer (e.g. /workspace/reports/q2.html). Give exactly one of html or file_path.

slug, string

URL slug: lowercase letters, digits and hyphens. Becomes the page path, so pick something readable. Defaults to a slug of the page's <title>.

access, 'public' | 'members' | 'specific_members'

Who can open the link. members: signed-in members of this account. specific_members: only the people in members and groups (account admins keep access). public: anyone on the internet — only when the user explicitly asked for a shareable public link.

members, string[]

For specific_members: emails of team members allowed to open the page. Someone who is not on the team fails the call; invite them first.

groups, string[]

For specific_members: names of the account's groups whose members may open the page.

named_only, boolean

For specific_members: keep account admins out too, so only the named people and groups and the page's access manager can open it.

live_tools, string[]

Read-only tool roles the page may call at view time (e.g. crevioApi.listOrders), for a dashboard that stays current: in the page, crevio.watch(role, args, ({data, storedAt, cached, error}) => render(...), {refreshEvery: 60000}) shows the last result instantly and refetches it; await crevio.call(role, args) fetches once. Calls run as whoever views the page. Data stays off until an account admin approves it, which happens on its own when an admin asked for the page in the chat. A live page cannot be public. Omit for a static page; republishing without it makes the page static again.

overwrite, boolean

Replace an existing page of the same slug. false fails instead.

screenshot, boolean

Render a preview image of the page. Gated links do not unfurl, so pair the preview with the link on other surfaces.

Response

Page replaced

intersection required
object
replaced, boolean required

Whether a page with this slug was replaced.

note, string required

How to share the link.

screenshot_error, string

Why no preview was rendered. The page is live either way.

Changes

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    4 more changes in this revision