Back

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.

Foundry-compatible
Per-module tokens
FoundryMods extras

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.

1. Get a token
  1. Open your module's edit page on FoundryMods (you must own/claim the module).
  2. Find the Package Release Tokens card.
  3. Click Generate and copy the fmp_… token.
  4. 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.

2. Send a request
POST
https://foundrymods.com/api/public/v1/packages/release_version

Always test with "dry-run": true first, it validates everything without saving.

Manifest is the source of truth. If you providerelease.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.
Self-hosted manifest URLs are trusted. Ifrelease.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" }
    }
  }'
Request body
release.manifest
url

URL 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.

id
string

The 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-run
boolean

When true, validates without saving.

release.version
string

Semantic 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.notes
url

Optional URL to release notes / changelog page. Falls back to manifest.url when omitted.

release.compatibility.minimum
string

Earliest Foundry version supported. Optional if a manifest URL is provided (derived from manifest.compatibility.minimum). Required otherwise.

release.compatibility.verified
string

Latest Foundry version verified to work. Optional if a manifest URL is provided (derived from manifest.compatibility.verified). Required otherwise.

release.compatibility.maximum
string

Latest Foundry version this release will run on (omit unless you've tested a hard stop).

FoundryMods extensions (optional)

release.changelog
markdown
FoundryMods

Inline markdown changelog displayed on the module page.

release.is_public
boolean
FoundryMods

Set to false for an unlisted prerelease.

release.package
url
FoundryMods

URL 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_ids
string[]
FoundryMods

Patreon tier IDs required to download. Gated releases never expose a public manifest URL.

release.foundrymods.required_bw_tier_ids
string[]
FoundryMods

Baileywiki Central tier IDs required to download.

release.foundrymods.lapsed_subscriber_access
"none"|"locked_version"|"full_updates"
FoundryMods

Defines what former subscribers retain. Default: none.

release.foundrymods.monthly_download_limit
number
FoundryMods

Per-user download cap (1 to 20). Default: 4.

release.foundrymods.is_unlisted
boolean
FoundryMods

Hide from the gallery while still allowing direct-link installs.

release.foundrymods.discord_announce
boolean
FoundryMods

Legacy option, accepted but ignored. Configure release webhooks on your module's edit page for notifications to your own Discord.

release.foundrymods.sync_description_from_github
boolean
FoundryMods

After 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_markdown
string
FoundryMods

Markdown to set as the module description (50,000 character cap). See Set the module description.

release.foundrymods.description_url
string
FoundryMods

An allowlisted https URL to fetch the description markdown from. See Set the module description.

release.foundrymods.hero_image_url
string
FoundryMods

An allowlisted https URL to fetch the hero (cover) image from. See Hero image.

release.foundrymods.hero_image_base64
string
FoundryMods

Raw 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.

Responses
200 OK
{ "status": "success", "page": "https://foundrymods.com/modules/.../edit" }
400 Bad Request
{
  "status": "error",
  "errors": {
    "manifest": [{ "message": "Enter a valid URL.", "code": "invalid" }]
  }
}
401 Unauthorized

Missing, malformed, or revoked token.

402 Payment Required

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.

403 Forbidden

Token scope insufficient, or the module has no active owner claim (code: "no_owner_claim").

429 Too Many Requests

One release per module per 60 seconds. Check the Retry-After header.

3. GitHub Actions example
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) }}
            }
          }
          EOF
Direct ZIP upload (CI without GitHub Releases)

If 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.

POST
https://foundrymods.com/api/public/v1/packages/upload_zip

Body 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.

Subscription & storage quota required. ZIP uploads are gated by the module owner's FoundryMods Creator subscription. Before accepting the upload, the API resolves the active claim's owner email and checks:
  • The owner has an active foundrymods addon (otherwise
    402
    subscription_required).
  • The new file size plus the owner's existing usage fits within their storage_quota_gb entitlement (otherwise
    402
    quota_exceeded).
  • Usage is the sum of file_size across 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.
Both 402 responses include a subscribe_url the owner can visit to upgrade.
Manifest is the source of truth.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.
Self-hosted manifest URLs are trusted. IfX-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, required
  • X-FM-Id, X-FM-Version, X-FM-Compat-Min, X-FM-Compat-Verified, optional when set in the manifest, otherwise required
  • X-FM-Compat-Max, optional
  • X-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-Unlisted
  • X-FM-Discord-Announce, legacy, accepted but ignored; use your module's release webhooks instead
  • X-FM-Dry-Run
  • X-FM-Description-B64 (base64 markdown, 10 KB decoded cap) or X-FM-Description-Url (allowlisted https URL), optional, see Set the module description
  • X-FM-Hero-Url (allowlisted https image URL), optional, see Hero image
Set the module description

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 on raw.githubusercontent.com, gist.githubusercontent.com, github.com (repo root uses its README, or a /blob/<ref>/<path> file link), or gist.github.com. Files over 200 KB are rejected.
  • JSON release endpoint only: release.foundrymods.description_markdown or release.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 conflict error.
  • 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_markdown in the JSON endpoint or X-FM-Description-Url.

Images and videos

  • Markdown images and raw <img> tags are kept when the https host is allowlisted: upoxajzfhnhfoasupxez.supabase.co under /storage/v1/object/public/module-covers/ or /storage/v1/render/image/public/module-covers/, raw.githubusercontent.com, user-images.githubusercontent.com, and github.com under /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 description response object adds images, embeds, stripped (each with kind, reason, url) and warnings.
![Town overview](https://upoxajzfhnhfoasupxez.supabase.co/storage/v1/object/public/module-covers/bw_baileywiki_com/descriptions/4a823604-b65a-47d4-a23a-10ce6a368adc-1782348585844-ph32h28n.webp)

![Building close up](https://upoxajzfhnhfoasupxez.supabase.co/storage/v1/object/public/module-covers/bw_baileywiki_com/descriptions/4a823604-b65a-47d4-a23a-10ce6a368adc-1782337841725-fvbhe4ev.webp)

{
  "description": {
    "ok": true,
    "source": "markdown",
    "chars": 640,
    "saved": false,
    "images": 2,
    "embeds": 0,
    "stripped": [],
    "warnings": []
  }
}
Hero image

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-Url with an https image URL.
  • JSON release endpoint: release.foundrymods.hero_image_url or release.foundrymods.hero_image_base64 (raw base64, no data: prefix) with optional release.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, and user-attachments/assets links are accepted), gist.github.com, user-images.githubusercontent.com, objects.githubusercontent.com and private-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_conflict error.
  • 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 carries hero: { 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)
🧪 Testing channel (pre-release builds)

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.

Module changelog feed (Production / Testing)

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.

Migrating from Foundry's API

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 of fvttp_…)

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.