Embedded editor

Create embedded editor session

Called from your backend. Exchanges the API key for a short-lived session token (emb_...) scoped to one template and one of your end users; your frontend mounts the editor with that token. Every AI turn in the session is metered against externalTenantId. Requires the Platform (or a custom) plan.

post/v2/organizations/{organizationId}/templates/{externalId}/embed-sessions

Request

  • Base URL: https://api.pdfs.build
  • URL: https://api.pdfs.build/v2/organizations/{organizationId}/templates/{externalId}/embed-sessions
  • Auth: HTTP bearer

Request body

externalTenantIdstring required

Your customer's id. AI usage in the session is metered against it.

externalUserIdstring required

The end user's id in your system, for attribution.

expiresInSecondsinteger

Session lifetime.

Response

The session token. Hand token to the browser; never the API key.

sessionIdstring required
tokenstring required

Session token (emb_...) for @pdfsbuild/react. Scoped to this template and user.

templateIdstring required

The template's internal id — what the SDK addresses the document by.

expiresAtstring date-time required

Changes

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