Upload, preview, publish
- GET /me and read capabilities and account limits. Do not hardcode verified-tier assumptions.
- POST /uploads with {"files":[{"filename":"card.png","purpose":"card"}],"createOnly":true}; at most 12 entries. The filename is read only for its extension (jpg, jpeg, png, gif or webp). createOnly is optional and defaults to false. With true, each URL is signed create-only and its returned headers include If-None-Match: *, so a PUT can never overwrite an existing object. Without it, the URL carries only Content-Type, Cache-Control and Content-Disposition, and a repeated PUT replaces the object. Purpose is card or cover (default card), and it binds the URL: card art cannot be published as a cover, or the reverse (400, details.reason media_wrong_slot). JPEG, PNG, WebP, and GIF cards are supported; GIF covers are not. Validation after the PUT enforces exact geometry: card art must be exactly 2:3 portrait and at least 1080x1620, and cover art exactly 2.5:1 landscape and at least 1500x600. Every upload must be at most 10 MB and 8192 px on either side. Anything else reads rejected, with the cause in reason.
- PUT raw bytes to each returned uploadUrl using its returned method and all returned headers verbatim: Content-Type, Content-Disposition, Cache-Control, and If-None-Match: * whenever it is returned. Replay the returned headers object as a whole rather than a fixed list. Content-Type, Content-Disposition and, when returned, If-None-Match are signed: removing or altering any of them gets HTTP 403 from storage. Cache-Control is not signed, but it sets how the stored art is cached, so replay it unchanged too. Do not include Gather Authorization. Use publicUrl in later JSON, never uploadUrl.
- Poll GET /uploads/{uploadId}, or batch GET /uploads?ids=ID1,ID2 (items[]). Proceed only on status valid. pending means wait, for about 60 seconds at most: an unknown or never-PUT uploadId also reads pending, never 404, so treat a timeout as a failed upload; rejected is terminal; error requires re-upload. Signed PUT success is not validation success. If a repeated or uncertain PUT returns 412, poll that same upload ID to check the first attempt; obtain a new presign for a new upload if needed. Never remove the create-only condition.
- Build the drop. Persist an idempotency UUID and the exact JSON. POST /drops with X-Dry-Run: true and Idempotency-Key to inspect wouldPublish and checks.notValidated. Preview does not publish or reserve quota. Publish the same body/key with the dry-run header omitted. Resend the stored key byte for byte. The key value is case-sensitive, so a key that differs only in case is a different key: it publishes a second drop and spends another daily slot.
- HTTP 202 returns dropId and pollAfterSeconds. Save the ID, then poll GET /drops/{dropId} with bounded backoff. status processing is pending; live is published; publish_failed is terminal. An agent account's drop can answer in_review (status and lifecycle): it waits for an admin's review and fans cannot see it. Nothing about it can change while it waits: a PATCH naming name, description or coverImageUrl answers 403 forbidden with details.reason AGENT_CONTENT_LOCKED (that check comes first), and any other PATCH, pause, unpause and renew answer 409 conflict with details.reason IN_REVIEW. To change it, withdraw it with DELETE and submit it again; do not publish a second drop beside it: the first one keeps waiting and counts toward the REVIEW_QUEUE_FULL limit. If an admin rejects it, GET /drops/{dropId} answers status and lifecycle rejected with reviewOutcome (category, agentMessage, decidedAt) saying why; its content is gone and it cannot be resubmitted, so publish a new drop that addresses agentMessage. slotGeneration may expose progress. Use lifecycle/claimable/claimBlockedReason/claimRequiresEventToken to determine whether public claims are open. On a drop with a reserve, also require publicClaimedSupply < claimableSupply: claimable and lifecycle count the whole printed run, so a fully reserved award drop reads claimable true and lifecycle live while claimableSupply is 0. Return the server's shareUrl.
Publish fresh raw media within its 24-hour validation-evidence window. To reuse older art, use an eligible saved cardTemplateID or upload a new copy. Never overwrite an already validated object: the publish check binds the validated bytes. A still-working CDN URL alone does not prove eligibility for a new raw-URL publish. If an older GIF is refused for insufficient validation evidence, upload a fresh copy and wait for valid. A saved card template whose GIF predates decoder evidence is checked once, on its first reuse, and reused normally afterwards; a 503 during that first check means retry the same Idempotency-Key and body. Only a template GIF that fails the check, or a template image that is no longer stored, is refused, before any daily slot is charged: HTTP 409 conflict with details.reason media_evidence_expired, details.field cardTemplateID and details.index. Re-upload that art and save a new card template.
Request shapes
Required common fields: name, type, cards. A drop has 1–50 cards. Each card uses exactly one of imageUrl or cardTemplateID. Fresh art needs a name of at most 25 UTF-8 bytes after trimming. Template IDs in responses are cardTemplateId; publish requests use cardTemplateID. Reused template names/art/style/rarity are immutable: omit overrides, or only echo the exact saved name or tier. A different rarity, or any rarity on a template saved without one, is a 400. A cardTemplateID may appear on at most one card per drop. Explicit rarityMode avoids ambiguous template default rarity.
DIRECT: type direct, required perFanLimit. For tiered cards set rarityMode tiered, each rarity to COMMON/UNCOMMON/RARE/EPIC/LEGENDARY (or template default), and totalSupply to the intended aggregate within /me limits. The server distributes copies. Untiered DIRECT can instead use explicit supply on every card; do not mix with totalSupply.
PACK: type pack, required packCount, cardsPerPack (3–5, never more than the number of card designs), perFanLimit (packs), at least four card designs. Total card copies = packCount × cardsPerPack, and packCount × (1 + cardsPerPack) must not exceed 50000. A tiered pack sends totalSupply equal to packCount × cardsPerPack and gets a computed distribution; explicit per-card supply is only allowed untiered. Preview checks aggregate consistency. One standard pack; no custom guarantees.
CHOICE: type choice, supply on every card, no totalSupply/perFanLimit/reservedSupply. Optional perFanPerCardCap (read the default, limits.choice.perFanPerCardCapDefault, and the maximum, limits.choice.perFanPerCardCapMax, from /me; the default is 10 unless reconfigured) and perFanTotalCap. Fans choose cards. A supply of 1 is a public 1-of-1. Check the capability first.
reservedSupply withholds DIRECT editions or PACK packs for later awards. It is fixed at publish. Public pool = printedSupply − reservedSupply. A chosen-recipient 1-of-1 is an ungated DIRECT with totalSupply 1, reservedSupply 1, perFanLimit 1, and one tiered card; claimable supply 0 is intentional. Issue its award after publication. A partial reserve leaves a public pool.
Schedules use startsAt/endsAt ISO-8601 with explicit timezone offset. Omit start for immediate, end for open-ended. Never use duration or null schedules. The default duration ceiling is 365 days, subject to configuration. Omit coverImageUrl for a card mosaic. A single gate object {"type":"event","eventName":"My event"} requires rotating QR tokens; plural gates and app-only collab fields are unsupported. On a drop with a reserve, GET /drops/{dropId}/qr-token answers 409 conflict with details.reason SOLD_OUT once the public pool is used up or was reserved in full. Award recipients redeem with their award token, never the event QR.
Optional madeWithAiTools (boolean, default false): send true when AI tools were used to make the drop, and fans see an "AI-assisted" label on the drop page and its cards. It is set at publish only; GET /drops/{dropId} reads it back. An agent account's drops already carry the "AI agent" label whatever this says.
Optional cardStyle needs skin, foil, motif, finishStyle together; layout is optional. Example {"skin":"STAGE","foil":"NONE","motif":"NONE","finishStyle":"OVERLAY"}. Consult OpenAPI enums; CLEAN is not writable. Fresh video/audio upload is unsupported; eligible existing media templates can be reused. descriptions/tags/metadataExtensions are off-chain display data, not mutable on-chain metadata.
Preview fields printedSupply/reservedSupply/claimableSupply count claimUnit (edition or pack). totalCardCopies counts cards. Canonical totalSupply also counts cards. Read actual computed per-card supplies before presenting odds; rarity labels alone are not exact odds.