Dashboard
How it Works Documentation Quick Start PAPI — Pages & Assets MAPI — Dynamic Data Integrations SAPI — Sessions & Forms MCP Server OpenClaw Skill Tools Deploy Dashboard
Gated File Delivery

Gated File Delivery

⚡ Built-in — Platform Built-in

Deliver private files (ebooks, PDFs, downloads) only to authenticated tenant members. Files stay on a non-public bucket; members get short-lived signed URLs (or app-streamed bytes). Access is checked live, so refund/cancel/expiry revokes it instantly. Never exposes a permanent public URL.

⚡ Built-in — No Setup Required This integration is built into the WebsitePublisher platform. All endpoints are available immediately — no API key needed.

Endpoints (7)

POST download

Get a short-lived download URL for a gated file. Requires a verified tenant_auth session (wst_ Bearer). Returns { url, expires_in, delivery, filename }. Entitlement is checked live.

Field Type Required Description
file_id integer ✓ Yes ID of the gated file (from put-file / list-files).
POST configure

Set project defaults: entitlement_mode (library|asset), delivery_mode (signed|stream), signed_ttl_secs (10..900).

Field Type Required Description
entitlement_mode string No library (tenant_code = whole library) | asset (explicit grants).
delivery_mode string No signed (presigned URL, default) | stream (app-streamed).
signed_ttl_secs integer No Lifetime of issued download URLs in seconds (10..900, default 120).
POST put-file

Register a private file. Provide exactly one source: storage_key (already-uploaded private path), base64 (inline bytes), or source_url (https, our own public storage — fetched into private). Optional per-file tenant_code / entitlement_mode / delivery_mode overrides.

Field Type Required Description
filename string ✓ Yes Display filename for the download.
storage_key string No Existing path on the private disk.
base64 string No Base64-encoded file bytes (small files).
source_url string No https URL on our own public storage to move into private.
content_type string No MIME type (default application/octet-stream).
tenant_code string No library-mode scope (omit = any tenant of this site).
entitlement_mode string No Per-file override of the project entitlement_mode.
delivery_mode string No Per-file override of the project delivery_mode.
metadata object No Custom metadata (e.g. product_id).
POST grant

Grant access to a file (entitlement_mode = asset). grant_type: tenant_code | tenant_user | plan.

Field Type Required Description
file_id integer ✓ Yes Gated file ID.
grant_type string ✓ Yes tenant_code | tenant_user | plan.
grant_value string ✓ Yes The tenant_code, tenant_user id, or plan.
POST revoke

Remove a previously granted access rule.

Field Type Required Description
file_id integer ✓ Yes Gated file ID.
grant_type string ✓ Yes tenant_code | tenant_user | plan.
grant_value string ✓ Yes The grant value to remove.
POST list-files

List gated files for this project, optionally filtered by tenant_code.

Field Type Required Description
tenant_code string No Filter by tenant_code.
limit integer No Page size (default 50, max 200).
offset integer No Pagination offset.
POST stats

Download statistics: files registered, downloads in the period, top files.

Field Type Required Description
days integer No Look-back window in days (default 30, max 365).

MCP Tool Names

When using this integration through an AI assistant (Claude, ChatGPT, Cursor, etc.), the endpoints are available as MCP tools:

EndpointMCP Tool Name
download gated-files_download
configure gated-files_configure
put-file gated-files_put_file
grant gated-files_grant
revoke gated-files_revoke
list-files gated-files_list_files
stats gated-files_stats
← Back to all integrations