API

Search mods, check for updates and publish new versions from scripts or CI. Everything is JSON at https://celestiamods.com/api/v1, described in OpenAPI 3.1.

Download openapi.json Create a token

Permissions and limits

“Try it out” below sends real requests from your browser to this site. A token you paste into “Authorize” is kept only in this tab and is gone when you close it.

Publishing from GitHub Actions

Create a token with only “Upload versions”, save it as the repository secret CELESTIA_TOKEN, and add this workflow. Each published release builds the mod, zips it and uploads it as a new version. It goes to review like any upload, unless you’re a trusted author.

name: Publish to Celestia
on:
  release:
    types: [published]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: dotnet build -c Release
      - name: Zip the mod
        run: cd bin/Release/Mods/mymod && zip -r "$GITHUB_WORKSPACE/mymod.zip" .
      - name: Upload the version
        env:
          CELESTIA_TOKEN: ${{ secrets.CELESTIA_TOKEN }}
          # Through the environment, never pasted into the script: release notes contain quotes.
          CHANGELOG: ${{ github.event.release.body }}
        run: |
          curl --fail-with-body \
            -H "Authorization: Bearer $CELESTIA_TOKEN" \
            -F "file=@mymod.zip" \
            -F "game_versions[]=1.20.12" \
            -F "changelog=$CHANGELOG" \
            https://celestiamods.com/api/v1/mods/my-mod/versions