Widgets and collections

Manage origin-restricted browser upload widgets and ordered collections that publish branded file portals.

Upload widget management

POST/api/widgets
201 Created

Create a create-or-replace widget with explicit origins, file rules, destination, and approval policy.

Required scopeassets:write
Request body
{
  "name": "Campaign intake",
  "mode": "create",
  "destinationBucketId": "bucket_uuid",
  "acceptedTypes": ["image/*", ".pdf"],
  "maxBytes": 26214400,
  "buttonText": "Choose a file",
  "theme": "light",
  "allowedOrigins": ["https://example.com"],
  "approvalMode": "review",
  "allowAutoPublish": false,
  "active": true
}
Origins contain only scheme and host. The API accepts multiple array values and also normalizes comma- or whitespace-separated origins.
GET/api/widgets
200 OK

List widget configurations and public keys for the workspace.

Required scopeassets:read
PATCH/api/widgets/{widget_id}
200 OK

Replace a widget configuration using the same fields as create.

Required scopeassets:write
GET/api/widgets/submissions
200 OK

List reviewable, approved, rejected, failed, and expired widget uploads.

Required scopeassets:read
POST/api/widgets/submissions/{submission_id}/approve
200 OK

Commit a reviewed upload as a file or replacement and optionally add it to a collection.

Required scopeassets:write
POST/api/widgets/submissions/{submission_id}/reject
200 OK

Reject a reviewable upload and remove its temporary bytes.

Required scopeassets:write

Public widget capability

POST/api/public/widgets/{public_key}/initialize
200 OK

Validate the browser Origin, filename, MIME, and size, then return a ten-minute presigned upload URL.

POST/api/public/widgets/{public_key}/complete
200 OK

Consume the one-time session token and either publish or queue the upload for review.

Both public calls require a browser Origin matching the widget. The completion request also sends the short-lived session token as Authorization: Bearer. CORS is returned only for the validated origin.

Collections and portals

POST/api/collections
201 Created

Create a private, public, password-protected, or expiring collection.

Required scopeassets:write
GET/api/collections/{collection_id}
200 OK

Read collection settings and ordered items.

Required scopeassets:read
PATCH/api/collections/{collection_id}
200 OK

Update access, expiration, indexing, and eligible paid branding fields.

Required scopeassets:write
POST/api/collections/{collection_id}/items
200 OK

Add an asset that follows current or is pinned to one retained revision.

Required scopeassets:write
Request body
{ "assetId": "asset_uuid", "version": 12 }
PUT/api/collections/{collection_id}/items/order
200 OK

Replace the complete item order using every current item ID exactly once.

Required scopeassets:write
PATCH/api/collections/{collection_id}/items/{item_id}
200 OK

Pin an item to a revision or set version to null to follow current.

Required scopeassets:write
GET/api/collections/{collection_id}/analytics
200 OK

Read aggregate and daily portal views and downloads.

Required scopeanalytics:read
GET/api/public/collections/{slug}
200 OK

Read recipient-safe portal metadata and preview URLs after satisfying its access mode.

GET/api/public/collections/{slug}/items/{item_id}/preview
200 OK

Stream an inline preview without incrementing download analytics.

GET/api/public/collections/{slug}/items/{item_id}/download
200 OK

Download the resolved clean revision and increment portal download analytics.