List Mods API

API: List Mods for Authenticated User

Endpoint:
GET https://cityofheroes.dev/mods/api/list-mods.php

Description:
Returns a list of mods owned by the user associated with the provided API key.

Authentication

You must provide a valid API key via query parameter:

?api_key=YOUR_API_KEY

Example Request

GET https://cityofheroes.dev/mods/api/list-mods.php?api_key=abc123

Successful Response

{
  "success": true,
  "mods": [
    {
      "id": 279,
      "name": "Spanish Client Translation",
      "filename": "mods/3/SpanishClient.pigg",
      "version" : "0.0.2"
    },
    {
      "id": 280,
      "name": "French Client Translation",
      "filename": "mods/3/FrenchClient.pigg"
      "version" : "0.0.2"
    }
  ]
}

Error Responses


Upload Mod API

API: Upload or Update Mod

Endpoint:
POST https://cityofheroes.dev/mods/api/upload-mod.php

Description:
Uploads a new version of an existing mod that the user owns. The file is stored, its MD5 is calculated, and any overridden files are scanned and logged.
Additionally, you can now update the mod's description using a description field. You can choose to either replace or append to the current description using the optional description_mode field.

Authentication

Send the API key as a form field (api_key).

Form Fields

Field Type Required Description
api_key string yes Your unique API key
mod_id integer yes ID of the mod to update
file file yes The updated .pigg file
version string no Optional manual version (e.g. 1.0.1). If not provided, the patch version auto-increments
description string no Optional new description content
description_mode string no replace (default) or append. Controls how to apply the description update

Example (cURL)

curl -X POST https://cityofheroes.dev/mods/api/upload-mod.php \
  -F "api_key=abc123" \
  -F "mod_id=280" \
  -F "file=@FrenchClient.pigg" \
  -F "description=Updated French translation files" \
  -F "description_mode=append"

Successful Response

{
  "success": true,
  "mod_id": 280,
  "new_version": "0.0.4"
}

Error Responses

Notes