LumiCodex API

API Documentation

Use the LumiCodex API to authenticate, manage albums, ingest high-resolution photography for tiled, color-managed delivery, and send documents for electronic signature.

Base URL and requests

All endpoints are served from the production API host. Send and receive JSON.

https://api.lumicodex.com/ Authenticated requests use Authorization: Bearer <token>. For endpoints that stream (Server-Sent Events) where headers can't be set, pass the token as a token query parameter. const res = await fetch( `https://api.lumicodex.com/accounts/${accountId}/containers`, { headers: { Authorization: `Bearer ${token}` } }, ); const albums = await res.json(); Your accountId is the account your credentials belong to; it appears in the admin and scopes every path below. Albums are containers with subType === "album".

Authentication

Sign-in is multi-step. /auth/sign-in returns 206 Partial Content with a challenge; submit the factor to obtain the final token. Do not assume a single call returns a full session.

curl -X POST https://api.lumicodex.com/auth/sign-in \ -H "Content-Type: application/json" \ -d '{ "emailOrPhone": "you@example.com" }'

A 206 response returns an AuthResult with type: "factor-one" and a temporary token. Present the challenge described by channel and method.

curl -X POST https://api.lumicodex.com/auth/sign-in-factor-one \ -H "Authorization: Bearer <factor-one token>" \ -H "Content-Type: application/json" \ -d '{ "secret": "password-or-one-time-code" }'

If a second factor is required, you get another 206 with type: "factor-two". Otherwise a 200 returns the final token, tokenExpires, refresh, and refreshExpires. Refresh with GET /auth/refresh using the refresh token.

One user can own or administer several accounts. Each account has its own content, permissions, and billing; use the intended account ID in every request. Private complimentary access is granted to an account by a platform operator and uses the same authentication and permissions as a paid account.

A confirmed user without an account can complete first-account onboarding with POST /accounts/{accountName}, using a bearer session token and no request body. The 200 response contains accountId and uniqueName; the signed-in user becomes its owner. Refresh the auth token after creation to receive the new permission. Names already in use and reserved names return 400. Users who already own or administer an account receive 403; contact platform support to provision an additional account. Each account requires its own SaaS subscription unless an operator explicitly grants complimentary access.

GET /usage/{accountId}/current returns current usage, effective storage, bandwidth and seat limits, and billing state. The boolean isComplimentary indicates permanent operator-granted access. When true, no SaaS subscription or payment method is required; the separate subscriptionStatus field still describes Stripe state. This endpoint requires permission on the account.

Platform operators with moderation permission and an active two-factor admin session can search GET /ops/admin/accounts by account ID, name, or account user email using q. Set sort to created (newest first), activity (most recent first), or name (A–Z). Without an explicit sort, searches rank by relevance and the directory lists new accounts first. Use offset and limit (default 50, maximum 200) to page through the matches. Each entry includes users (ID, email and name) and userCount for distinct users with an account-level permission. owners lists the subset with owner or admin permission. groups counts collections and albums counts album-type containers. Opening another account through platform admin access creates an audit event that is excluded from lastActivity.

API keys

Server-to-server callers authenticate with an API key in the x-api-key header instead of a bearer token. A key belongs to one account and carries no user identity.

curl https://api.lumicodex.com/health/hello2 \ -H "x-api-key: <api key>" Keys are stored hashed. The key is returned once, by the create call, and cannot be retrieved afterwards — a lost key is rotated, not recovered. Managing keys requires a bearer token with owner permission on the account; a request authenticated with an API key may list keys but not create, delete, disable or enable one, so a leaked key cannot be used to mint a replacement that outlives its revocation. curl -X POST https://api.lumicodex.com/accounts/{accountId}/apikeys \ -H "Authorization: Bearer <auth token>" \ -H "Content-Type: application/json" \ -d '{ "name": "uploader", "permission": "o" }' Label for the key. Optional, but the only way to tell keys apart besides keyHint. ISO-8601 expiry. Optional; omit for a key that does not expire. Must be in the future. One of o owner, c contributor, v viewer, s share, e e-signature, granted on this account. Omit for a key with no resource permissions, which reaches only endpoints that do not require one. Platform-level characters are rejected.

201 returns { "apiKey": { … }, "key": "<the key>" }. Store key immediately. The apiKey object is the same shape the list call returns: id, name, keyHint, createDate, expires, disabled, permissions, roles. It never contains the key.

curl https://api.lumicodex.com/accounts/{accountId}/apikeys \ -H "Authorization: Bearer <auth token>"

Disable a key with POST …/apikeys/{keyId}/disable and restore it with POST …/apikeys/{keyId}/enable — the reversible half of revocation, useful for confirming a rotation before anything is destroyed. DELETE …/apikeys/{keyId} removes it permanently. All three answer 204, or 404 when the id is not an API key on the account.

Albums

Albums (containers) hold your images. All calls require a bearer token with container permissions.

curl https://api.lumicodex.com/accounts/{accountId}/containers \ -H "Authorization: Bearer <auth token>" curl -X POST https://api.lumicodex.com/accounts/{accountId}/containers \ -H "Authorization: Bearer <auth token>" \ -H "Content-Type: application/json" \ -d '{ "name": "Wedding — June 2026" }' Album name. Required on create. Optional album description. Visibility: -1 inherit, 0 private, 1 public.

Publish an album with POST /accounts/{accountId}/containers/{containerId}/publish, and set visibility with PUT …/access/{access}.

Save album header options with PUT …/containers/{containerId}: gridShowAlbumTitle and gridShowMediaCount are optional booleans, both off when unset. Send false to turn an option off; omitted fields keep their saved values. Album reads and published JSON carry both settings. Publish after saving to update embedded galleries. The embed attributes show-album-title and show-media-count accept "true" or "false" and override the saved choices. The title option includes the description outside dialogs.

Item sorting and manual order

PUT /accounts/{accountId}/containers/{containerId}/ordering saves the draft order and returns the updated album. It requires contributor permission. Read the album first and send its orderingRevision as expectedRevision (use 0 when absent).

{ "sortCriteria": 1, "sortDescending": false, "expectedRevision": 0 } 0 upload date, 1 filename, 2 date taken, 3 rating, 4 color tag, 5 manual. Defaults to false. Manual order requires false. Missing metadata stays last in either direction; filenames compare case-insensitively with natural number ordering. The revision from the latest album response. A stale revision returns 409; reload before retrying. For manual ordering, send every current visible item id exactly once in the desired order (maximum 10,000). Duplicate or malformed ids return 400; a changed membership returns 409. Omit this field when choosing an automatic sort.

Selecting manual mode without itemIds restores saved manual ranks, or captures the current visible order on first use. Automatic sorting preserves those ranks. New photos and videos append in manual mode. Large saves retain a durable order while ranks are written; an interrupted save can be completed by reloading and retrying the ordering request.

Publish the album or containing collection separately to update its published snapshot. Changing the order does not publish content, move media files, or change visibility. MCP clients can use containers_set_ordering with the same camelCase parameter names.

High-resolution image ingestion

Upload is two-phase: request presigned upload URLs, then upload files directly and watch encoding.

curl -X POST https://api.lumicodex.com/accounts/{accountId}/containers/{containerId}/ingests \ -H "Authorization: Bearer <auth token>" \ -H "Content-Type: application/json" \ -d '{ "files": ["photo-001.tif"], "outputFormats": ["webp"], "previews": [512, 1024, 2048] }' File names (not paths). Required, 1 to 500 per request. Delivery formats supported by the encoder. Up to 4 preview sizes, each ≤ 4096.

The response is one upload preparation per file. Match each entry back to your file with clientFileId, the index of the name in the files array you sent — never assume the response keeps your order.

[ { "clientFileId": 0, "fileName": "photo-001.tif", "ingestId": "18d0846a1f2k4p8m7qz", "uploadUrl": "https://…", "expiresAt": "2026-09-06T10:12:44.318Z" } ] Index of this file in the request's files array. Ingest id, used to poll encoding status. Also returned as id. Pre-signed storage URL to PUT the bytes to. When uploadUrl stops working. Present when a file could not be prepared: subType: "error" with a message. The other files in the batch are still valid.

PUT the raw bytes to each uploadUrl — do not send your LumiCodex token to the storage URL. Then follow encoding, either by polling statuses or by subscribing to the task stream.

const statuses = await fetch( `https://api.lumicodex.com/accounts/${accountId}/containers/${containerId}/ingests/statuses`, { method: "POST", headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json", }, body: JSON.stringify({ ingestIds }), // 1 to 1000, no duplicates }, ).then((r) => r.json()); // [{ ingestId, state, fileName, message, stackTrace }] // state: "processing" | "complete" | "error" | "unknown" const url = `https://api.lumicodex.com/accounts/${accountId}/containers/${containerId}/tasks?token=${encodeURIComponent(token)}`; const source = new EventSource(url); source.addEventListener("message", (e) => { const tasks = JSON.parse(e.data); // IngestInfo[] still processing }); source.addEventListener("complete", () => source.close()); A task that no longer appears in the active list has finished encoding. Tasks with subType === "error" failed. Refresh the album with GET …/containers/{containerId} to get final items.

Collections

Collections gather albums together — by client or by season, for example. The REST resource is named groups.

curl https://api.lumicodex.com/accounts/{accountId}/groups \ -H "Authorization: Bearer <auth token>" curl -X POST https://api.lumicodex.com/accounts/{accountId}/groups \ -H "Authorization: Bearer <auth token>" \ -H "Content-Type: application/json" \ -d '{ "name": "Clients" }' Collection name. Required on create. Optional description. Visibility: -1 inherit, 0 private, 1 public.

Add or remove an album with PUT / DELETE /accounts/{accountId}/groups/{groupId}/containers/{containerId}. Publish with POST …/groups/{groupId}/publish; set visibility with PUT …/access/{access}.

Client Galleries

Create a client gallery with {"name":"Portrait session","purpose":"customer-delivery","websiteId":"…"}. Omit websiteId to associate a website later. The API defaults client galleries to private access and enables downloadPreview and downloadOriginal. Existing collections with no purpose remain ordinary collections; purpose cannot change after creation.

Use PUT …/groups/{groupId} to set websiteId, downloadPreview, or downloadOriginal; use {"removeWebsite":true} to unlink the website. The website must belong to the same account. Album membership, access, ordering, layout, publishing, and sharing use the collection endpoints. Client galleries and their member albums cannot appear in public website selections, even if you change their media access to public.

Assign customers through the collection’s gallery-access policy using invitedEmails. Each customer receives the ordinary collection Viewer permission. Once the associated website is published, the customer can sign in there and open the gallery from Your Galleries. Website passwords, website share links, and website Viewer permissions do not grant access to client galleries.

Sort albums within a collection

Read GET …/groups/{groupId} for the current orderingRevision (use 0 when absent), then save the draft order. Contributor permission is required. This orders albums within the collection; each album keeps its own photo sorting.

{ "sortCriteria": 1, "sortDescending": false, "expectedRevision": 0 } 0 created date, 1 album name, 5 manual. Photo-only criteria 2–4 are not supported for collections. Defaults to false. Must be false for manual order. Missing names and dates sort last in either direction; names use case-insensitive natural order. The revision from your last collection read. Defaults to 0 for a legacy collection. For manual ordering only: every current, non-blocked member album ID exactly once, in the desired order. Maximum 10,000 IDs. Omit to restore the saved manual sequence; the first switch captures the displayed order if there are no legacy ranks.

Returns the full collection with ordered containers, sortCriteria, sortDescending, and the new orderingRevision. Invalid requests return 400; stale revisions or a mismatched album list return 409. Refresh the collection after a conflict or a lost response before retrying. Automatic sorting preserves the manual sequence. Newly added or re-added albums append to that sequence. Saving does not publish: use POST …/groups/{groupId}/publish to update embedded galleries. Dynamic share reads can reflect the draft order.

The existing sortCriteria field on PUT …/groups/{groupId} remains supported for the same three criteria. Use the ordering endpoint to supply a revision, choose direction, or save a manual sequence.

Save collection presentation with PUT …/groups/{groupId}. gridComponent accepts lc-square-grid, lc-masonry-grid, lc-row-grid, lc-collage-grid (up to eight albums), or lc-carousel-grid. Compare is an album-only presentation. gridItemComponent accepts album-card (the default), lc-picture, lc-peekaboo-item, lc-kodak-frame-item, or lc-polaroid-frame-item; photograph components display each album's cover. The legacy lumicodex-* layout and item names remain supported.

Collection layout fields are returned by collection reads and included in published JSON: gridGap, gridColumns, gridAspectRatio, gridColumnMinWidth, gridColumnOffsets, gridRowMaxHeight, gridScrollAnimation, gridAreas, gridCollagePresetIndex, gridCarouselShowDots, gridCarouselAutoRotate, gridCarouselAutoRotateInterval (milliseconds), gridItemKodakAgedMedia, gridItemPolaroidCaption, gridItemPolaroidFontFamily, gridItemPolaroidFontSize, and gridItemPolaroidFontWeight. Polaroid captions can use name or description from the album, or none. Set gridNavigation to dialog (the embed default) or inline. The embed's navigation attribute overrides this saved choice. Publish after saving to update embedded collections.

Items and metadata

Items are the photos and videos inside an album. Read them through the album (GET …/containers/{containerId}); each item carries dimensions, delivery formats, EXIF-derived metadata (camera, lens, exposure), rating, color tag, and keywords.

New video items (mediaType: 2, encoding: 2) carry an optional, read-only videoThumbnailFile after their thumbnail has been copied to LumiCodex media storage. CoreUI uses this filename through the same public or authenticated private delivery paths as photographs. Older videos without it continue using the thumbnail endpoint.

Replace a video's thumbnail with PUT /accounts/{accountId}/containers/{containerId}/items/{itemId}/thumbnail, using a raw JPEG, PNG, or WebP body up to 8 MB and contributor permission. A successful request returns 204, copies a new version into media storage, and refreshes already-published album and collection snapshots. Reload album data to obtain the replacement filename.

curl -X PUT https://api.lumicodex.com/accounts/{accountId}/containers/{containerId}/items/{itemId} \ -H "Authorization: Bearer <auth token>" \ -H "Content-Type: application/json" \ -d '{ "smartX": 0.5, "smartY": 0.42 }' Horizontal focal point (0–1) for smart cropping. Vertical focal point (0–1) for smart cropping.

E-signature

The same account also sends documents for electronic signature. Envelopes have their own endpoints under /accounts/{accountId}/envelopes: create an envelope, upload documents, add recipients and a sender, send it, and download the signed files with a sealed certificate of completion.

E-signature reference →

Websites

Website commands require account authorization and the portfolio feature to be enabled for that account. Start with GET /accounts/{accountId}/portfolio-sites/capabilities; it returns canCreate, maxGeneratedSites, and a reason when creation is unavailable. Accounts can manage multiple websites. Each generation produces one design, saved directly as the editable draft.

Save the photographer identity with PUT /accounts/{accountId}/portfolio-identity, then create a website with POST /accounts/{accountId}/portfolio-sites/generate. Supply an Idempotency-Key header and the current identity revision. Creation advances the identity revision, so read it again before creating another website. Each generated draft saves its own profile; later edits and regeneration use that profile. The admin starts new websites with empty contact and social fields. Generation and publishing return 202 with a job ID and status URL.

{ "expectedIdentityRevision": 1, "name": "Ari Studio", "slug": "ari-studio", "brief": { "albums": [ { "containerId": "album-id", "order": 0 }, { "groupId": "collection-id", "order": 1 } ], "language": "en" } }

Each ordered selection identifies exactly one album with containerId or one collection with groupId. Public, private, published, unpublished, and empty sources are accepted. Private albums and collections use their existing names, descriptions, and public images as automatic previews. Public collections include previews of private member albums. Blocked content is excluded. Authenticated owner previews can include private photographs. Publishing requires a public hero photo or video; private photographs stay behind the access controls. Publishing does not change library access settings.

Set brief.heroContainerId and brief.heroItemId to choose a public hero photo or video from any album in the account. A private selection is rejected; the admin asks for permission before changing the album and selected media item to public. The hero album does not need to appear in brief.albums: only the chosen photograph is included unless that album is also selected as website content. Explicit photo choices are preserved, including portrait and smaller images.

A brief may omit albums or send an empty array. Creation requires confirmed public identity/contact details and a site address; name defaults to the public business or photographer name. Empty sources stay in the editor but create no empty public gallery. Set language to en or fr; capabilities lists these choices in languages.

Optional factual fields are biography (2,000 characters), approach (1,000 characters), and services (up to twelve strings, each up to 160 characters). The generator uses these only when the chosen composition includes the corresponding section. notes remains a separate, optional 500-character writing instruction. Regeneration preserves compatible saved manual edits, including cleared text, and removes bindings to sources no longer available.

Use GET /accounts/{accountId}/portfolio-sites to list websites and GET /accounts/{accountId}/portfolio-sites/{siteId}/draft to read a draft. Update selections with PUT .../{siteId}/brief using { "expectedRevision": 1, "brief": { ... } }, then call POST .../{siteId}/generate with { "expectedBriefRevision": 2 } and a new idempotency key. Preview with POST .../{siteId}/preview and publish with POST .../{siteId}/publish using { "expectedDraftRevision": 1 } and an idempotency key.

All wizard steps are optional. An omitted slug uses the normalized account name, with a numeric suffix if needed. Availability checks and creation reject reserved or misleading names (such as admin, security, support and www) and names belonging to another account. The default language is English.

The brief accepts showEmail and showPhone, both false by default, plus contactForm, true by default. Setting contactForm: false omits the entire contact section and links to it. Email and phone values stay out of public HTML and search metadata until explicitly enabled. Contact email is optional: enquiries remain available in the website inbox without email notifications. Add up to twenty externalLinks, each with a label (80 characters) and HTTPS url (1,000 characters); these links appear only in the navigation menu.

AI customization

Draft variant metadata includes copyStatus: completed means design and copy were customized together during generation, fallback means supplied text was retained after failure, not_used means AI was disabled, and not_needed means no text fields needed writing. Older deterministic drafts without copy metadata report not_recorded. This describes initial generation; later copy proposals have their own status.

Capabilities include customizationEnabled. When enabled, POST .../{siteId}/customize accepts { "expectedDraftRevision": 1, "instruction": "Make the introduction warmer", "mode": "copy" } and an Idempotency-Key header. Instructions are limited to 2,000 characters. Use mode: "copy" with an existing sectionId to humanize that section’s text. Use mode: "design" to customize theme, presets, order, individual gallery bindings, album presentation and text together in one AI request. AI keeps contact privacy and external links unchanged. The response is 202; poll the returned job URL. Customization jobs include expectedDraftRevision; fetch a completed proposal only while that revision matches the current draft.

Saved edits support showEmail, showPhone, contactForm, externalLinks, profile and albumPresentation. Set sources to an ordered array of {containerId, order} or {groupId, order} selections to update work without regenerating copy. An empty array clears the work selection. About and hero media bindings accept sections.{sectionId}.data: {containerId, itemId}; the selected item must belong to an account-owned album and be public before publishing. These draft edits retain the existing text and other sections. The optional profile contains displayName, businessName, location, publicEmail, publicPhone and socials. Update the account identity too when changing the notification address. Set sections.{sectionId}.removed to delete or restore a content section; the header and footer remain required. Album indexes use albumPresentation and cannot be bound to a single album. The admin saves edits as you type; publishing remains explicit. Setting showEmail: false removes the public email from page content and search metadata while retaining the enquiry form. Album presentation accepts auto (the default), paged (12 album covers per page), all (all album covers), or galleries (stacked Album Views). Automatic display counts items across standalone albums and collection members once: 500 or fewer uses stacked Album Views; 501 or more uses a standalone Album Grid and each collection’s configured layout. Collections keep their own named sections. Set sourcePresentations to a map from selected album or collection ID to auto, view, or grid for individual overrides. Overrides survive source changes. Stacked collection albums appear in a submenu; more than six standalone album links are grouped under Work. Grids have one section menu entry, without album links. Album opening always uses a dialog and does not change the page layout, scroll position, or menu. These settings cover the website’s selected albums and collection members; they do not add unselected library albums.

Set sections.{sectionId}.attributes.align to start for left-aligned titles or center for centred titles. Portfolio alignment also applies to collection headings and nested album headings. Header presets provide normal and transparent variants for every navigation layout. Portfolio display is managed through the Album View / Album Grid settings.

Once the job succeeds, GET .../{siteId}/proposals/{jobId} returns jobId, expectedDraftRevision, model, copyStatus, omissions, clarifications and sandbox-ready preview html. Generating or previewing a proposal does not change the draft. Accept it with POST .../{siteId}/proposals/{jobId}/apply and { "expectedDraftRevision": 1 }. Apply advances the draft revision; publish remains a separate command. A stale draft, brief or source returns 409. Repeating the same apply immediately returns the already-applied draft. Discarding a proposal requires no mutation.

Initial generation keeps factual fallback text when the copy provider fails. A failed copy rewrite leaves the draft untouched; a failed design request leaves the draft untouched. Initial generation and design customization each combine design and humanized copy in one request. AI is available with the website feature and server credentials, without separate AI or copy enable flags. Missing factual material is returned as omissions or clarification requests. Account quotas and durable AI usage accounting are deferred.

Website enquiries

POST /public/portfolio-sites/{siteId}/enquiries accepts JSON from the published website’s registered HTTPS origin. Send name (up to 160 characters), email, optional phone (80), message (5,000), an empty honeypot website, and renderedAt as a Unix timestamp in milliseconds. A form must be at least one second and no more than seven days old. The default request limit is 16 KiB and five submissions per IP per hour; 429 includes Retry-After. This route requires the enquiry feature to be enabled.

A successful submission returns an empty 202 after storing the enquiry. Notification email is sent asynchronously with retries; an email failure does not remove the message. Submissions with a filled honeypot receive the same response and are discarded. Unknown origins and unpublished, disabled or deleted sites return 404.

Authenticated account users can call GET /accounts/{accountId}/portfolio-sites/{siteId}/enquiries for { items, nextCursor }, with 50 messages per page, newest first. Pass the returned cursor as the URL-encoded cursor query parameter. Read one message with GET .../{siteId}/enquiries/{enquiryId}, URL-encoding the enquiry ID. Each message includes name, email, optional phone, message, creation date, deliveryStatus (pending, delivered, failed, or not_requested when no notification address is configured), delivery attempts, and a safe error code. All enquiry responses use Cache-Control: no-store.

POST .../{siteId}/disable removes live serving; POST .../{siteId}/enable restores it when permitted. Delete a website with DELETE .../{siteId} and { "confirmSlug": "ari-studio" }. Deletion releases its addresses. Other websites remain available.

Custom domains

Connect a customer www hostname by posting { "hostname": "www.example.com" } to /accounts/{accountId}/portfolio-sites/{siteId}/domains. The response contains hostname, status, certificate state, and a dns array of records with type, name, and value. Add every returned record at the customer's DNS provider. The website routes the custom hostname after both domain and certificate validation become active.

  • GET .../{siteId}/domains lists domains and their DNS instructions.
  • POST .../{siteId}/domains/{hostname}/refresh checks validation and updates routing.
  • DELETE .../{siteId}/domains/{hostname} removes the domain and releases its reservation.

Apex domains and platform-owned lumicodex.art names are not accepted as custom domains.

Website media

Generated pages load /media.json from their own website origin. This static catalog contains public content and automatic private-gallery previews, with no private snapshots or credentials. Library changes refresh the deployed catalog in the background without publishing editor drafts. Refreshes are batched every 30 seconds, with periodic reconciliation for missed changes; CDN caching can delay visibility. Open pages check the static catalog once per minute while visible. Disabling or deleting a website removes its serving route, and existing media access and moderation enforcement still applies. Visitors request private access only when opening private content; the common gallery access service verifies their resource grant before issuing scoped viewing tokens.

Report a hosted website through the existing anonymous POST /reports/ route, using the registered portfolio or custom-domain URL in urls. Website reports take no account, album, item, message or share-token hints: ownership comes from backend hostname records. The receipt contains only the report ID and reference. Operator report detail adds targetPortfolioSiteId; the platform-authorized decision action block_portfolio disables website routing and prevents owner enable, publish and rollback from restoring it. Site packages are retained as evidence. The Worker checks a separate denial key before serving cached content; propagation still depends on Cloudflare KV.

Webhooks

Register a callback URL to receive event notifications for your account. Events are delivered as POST requests with a signed payload — verify the signature before trusting the body.

curl -X POST https://api.lumicodex.com/accounts/{accountId}/webhook \ -H "Authorization: Bearer <auth token>" \ -H "Content-Type: application/json" \ -d '{ "url": "https://your-app.example.com/lumicodex/webhook" }'

The response returns the registered url and the secret that signs every delivery to it. Store the secret — it is shown when the webhook is registered. One webhook per account; registering again replaces the previous one.

Each delivery includes a signature header in the form t=<timestamp>,v1=<hmac>. Verify it over the raw request body before trusting the payload:

import crypto from "node:crypto"; function verify(rawBody, signatureHeader, secret, toleranceSec = 300) { const parts = Object.fromEntries( signatureHeader.split(",").map((p) => p.split("=")), ); const expected = crypto .createHmac("sha256", secret) .update(`${parts.t}.${rawBody}`) .digest("hex"); const match = crypto.timingSafeEqual( Buffer.from(expected), Buffer.from(parts.v1 || ""), ); const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) <= toleranceSec; return match && fresh; } Respond with a 2xx quickly; non-2xx deliveries are retried. Verify the signature over the raw body and make handlers idempotent.

Envelope progress is delivered on this webhook as a signature event — see Signature events for the payload and what each status means.

Billing and read-only accounts

After a trial expires without payment, the account becomes read-only for 30 days. Previously paying accounts have seven days to recover a failed renewal before retention starts. Cancellation at period end preserves access through that date. Payment recovery or complimentary access restores editing and stops pending deletion.

Login, the dashboard, existing galleries and share links, downloads, content deletion and billing remain available during retention. Uploads, edits, new shares and publishing return 403 with problem code account_restricted. API keys and MCP tools follow the same rules, with ordinary resource permissions still required.

Check account access

GET /usage/{accountId}/current requires account access and returns restrictedState, isTrialing, trialEnd, withinGracePeriod, gracePeriodEndsAt and deletionScheduledAt, alongside usage and limits. Dates are nullable ISO 8601 timestamps. A null deletion date means no cleanup deadline has been scheduled.

POST /billing/{accountId}/checkout-session creates a Stripe Checkout session and returns its url and sessionId. An eligible trial starts when the customer completes checkout. Accounts with an existing trial, active or recoverable subscription use POST /billing/{accountId}/portal. Both return a Stripe URL. Starting checkout alone does not restore access.

Delete an account

DELETE /accounts/{accountId} requires owner or administrator permission. It cancels subscriptions, removes hosted websites and account content, and returns 204. Document-retention conflicts return 409. Purchase history and required evidence survive account deletion. Once deletion starts, new write and checkout requests return 409.

Emails are sent three days before trial expiry, when the account becomes read-only, and seven days and one day before deletion. Cleanup checks current billing again and waits at least 24 hours after the final warning. Existing restricted accounts receive a fresh 30-day period when lifecycle processing is enabled.

Errors

Auth challenge continues — this is success, not an error. Invalid payload or unsupported format/preview. Missing, wrong, or expired token. Locked out, insufficient permission, or a read-only account (account_restricted). User, account, album, or item not found. The resource can no longer be modified — a sent e-signature envelope, for example.