Package Release API
Publish new module versions to FoundryMods from your CI pipeline. Drop-in compatible with Foundry's Package Release API , same request shape, same response envelope.
Not a developer? You don't need a terminal.
Open your module's edit page and use the "Test the Release API" panel to fire a safe, no-publish test request with one click, perfect for confirming a token works before handing it to GitHub Actions.
- Open your module's edit page on FoundryMods (you must own/claim the module).
- Find the Package Release Tokens card.
- Click Generate and copy the
fmp_…token. - Store it in your CI as a secret (e.g.
FOUNDRYMODS_TOKEN).
Tokens are shown once. Lose it? Just revoke and generate a new one.
https://foundrymods.com/api/public/v1/packages/release_versionAlways test with "dry-run": true first, it validates everything without saving.
release.manifest, thenid,release.version, andrelease.compatibility.* are derived from the manifest JSON and become optional in the request body. If you send them anyway, they must match the manifest exactly. If you omit the manifest, all four are required.release.manifest (orX-FM-Manifest-Url) points at afoundrymods.com URL, the version / id / compatibility fields you send are accepted as-is. No need to pre-publish the new manifest, that endpoint reflects the currently published release by design.# Minimal, id, version, and compatibility are derived from the manifest
curl -X POST https://foundrymods.com/api/public/v1/packages/release_version \
-H "Content-Type: application/json" \
-H "Authorization: fmp_your_token_here" \
-d '{
"dry-run": true,
"release": {
"manifest": "https://github.com/me/my-module/releases/download/1.2.0/module.json",
"notes": "https://github.com/me/my-module/releases/tag/1.2.0"
}
}'Without a manifest URL (legacy, all fields required)
# Manifest omitted, id, version, and compatibility become required
curl -X POST https://foundrymods.com/api/public/v1/packages/release_version \
-H "Content-Type: application/json" \
-H "Authorization: fmp_your_token_here" \
-d '{
"id": "my-module",
"dry-run": true,
"release": {
"version": "1.2.0",
"notes": "https://github.com/me/my-module/releases/tag/1.2.0",
"compatibility": { "minimum": "11", "verified": "12" }
}
}'release.manifestURL to the version-specific manifest JSON (e.g. a GitHub release asset). Strongly recommended, when present, the fields below are derived from it and become optional.
idThe module id from your manifest. Optional if a manifest URL is provided (derived from manifest.id). Required otherwise. Must match the module that owns this token.
dry-runWhen true, validates without saving.
release.versionSemantic version, e.g. 1.2.0. Optional if a manifest URL is provided (derived from manifest.version). Required otherwise. Must be unique per module.
release.notesOptional URL to release notes / changelog page. Falls back to manifest.url when omitted.
release.compatibility.minimumEarliest Foundry version supported. Optional if a manifest URL is provided (derived from manifest.compatibility.minimum). Required otherwise.
release.compatibility.verifiedLatest Foundry version verified to work. Optional if a manifest URL is provided (derived from manifest.compatibility.verified). Required otherwise.
release.compatibility.maximumLatest Foundry version this release will run on (omit unless you've tested a hard stop).
FoundryMods extensions (optional)
release.changelogInline markdown changelog displayed on the module page.
release.is_publicSet to false for an unlisted prerelease.
release.packageURL to the release zip. When provided, FoundryMods mirrors the file to its own CDN, hosts the download, and indexes contents (compendium packs + scene gallery).
release.foundrymods.required_tier_idsPatreon tier IDs required to download. Gated releases never expose a public manifest URL.
release.foundrymods.required_bw_tier_idsBaileywiki Central tier IDs required to download.
release.foundrymods.lapsed_subscriber_accessDefines what former subscribers retain. Default: none.
release.foundrymods.monthly_download_limitPer-user download cap (1 to 20). Default: 4.
release.foundrymods.is_unlistedHide from the gallery while still allowing direct-link installs.
release.foundrymods.discord_announceLegacy option, accepted but ignored. Configure release webhooks on your module's edit page for notifications to your own Discord.
release.foundrymods.sync_description_from_githubAfter a successful release, re-pull your repository's README.md and replace this module's description with it. You can also enable this once per module from the edit page (Auto-sync on every release), or trigger it per-request via the X-FM-Sync-Description: 1 header (also accepted by the direct ZIP upload endpoint). Set this field to false to skip a sync even if auto-sync is enabled module-wide.
release.foundrymods.description_markdownMarkdown to set as the module description (50,000 character cap). See Set the module description.
release.foundrymods.description_urlAn allowlisted https URL to fetch the description markdown from. See Set the module description.
release.foundrymods.hero_image_urlAn allowlisted https URL to fetch the hero (cover) image from. See Hero image.
release.foundrymods.hero_image_base64Raw base64 (no data: prefix) of a WebP hero image, with optional release.foundrymods.hero_image_content_type. See Hero image.
Lookup endpoint (GET)
GET https://foundrymods.com/api/public/v1/packages/release_version?id=<manifest-id> lists the latest 50 releases. Add &version=1.2.0 to fetch a single release. No token required for read access.
{ "status": "success", "page": "https://foundrymods.com/modules/.../edit" }{
"status": "error",
"errors": {
"manifest": [{ "message": "Enter a valid URL.", "code": "invalid" }]
}
}Missing, malformed, or revoked token.
The module owner does not have an active FoundryMods Creator subscription, or the upload would exceed their storage quota. Response includes code: "subscription_required" or code: "quota_exceeded" plus a subscribe_url.
Token scope insufficient, or the module has no active owner claim (code: "no_owner_claim").
One release per module per 60 seconds. Check the Retry-After header.
name: Release
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Publish to FoundryMods
run: |
curl -X POST https://foundrymods.com/api/public/v1/packages/release_version \
-H "Content-Type: application/json" \
-H "Authorization: ${{ secrets.FOUNDRYMODS_TOKEN }}" \
-d @- <<EOF
{
"id": "my-module",
"release": {
"version": "${{ github.event.release.tag_name }}",
"manifest": "https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/module.json",
"notes": "${{ github.event.release.html_url }}",
"compatibility": { "minimum": "11", "verified": "12" },
"changelog": ${{ toJSON(github.event.release.body) }}
}
}
EOFIf your CI builds the zip on the runner and you don't want to push it to a separate host first, stream it straight to FoundryMods. We'll store it on our CDN, create the release, and run the same content indexing.
https://foundrymods.com/api/public/v1/packages/upload_zipBody is the raw zip bytes (up to 2 GB). All metadata travels in X-FM-* headers so no multipart parsing is needed. Add X-FM-Dry-Run: true to validate first.
- The owner has an active
foundrymodsaddon (otherwise402subscription_required). - The new file size plus the owner's existing usage fits within their
storage_quota_gbentitlement (otherwise402quota_exceeded). - Usage is the sum of
file_sizeacross every release uploaded by that owner email, including releases created via the JSON release endpoint and the browser uploader. - The module must have an active claim or the request is rejected with 403
no_owner_claim.
subscribe_url the owner can visit to upgrade.X-FM-Manifest-Url is always required. When set, X-FM-Id,X-FM-Version,X-FM-Compat-Min, andX-FM-Compat-Verified are derived from the manifest JSON and become optional. If you send any of them, they must match the manifest exactly.X-FM-Manifest-Url points at afoundrymods.com URL, the version / id / compatibility headers you send are accepted as-is. No need to pre-publish the new manifest, that endpoint reflects the currently published release by design.# Minimal, id, version, and compatibility are read from the manifest curl -X POST https://foundrymods.com/api/public/v1/packages/upload_zip \ -H "Authorization: fmp_your_token_here" \ -H "Content-Type: application/zip" \ -H "X-FM-Manifest-Url: https://github.com/me/my-module/releases/download/1.2.0/module.json" \ -H "X-FM-Notes-Url: https://github.com/me/my-module/releases/tag/1.2.0" \ --data-binary "@dist/my-module-1.2.0.zip"
All supported headers
X-FM-Manifest-Url, requiredX-FM-Id,X-FM-Version,X-FM-Compat-Min,X-FM-Compat-Verified, optional when set in the manifest, otherwise requiredX-FM-Compat-Max, optionalX-FM-Notes-Url,X-FM-Filename,X-FM-Changelog-B64(base64 markdown)X-FM-Required-Tier-Ids,X-FM-Required-Bw-Tier-Ids(comma-separated)X-FM-Lapsed-Access(none|locked_version|full_updates)X-FM-Monthly-Limit(1 to 20),X-FM-UnlistedX-FM-Discord-Announce, legacy, accepted but ignored; use your module's release webhooks insteadX-FM-Dry-RunX-FM-Description-B64(base64 markdown, 10 KB decoded cap) orX-FM-Description-Url(allowlisted https URL), optional, see Set the module descriptionX-FM-Hero-Url(allowlisted https image URL), optional, see Hero image
Both release endpoints can replace your module's rich-text description in the same request. The markdown is cleaned with the same sanitizer as the GitHub README sync and capped at 50,000 characters of HTML.
X-FM-Description-B64: base64 of UTF-8 markdown, up to 10 KB decoded.X-FM-Description-Url: an https URL onraw.githubusercontent.com,gist.githubusercontent.com,github.com(repo root uses its README, or a/blob/<ref>/<path>file link), orgist.github.com. Files over 200 KB are rejected.- JSON release endpoint only:
release.foundrymods.description_markdownorrelease.foundrymods.description_url. The two headers above are also accepted there.
- Works on both stable and testing channel releases.
- Dry runs fully validate the description (decode or fetch, then clean) but save nothing.
- It does not change page visibility or any other module setting.
- Send only one description source per request; more than one returns a
conflicterror. - When a description is sent, the GitHub README sync is skipped for that request.
- The base64 header is limited to 10,000 decoded bytes. For longer text use
description_markdownin the JSON endpoint orX-FM-Description-Url.
Images and videos
- Markdown images and raw
<img>tags are kept when the https host is allowlisted:upoxajzfhnhfoasupxez.supabase.counder/storage/v1/object/public/module-covers/or/storage/v1/render/image/public/module-covers/,raw.githubusercontent.com,user-images.githubusercontent.com, andgithub.comunder/user-attachments/. Other images are removed. Only src, alt, width and height are read. - YouTube and Vimeo embeds: a bare video URL on its own line,
::youtube[ID]or::vimeo[ID]on its own line, or an<iframe>whose src is a YouTube or Vimeo embed URL. Vimeo is supported on this API only for now. <video>is not supported and is removed.- Limits: 20 images and 5 embeds per description; extra ones are removed.
- The
descriptionresponse object addsimages,embeds,stripped(each withkind,reason,url) andwarnings.


{
"description": {
"ok": true,
"source": "markdown",
"chars": 640,
"saved": false,
"images": 2,
"embeds": 0,
"stripped": [],
"warnings": []
}
}Both release endpoints can replace your module's hero (cover) image in the same request. The image must be a WebP that is exactly 1280x720 pixels. It is stored as-is, byte for byte, with no cropping, resizing or re-encoding, in the same place and format as the cover editor.
- Direct ZIP upload endpoint:
X-FM-Hero-Urlwith an https image URL. - JSON release endpoint:
release.foundrymods.hero_image_urlorrelease.foundrymods.hero_image_base64(raw base64, no data: prefix) with optionalrelease.foundrymods.hero_image_content_type. - Allowed URL hosts:
raw.githubusercontent.com,gist.githubusercontent.com,github.com(/blob/<ref>/<path>file links are rewritten to raw, anduser-attachments/assetslinks are accepted),gist.github.com,user-images.githubusercontent.com,objects.githubusercontent.comandprivate-user-images.githubusercontent.com. Up to 3 redirects are followed, and every redirect target must also be https on an allowed host. - Accepted type: WebP only. The real bytes are checked, not the file name or declared Content-Type. PNG, JPEG, GIF, SVG, anything else, or a declared type that disagrees with the bytes returns
hero_needs_webp. - Size: exactly 1280x720 (read from the WebP header; lossy, lossless and extended WebP all work). Any other size returns
hero_dimensions. 5 MB maximum (hero_too_large). - Send only one hero source per request; sending both returns a
hero_conflicterror. - Dry runs fully validate the hero (fetch or decode, type and dimension checks) but save nothing, and report
hero: { source, width, height, bytes, saved: false }. - Works on both stable and testing channel releases. On testing uploads only the cover image changes; the page stays hidden exactly as before.
- Error codes:
hero_needs_webp,hero_dimensions,hero_too_large,hero_conflict,fetch_failed,invalid(bad URL, disallowed host, http, or bad base64). A hero error fails the whole request before anything is stored. If the storage upload fails after the release is recorded, the release still succeeds and the response carrieshero: { error }.
curl -X POST https://foundrymods.com/api/public/v1/packages/upload_zip \ -H "Authorization: fmp_..." \ -H "Content-Type: application/zip" \ -H "X-FM-Id: my-module" \ -H "X-FM-Version: 1.2.3" \ -H "X-FM-Manifest-Url: https://example.com/my-module/1.2.3/module.json" \ -H "X-FM-Channel: testing" \ -H "X-FM-Dry-Run: true" \ -H "X-FM-Hero-Url: https://raw.githubusercontent.com/owner/repo/main/assets/hero.webp" \ --data-binary @module.zip
Make the file locally, for example with Python and Pillow:
from PIL import Image
im = Image.open("cover.png").convert("RGB")
w, h = im.size
target = 16 / 9
if w / h > target:
nw = int(h * target)
im = im.crop(((w - nw) // 2, 0, (w - nw) // 2 + nw, h))
else:
nh = int(w / target)
im = im.crop((0, (h - nh) // 2, w, (h - nh) // 2 + nh))
im.resize((1280, 720), Image.LANCZOS).save("hero.webp", "WEBP", quality=88)Every module has an optional testing channel, a parallel manifest URL for pre-release builds. Publishing to the testing channel does not bump latest_version, does not update the stable manifest URL, and does not fire release webhooks or Discord announcements.
Enable the testing channel from your module's Edit → Releases page. You control whether the testing manifest URL is public (shown on the module's public install card) or private (only installable by module editors using an fmk_ personal API key).
JSON release endpoint
Add "channel": "testing" to the release object. Optionally include foundrymods.testing_is_public to flip the public toggle at release time.
{
"id": "my-module",
"release": {
"version": "1.4.0-beta.1",
"manifest": "https://…/module.json",
"package": "https://…/my-module.zip",
"channel": "testing",
"foundrymods": { "testing_is_public": false }
}
}Direct ZIP upload endpoint
Send header X-FM-Channel: testing. Optionally include X-FM-Testing-Is-Public: true|false.
Installing testing builds
- Public testing:
https://foundrymods.com/api/v1/manifest/<id>/testing - Private testing: same URL +
?key=fmk_...(your Personal API Key) - External testing URLs (non-hosted) 302-redirect to whatever URL you set on the edit page.
Tier gating (required_tier_ids / required_bw_tier_ids) works on testing releases too, useful for offering early-access builds to specific Patreon tiers.
Every module page shows release notes split by release channel, with a deep link at /modules/<slug>?channel=testing. The same data is available as JSON or markdown:
GET https://foundrymods.com/api/v1/modules/<id-or-slug>/changelog GET https://foundrymods.com/api/v1/modules/<id-or-slug>/changelog?channel=testing
channel accepts stable (default), production (alias for stable), and testing. Only releases on that channel that actually carry changelog text or a notes URL are returned. Send Accept: text/markdown for a markdown rendering.
{
"module_id": "…",
"forge_id": "my-module",
"module_name": "My Module",
"channel": "testing",
"entries": [
{ "version": "2.1.0-beta.1", "uploaded_at": "…", "changelog": "…", "notes_url": null, "gated": false }
]
}Release notes come from X-FM-Changelog-B64 (or release.changelog) on your publish call. Publishing with X-FM-Channel: testing puts those notes on the module page's Testing tab; without it they land on Production. These are per-module notes only, they never post to the site-wide What's New page.
If you already publish to Foundry's release API, you only need to change two things:
- Endpoint URL →
https://foundrymods.com/api/public/v1/packages/release_version - Authorization header → your
fmp_…token (instead offvttp_…)
The request body, response envelope, and error shape are identical. Existing tooling like FVTT Autopublish and foundry-publish work with a single env var swap.