Skip to content
whisk
FeaturesExamplesGuidesDocsPricingStatus
Sign inStart free
whisk

Websites, shops, apps, portals and tools, built with AI. Run your own.

ProductFeaturesExamplesPricingUsage allowancesStatus
LearnDocsGuidesComparisonsLearnResearchSkill
CompanyAboutContactSecurity
LegalTermsAcceptable usePrivacyData processingTakedown
System statusPrices in US dollars.

Docs

  • Getting started
  • The rules
  • Manifest
  • Headers
  • Environment
  • Errors
  • Doctor rules
  • CLI reference

Files

  • SKILL.md
  • whisk.schema.json
  • graph.schema.json
  • webhook-presets.yaml
  1. Docs
  2. Headers

Headers

From headers.md, the same document your agent reads.

The platform sets these request headers on every request that reaches an app. Any header beginning X-Whisk- that arrives from the internet is removed before these are set, so an app may trust them without checking anything else. The only way to reach an app is through the platform edge; there is no other path that could set them.

Identity headers

HeaderPresent whenValue
X-Whisk-Audiencealwaysanonymous, team, customer or service
X-Whisk-User-Idteam, customerstable ULID of the person; the key to store
X-Whisk-Emailteam, customerverified email, lower case
X-Whisk-Nameteam, customerdisplay name; may be empty
X-Whisk-Orgteam, customer, serviceorg ULID
X-Whisk-Groupsteamcomma-separated group names; absent when the person is in no group
X-Whisk-Rolesteamcomma-separated org roles: owner, admin, developer, billing, member; guest appended for guests
X-Whisk-Session-Idteam, customer; absent on an agent's requestopaque; for log correlation only
X-Whisk-Agentteam, when an agent acting for the person sent the requestthe agent's name, such as Claude
X-Whisk-Agent-Idwith X-Whisk-Agentstable ULID of the agent; store it beside a change to say which agent made it
X-Whisk-Service-Appservice, app-to-appULID of the calling app
X-Whisk-Flagsa feature flag whisk.yaml declares is on for the personcomma-separated flag names, in alphabetical order; absent when none is (CONTRACT.md §3.3)
X-Whisk-Request-IdalwaysULID; echo it in every log line. Also returned on the response so a client can quote it.
X-Whisk-Countrythe edge places the visitor's address in a countrytwo capital letters, ISO 3166-1 (NZ, DE); absent when the address is in none, such as on an app-to-app call. From DB-IP's country data, so treat it as a hint for defaults (currency, language), never as proof of where someone is. A page whose answer depends on it sends Vary: X-Whisk-Country, which the edge's cache keys on; a page the app's CDN keeps a copy of is the same for every country.
traceparentalwaysW3C trace context, 00-<trace id>-<parent id>-01. The trace id is the request id's 16 bytes in hex, so an OpenTelemetry SDK that continues it records the request under its request id. Whatever the caller sent is replaced, and tracestate removed.

Audiences:

  • anonymous: a public route with no session. Only X-Whisk-Audience, X-Whisk-Request-Id and, when known, X-Whisk-Country are present.
  • team: a member or guest of the org that owns the app, with a grant to it.
  • customer: a user of the app's own customer pool (customer_identity: app | org). No groups, no roles. Authorise customers by X-Whisk-User-Id against your own tables.
  • service: the platform itself (function runs, webhook deliveries) or another app in the org calling through <app>.internal.whisk. X-Whisk-Service-App names the caller for app-to-app calls and is absent for platform deliveries.

Agents: a coding agent acting for a person sends Authorization: Bearer whsk_agent_… (its Whisk credential) to the app's address. The edge checks it and removes it, then sets that person's team headers, plus X-Whisk-Agent and X-Whisk-Agent-Id. The request is the person's, made through their agent: record it as theirs and, where the app keeps a history, note the agent. An agent identity needs read for GET, HEAD and OPTIONS and change for anything else; a token needs deploy and to cover the app; either way the person needs a grant to the app. An owner of the app's business may send their whisk login instead, signed by its computer with Whisk-Signature (whisk call does this); the edge removes the signature too, and the request arrives exactly like an agent token's, named by the login. Anyone else's login is refused. A refusal is the standard error body (TOKEN_SCOPE, TOKEN_SIGNATURE, AGENT_CATEGORY, AGENT_PAUSED, TOKEN_EXPIRED, TOKEN_REVOKED, FORBIDDEN_ROLE) and never reaches the app. Any other Authorization header reaches the app unchanged.

Chat assistants: an app that names its MCP server in the manifest (mcp.path) can be added to Claude or ChatGPT as a connector at https://<app address><mcp.path>. The edge answers the sign-in for it: a request to that path without a credential is 401 with WWW-Authenticate: Bearer resource_metadata="https://<app address>/.well-known/oauth-protected-resource<mcp.path>", and the person allows the connection at auth.whisk.run. The assistant's requests then arrive like any agent's, with X-Whisk-Agent naming it (Claude, ChatGPT); its token reaches nothing but that path. On the MCP path an agent's request is judged by its JSON-RPC messages: listing and reading (initialize, tools/list, resources/read and the like), notifications and tools/call of a tool in mcp.read_tools need read; everything else needs change.

Public routes: when the visitor has a session and a grant, the identity headers are present on a public route too, so a public page can greet a signed-in person. Without a session the route is served as anonymous. A public route never redirects to login.

Private routes without a session: a browser navigation receives a 302 to the platform login; any other request receives 401 with the standard error body and WWW-Authenticate: Whisk realm="<hostname>".

Service routes: queue.endpoint and every webhooks[].handler are reached only by the platform. They need not be listed in routes.public. A request to them from the internet is answered 401 AUTH_REQUIRED by the edge and never reaches the app.

Delivery headers

Set in addition to the identity headers, which read X-Whisk-Audience: service.

Function runs (queue.endpoint): X-Whisk-Job-Id (the run ID), X-Whisk-Job-Attempt (0-based). The Inngest SDK verifies the request with WHISK_INNGEST_SIGNING_KEY; an app that implements the protocol itself must do the same.

Webhook deliveries (webhooks[].handler):

HeaderValue
X-Whisk-Webhook-IdULID of the stored event; the same on every retry and replay, so dedupe on it
X-Whisk-Webhook-Sourcethe source name from the manifest
X-Whisk-Webhook-Received-AtRFC 3339 UTC time the platform received it
X-Whisk-Webhook-Orig-<Name>every header the provider sent, prefixed; X-Whisk-Webhook-Orig-Stripe-Signature for example
X-Whisk-Delivery-Signaturev1=<hex>: HMAC-SHA256 under the app's WHISK_DELIVERY_KEY (base64-decoded) over <X-Whisk-Webhook-Id> "\n" <X-Whisk-Webhook-Received-At> "\n" <raw body>; present on every delivery and replay

The body is the provider's raw body, byte for byte. Content-Type is the provider's. The provider's signature has already been verified; an app never sees an unverified body. The handler verifies X-Whisk-Delivery-Signature in constant time and refuses a request that lacks it or carries X-Whisk-Service-App with 401 DELIVERY_UNVERIFIED; fixtures/deliveries/ holds a signed delivery and its key for a test.

The delivery headers are platform-only. The internal listener strips every inbound X-Whisk-* header; X-Whisk-Webhook-*, X-Whisk-Delivery-Signature and X-Whisk-Job-* survive only on a request the platform itself makes, never on an app-to-app call, and the queue endpoint answers 401 to anything that is not the platform. A delivery therefore never carries X-Whisk-Service-App: a handler that sees it is looking at another app's call and refuses it. The templates' deliveries helper does all of this before the app's own code runs, and doctor warns (W053) when a handler does not use it.

Forwarding headers

Standard proxy headers, set by the edge: X-Forwarded-For (client IP first), X-Forwarded-Proto (https), X-Forwarded-Host, X-Real-IP. The Host header is the hostname the visitor used, which on a custom domain is the custom domain.

Endpoints the platform answers in front of the app

These paths are reserved on every app hostname and never reach the app:

PathBehaviour
/.whisk/login?return=<path>Forces login, then redirects to return. Use it to sign someone in from a public route.
/.whisk/logout?return=<path>Ends the session on this hostname, then redirects to return.
/.whisk/ready200 when the app is awake; used by the waking page.
/.whisk/media/<id>, /.whisk/player.jsAn uploaded video or audio file and the player that plays it.
/.whisk/file/<id>Any uploaded file, whatever its type, opened under its own name and type, gzipped when it compresses, with Link: <…>; rel="canonical" when the upload names one: for anyone when the upload is public, else for people the app lets in.
/.whisk/img/<id>?w=&h=&fit=&format=An uploaded image in the size and format asked for. X-Whisk-Image says how: kept (made before, which includes the sizes the app's pages usually ask for, drawn once the upload passes its scan), drawn (made for this request) or nearest (the image has as many sizes as it may keep, so the nearest one answered).
/.whisk/bar.jsThe Whisk bar's script.
/.well-known/oauth-protected-resource, and the same followed by mcp.pathThe MCP server's OAuth metadata (RFC 9728), when the manifest names mcp.path; otherwise the app's own.
either, with exp, kid and sigA private upload for someone without a Whisk sign-in, through a link the app's server signed with POST …/uploads/links (CONTRACT.md §8).

return must be a path on the same hostname; anything else is replaced with /.

The Whisk bar

An app whose manifest names its admin (admin.path, and optionally admin.edit) gets the Whisk bar. A page loaded by someone in the app's business (X-Whisk-Audience: team, not a guest) carries a 32 px strip across the top, which they can hide: the Whisk dot (the app's dashboard page), Admin (admin.path), Edit page (admin.edit with {path} replaced by the page's path, percent-encoded), their name and Sign out. The edge adds a <script src="/.whisk/bar.js"> tag just after the page's <head> tag and answers that page with Cache-Control: private, no-store. Customers, guests, agents and the public get the page exactly as the app wrote it, and so does every fetch, frame and download. The bar draws in its own shadow root and adds margin-top: 32px to <html>; nothing else of the page changes. With a Content-Security-Policy, it shows when script-src (or default-src) allows 'self', or carries a nonce, which the tag then uses; a policy of hashes only keeps it out.

A team member who signed in on the app's address stays signed in there while they stay signed in to Whisk: on a public page whose session has ended, the edge sends their browser through auth.whisk.run and back, never showing a sign-in page. The return carries __whisk_code or __whisk_quiet, which the edge takes off before the app sees the page.

Response headers

The edge adds security defaults to every response and the manifest's routes.headers overrides or adds named headers. Defaults: Strict-Transport-Security, X-Content-Type-Options: nosniff, Referrer-Policy: strict-origin-when-cross-origin, X-Frame-Options: SAMEORIGIN, Permissions-Policy: camera=(), microphone=(), geolocation=(), Cross-Origin-Opener-Policy: same-origin, Server: whisk, and Cache-Control: private, no-store on private routes when the app set none. Previews add X-Robots-Tag: noindex, nofollow. There is no default Content-Security-Policy; set one in routes.headers.

The edge compresses text answers (HTML, CSS, JavaScript, JSON, SVG and the like) with zstd or gzip for browsers that accept them. An answer the app already sends with a Content-Encoding passes unchanged.

Edge response cache

The edge keeps an answer the app marks cacheable and answers the same request again itself, without reaching the app or waking it. It keeps a 200 to a GET whose Cache-Control has max-age or s-maxage above zero, without no-store or no-cache, with no Set-Cookie, no Vary: *, and a body of at most 1 MiB, for that many seconds and never longer than an hour. The answer is kept per person: the key includes the hostname, the path and query, the identity headers above and the app's live deploy, so a new deploy starts empty, and it honours Vary on the request headers it names. HEAD is answered from the GET's entry. Requests to /.whisk/*, to the health path, with Authorization, Range or Upgrade, and every other method always reach the app; a request with Cache-Control: no-cache or Pragma: no-cache (a hard refresh) reaches the app and replaces the entry. Preview hosts and app-to-app calls are never cached.

HeaderPresent whenValue
X-Whisk-Cachethe answer was eligible for the edge cachehit: served from the edge cache, with Age in seconds since the app gave it; miss: the app answered and the edge kept the answer (when its body was within the limit)

Send Cache-Control: private, max-age=<seconds> on pages and reads that may be a little old, and public on a page anyone may see. Never put a max-age on an answer that must be current, and set a cookie only on answers that are not meant to be cached.

Every app on whisk.page is a neighbour of every other, so the platform binds each cookie to the app's own address with the browser's __Host- prefix, which no other host can set. A cookie the app sets as sid is stored in the browser as __Host-sid (any Domain removed, Path=/, Secure added) and reaches the app as sid again. A cookie in the browser without the prefix (one set from page script by its bare name, or planted by another site) never reaches the app and is deleted in the response; page script that sets a cookie for the server sets __Host-<name>=<value>; Secure; Path=/. The names __Host-whisk_session and whisk_session are the platform's and are dropped if an app sets them. A request other than GET, HEAD or OPTIONS that carries the app's cookies is accepted only from the app's own pages (CSRF_REJECTED otherwise; routes.csrf_off opts a route out), and a background request from another app's page (a fetch, an image, a websocket; not a link the visitor follows) arrives without cookies, so call another app server to server with a service token. Every app cookie is sent as Priority=High unless it names a priority. A Clear-Site-Data response header loses its "cookies" directive, which would clear every app's cookies on whisk.page; clear your own by expiring them with Set-Cookie. Apps own every other cookie.

What an app must never do

  • Read identity from anything other than these headers: not from a cookie, a query parameter, a JSON body or an Authorization header a client sent.
  • Forward X-Whisk-* headers to another service as if they were credentials. They are facts about this request only.
  • Build a login page. The platform owns sign-in; /.whisk/login is the whole integration.

On this page

  • Identity headers
  • Delivery headers
  • Forwarding headers
  • Endpoints the platform answers in front of the app
  • The Whisk bar
  • Response headers
  • What an app must never do