Developer reference

Community API

A small read-only JSON API for public game data: which battles are live, how they ended, who is dealing the damage, and who sits on a party roster. Built for Discord bots, dashboards and stat sites — limited to data already visible in the game.

Getting access

  1. 1

    Ask for approval

    API access is granted per account by the game team. Reach out on the official Discord or through the contact page and tell us what you want to build.

  2. 2

    Create your key

    Once approved, open Settings → Community API and press Create key. The key starts with pn1_ and is shown exactly once — store it somewhere safe.

  3. 3

    Keep it server-side

    The key identifies your account. Use it from your bot or backend, never in browser code, public repositories or screenshots.

Authentication

Every request carries your key in the X-API-Key header. No cookies, no tokens to refresh — a key stays valid until you replace or revoke it in Settings.

Quick check
curl -H "X-API-Key: pn1_your_key_here" \
  https://api.outgovern.com/api/community/v1/battles/active

Rate limits

6
burst requests

You can fire up to 6 requests at once before the steady budget applies.

1 / 2 s
sustained budget

After the burst, one token refills every two seconds per account. Polling one endpoint every 15 seconds never comes close.

429
when you exceed it

The answer is 429 with a Retry-After header. Wait at least that many seconds — retries inside the window just burn more budget.

Caching & polling

Responses are pre-built snapshots — polling faster than their refresh interval only re-reads the same bytes. Every response carries an ETag content hash: send it back as If-None-Match and unchanged data answers 304 Not Modified with no body.

  • battles/active15 slive front list
  • battles/recent60 sresults list
  • battles/{id}15 s / 30 minlive / finished battle
  • parties/{id}60 sparty roster
ETag flow
# First response carries an ETag header
curl -i -H "X-API-Key: pn1_your_key_here" https://api.outgovern.com/api/community/v1/battles/active
# etag: "BDF58503..."

# Send it back — unchanged data answers 304 with no body
curl -H "X-API-Key: pn1_your_key_here" \
     -H 'If-None-Match: "BDF58503..."' \
  https://api.outgovern.com/api/community/v1/battles/active
Polling loop (JavaScript)
const KEY = "pn1_your_key_here"; // keep it on your server, never in a browser
let etag = null;

async function pollActiveBattles() {
  const headers = { "X-API-Key": KEY };
  if (etag) headers["If-None-Match"] = etag;

  const response = await fetch("https://api.outgovern.com/api/community/v1/battles/active", { headers });

  if (response.status === 429) {
    // Back off for at least the number of seconds in Retry-After
    const wait = Number(response.headers.get("Retry-After") ?? 2);
    await new Promise((resolve) => setTimeout(resolve, wait * 1000));
    return pollActiveBattles();
  }
  if (response.status === 304) return null; // nothing changed
  if (!response.ok) throw new Error(`Community API error: ${response.status}`);

  etag = response.headers.get("ETag");
  return response.json(); // { battles: [...] }
}
GEThttps://api.outgovern.com/api/community/v1/battles/active

Battles being fought right now plus scheduled ones — the front page of the war. Refreshes every 15 seconds server-side; polling faster than that only re-downloads the same snapshot.

Battle object
FieldTypeDescription
idintegerBattle id — use it with the detail endpoint.
kindstring"War", "InternalConflict" or "PolarConflict". Training and PMC Cup battles never appear in the feed.
statusstring"Scheduled", "Active" or "Finished". Cancelled battles never appear.
regionId / regionNameinteger / stringThe region fought over. Null regionId for Antarctic sector battles.
antarcticSectorIdinteger | nullPolar conflict sector, when the battle is not over a region.
startsAtUtc / endsAtUtcstringBattle window, UTC ISO-8601.
attacker / defenderobjectSide objects — see the side fields table.
attacker / defender
FieldTypeDescription
countryIdintegerCountry fighting on this side. In an internal conflict both sides carry the same country.
countryNamestringCountry name snapshotted at battle creation — a later rename does not rewrite history.
countryCodestring | nullThree-letter country code.
factionstring | null"Rebels" (attacker) or "Loyalists" (defender) in an internal conflict, otherwise null.
victoryPointsintegerBanked victory points — the battle is decided by these, not by damage. A tie favors the defender.
Plus, only in this list: roundEndsAtUtc — end of the currently active round, null between rounds.
Response — 200 OK
{
  "battles": [
    {
      "id": 1312,
      "kind": "War",
      "status": "Active",
      "regionId": 42,
      "regionName": "Lower Danube",
      "antarcticSectorId": null,
      "startsAtUtc": "2026-12-01T06:00:00Z",
      "endsAtUtc": "2026-12-01T15:00:00Z",
      "roundEndsAtUtc": "2026-12-01T07:00:00Z",
      "attacker": {
        "countryId": 7,
        "countryName": "Avalonia",
        "countryCode": "AVA",
        "faction": null,
        "victoryPoints": 4
      },
      "defender": {
        "countryId": 11,
        "countryName": "Brutania",
        "countryCode": "BRU",
        "faction": null,
        "victoryPoints": 2
      }
    }
  ]
}
GEThttps://api.outgovern.com/api/community/v1/battles/recent

The 20 most recently finished community battles, newest first — everything a bot needs to announce results. Victory points decide the winner (a tie banks the defender); damage is context, not the outcome. Refreshes every 60 seconds.

Everything from the battle object, plus
FieldTypeDescription
resolvedAtUtcstringWhen the battle actually resolved — earlier than endsAt when one side locked the outcome.
winnerCountryIdintegerThe winner's country. In an internal conflict both sides share the country, so read winnerSide for the faction.
winnerSidestring"Attacker" or "Defender". A victory-point tie banks the defender.
scoreobjectTotal rawDamage and impact per side, summed across the whole battle.
Response — 200 OK
{
  "battles": [
    {
      "id": 1290,
      "kind": "InternalConflict",
      "status": "Finished",
      "regionId": 42,
      "regionName": "Lower Danube",
      "antarcticSectorId": null,
      "startsAtUtc": "2026-11-30T18:00:00Z",
      "endsAtUtc": "2026-12-01T03:00:00Z",
      "resolvedAtUtc": "2026-12-01T02:41:17Z",
      "winnerCountryId": 7,
      "winnerSide": "Attacker",
      "attacker": {
        "countryId": 7,
        "countryName": "Avalonia",
        "countryCode": "AVA",
        "faction": "Rebels",
        "victoryPoints": 6
      },
      "defender": {
        "countryId": 7,
        "countryName": "Avalonia",
        "countryCode": "AVA",
        "faction": "Loyalists",
        "victoryPoints": 3
      },
      "score": {
        "attacker": { "rawDamage": 4821350.25, "impact": 4901200.5 },
        "defender": { "rawDamage": 3901400, "impact": 3901400 }
      }
    }
  ]
}
GEThttps://api.outgovern.com/api/community/v1/battles/{id}

The full public picture of one battle: round-by-round damage, reconciled side totals, and the top contributing countries and military units per side. Works for scheduled, active and finished battles — a finished battle's snapshot is immutable and cached for 30 minutes.

rounds[]
FieldTypeDescription
roundNumber / nameinteger / string1-based round index and its display name.
statusstring"Pending", "Active" or "Finished".
startsAtUtc / endsAtUtcstringRound window, UTC ISO-8601.
victoryPointWeightintegerVictory points this round banks for its winner — later rounds are worth more.
winnerSidestring | null"Attacker" or "Defender" for a decided round, null while open or drawn.
attacker / defenderobjectrawDamage and impact dealt by the side inside this round, vehicle support included.
totals.attacker / totals.defender
FieldTypeDescription
rawDamagenumberDamage before battle-impact conversion — the number players recognize as their hit strength.
impactnumberBattle impact: damage after the side-specific conversion, the value that moves the control bar.
hitsintegerCitizen weapon hits. Vehicle support fire merges into damage but never counts as a hit.
topCountries / topMilitaryUnits entries (max 10 per side)
FieldTypeDescription
rawDamage / impact / hitsnumber / integerSame semantics as totals, scoped to this country or unit. Vehicle support counts toward countries but never toward units.
countryId / militaryUnitIdintegerStable id of the contributor.
countryName / namestring | nullNull when the unit was deleted after the battle — damage stays attributed to the id forever.
countryCodestring | nullThree-letter code of the country (or of the unit's home country).
Response — 200 OK
{
  "id": 1312,
  "kind": "War",
  "status": "Active",
  "regionId": 42,
  "regionName": "Lower Danube",
  "antarcticSectorId": null,
  "startsAtUtc": "2026-12-01T06:00:00Z",
  "endsAtUtc": "2026-12-01T15:00:00Z",
  "resolvedAtUtc": null,
  "winnerCountryId": null,
  "winnerSide": null,
  "attacker": { "countryId": 7, "countryName": "Avalonia", "countryCode": "AVA", "faction": null, "victoryPoints": 4 },
  "defender": { "countryId": 11, "countryName": "Brutania", "countryCode": "BRU", "faction": null, "victoryPoints": 2 },
  "rounds": [
    {
      "roundNumber": 1,
      "name": "Dawn assault",
      "status": "Finished",
      "startsAtUtc": "2026-12-01T06:00:00Z",
      "endsAtUtc": "2026-12-01T07:00:00Z",
      "victoryPointWeight": 1,
      "winnerSide": "Attacker",
      "attacker": { "rawDamage": 812300.5, "impact": 825100.25 },
      "defender": { "rawDamage": 601200, "impact": 601200 }
    },
    {
      "roundNumber": 2,
      "name": "Midday push",
      "status": "Active",
      "startsAtUtc": "2026-12-01T07:00:00Z",
      "endsAtUtc": "2026-12-01T08:00:00Z",
      "victoryPointWeight": 2,
      "winnerSide": null,
      "attacker": { "rawDamage": 122050.75, "impact": 124000 },
      "defender": { "rawDamage": 98000, "impact": 98000 }
    }
  ],
  "totals": {
    "attacker": { "rawDamage": 934351.25, "impact": 949100.25, "hits": 418 },
    "defender": { "rawDamage": 699200, "impact": 699200, "hits": 355 }
  },
  "topCountries": {
    "attacker": [
      { "countryId": 7, "countryName": "Avalonia", "countryCode": "AVA", "rawDamage": 700100.25, "impact": 712000, "hits": 300 },
      { "countryId": 5, "countryName": "Cascadia", "countryCode": "CAS", "rawDamage": 234251, "impact": 237100.25, "hits": 118 }
    ],
    "defender": [
      { "countryId": 11, "countryName": "Brutania", "countryCode": "BRU", "rawDamage": 699200, "impact": 699200, "hits": 355 }
    ]
  },
  "topMilitaryUnits": {
    "attacker": [
      { "militaryUnitId": 91, "name": "Steel Wolves", "countryCode": "AVA", "rawDamage": 401000.5, "impact": 407500, "hits": 150 }
    ],
    "defender": []
  }
}
GEThttps://api.outgovern.com/api/community/v1/parties/{id}

Public metadata for one party plus its approved member roster — citizen id, display name, level, role, donations and dues totals. Members are ordered leadership-first, then by level and citizen id, so the cached payload does not reshuffle between polls. Refreshes every 60 seconds server-side.

The v1 pilot deliberately exposes party detail by id only — there is no bulk party enumeration endpoint. Pending or rejected applications, treasury balance, dues arrears and management permission flags are not part of the response.

Party object
FieldTypeDescription
idintegerParty id — the same id visible in the in-game party URL.
name / shortName / descriptionstringPublic party identity and description.
colorstringParty color in #RRGGBB form.
logoUrlstring | nullUploaded logo URL, when set.
countryIdintegerCountry the party operates in.
countryName / countryCodestring | nullCountry display name and three-letter code.
leaderIdinteger | nullCurrent leader's citizen id.
leaderNamestring | nullLeader's safe public display name.
memberCountintegerExact number of approved members in the returned roster.
seatsInParliament / isRulingPartyinteger / booleanCurrent parliamentary strength and whether this is the ruling party.
isActivebooleanFalse for a dissolved party. The row remains available as history, normally with an empty roster.
requiresApproval / membershipFeeboolean / numberWhether applications need approval and the weekly membership dues in gold.
economicPosition / socialPositionintegerParty ideology coordinates on the public -100…100 scales.
createdAtUtcstringParty creation time, UTC ISO-8601.
members[] — approved members only
FieldTypeDescription
citizenIdintegerStable citizen id — use it to correlate with public citizen profile pages.
citizenNamestringSafe public display name. Login names that look like email addresses are never exposed; the value falls back to "Unknown".
citizenLevelintegerCurrent citizen level.
citizenAvatarUrlstring | nullAvatar image URL, when the citizen has one.
rolestringParty role such as "Leader", "ViceLeader", "Officer", "Treasurer", "Recruiter" or "Member".
totalDonationsnumberLifetime gold donated by this citizen during their current membership in this party. Not a party-wide all-time total.
totalDuesPaidnumberLifetime membership dues paid during the current membership in this party.
joinedAtUtcstringWhen the membership was created, UTC ISO-8601.
approvedAtUtcstring | nullWhen the membership was approved, UTC ISO-8601. Can be null for legacy rows.
Response — 200 OK
{
  "id": 12,
  "name": "Avalonian Front",
  "shortName": "AF",
  "description": "Avalonia's reform caucus.",
  "color": "#RRGGBB",
  "logoUrl": "https://cdn.example.com/parties/af.png",
  "countryId": 7,
  "countryName": "Avalonia",
  "countryCode": "AVA",
  "leaderId": 481,
  "leaderName": "Mira",
  "memberCount": 2,
  "seatsInParliament": 8,
  "isRulingParty": true,
  "isActive": true,
  "requiresApproval": true,
  "membershipFee": 10,
  "economicPosition": -20,
  "socialPosition": 35,
  "createdAtUtc": "2026-11-12T18:04:22Z",
  "members": [
    {
      "citizenId": 481,
      "citizenName": "Mira",
      "citizenLevel": 42,
      "citizenAvatarUrl": "https://cdn.example.com/avatars/481.png",
      "role": "Leader",
      "totalDonations": 1500.25,
      "totalDuesPaid": 80,
      "joinedAtUtc": "2026-11-12T18:04:22Z",
      "approvedAtUtc": "2026-11-12T18:04:22Z"
    },
    {
      "citizenId": 502,
      "citizenName": "Karl",
      "citizenLevel": 31,
      "citizenAvatarUrl": null,
      "role": "Officer",
      "totalDonations": 240,
      "totalDuesPaid": 30,
      "joinedAtUtc": "2026-11-14T09:41:10Z",
      "approvedAtUtc": "2026-11-14T10:02:51Z"
    }
  ]
}

Errors

401

Missing or invalid API key, or the key was revoked/replaced.

Check the X-API-Key header; generate a fresh key in Settings if needed.

404

No community resource with this id — the battle or party does not exist, or the battle is a training or PMC Cup match.

Only follow ids returned by feed endpoints or visible in in-game URLs.

429

Rate limit exceeded — burst spent or polling faster than the budget.

Wait at least the number of seconds in the Retry-After header before the next request.

Error bodies are small JSON objects with a message field.

What the feed is — and is not

  • Public game truth only: battle rollups and party data already visible in game. No hit-by-hit feeds, private inventories, treasury ledgers, dues arrears, pending applications, or management permissions.
  • Party rosters contain current approved members only. Donation and dues totals are scoped to the current membership — not party-wide all-time totals.
  • Only real wars: internal conflicts and polar conflicts are in, training skirmishes and PMC Cup tournament matches are out.
  • Numbers match the in-game battle room — damage is reconciled from the same durable hit ledger, including vehicle support fire.
  • Versioned as v1. Additive changes (new fields) can ship without notice; anything breaking moves to a new version path.