Skip to main content
The embed flow renders Pathway’s Book interface inside your application. The person viewing it does not need a Pathway login or API token. Your server creates a book-scoped emb_... token with its PAT. Your frontend places that embed token in an iframe URL.
Create embed tokens on your server. The PAT used to create them must never be shipped to the browser.

Create an embed token

string
required
UUID of the Book the viewer can access.
boolean
default:"false"
Temporary tokens expire after 24 hours. Permanent tokens have no scheduled expiration.

Response

expires_at is null for a permanent token. Pathway keeps one active embed token per Book. When a valid token already exists, the endpoint returns that token and its current expiration.

Render the Book

URL parameters

string
Set light or dark. Set this explicitly when the embed should match the surrounding application.
string
Opens the Book on a specific available tab. Omit it to use the Book’s normal default.
The embedded Book reuses the same synopsis, transactions, credit, tax, application, file, and contract surfaces as the Pathway app. Available tabs depend on the parsed document types.

Render the funder directory

The same token can render the organization funder directory:
The directory is read-only under an embed token.

Fetch the embed payload directly

The embed token in the URL is the credential. Do not send the PAT.
analytics is null when the Book does not contain canonical bank data. Document objects include temporary presigned URLs used by the embedded viewer.

Validate a token

An invalid or expired token returns 401. A valid token returns the Book and organization context used by the iframe.

Security model

  • An embed token can read one Book and organization-level read surfaces used by the embed.
  • Mutating requests made with X-Embed-Token return 403.
  • Temporary tokens live for 24 hours.
  • Permanent tokens persist until removed from Pathway’s storage.
  • Anyone holding the embed URL can open it, so handle the URL as a secret share link.
Prefer temporary tokens for short sessions. Use permanent tokens when the same embedded report must remain available across visits.