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
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
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
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.
curl -H "X-API-Key: pn1_your_key_here" \
https://api.outgovern.com/api/community/v1/battles/activeRate limits
You can fire up to 6 requests at once before the steady budget applies.
After the burst, one token refills every two seconds per account. Polling one endpoint every 15 seconds never comes close.
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 listbattles/recent60 sresults listbattles/{id}15 s / 30 minlive / finished battleparties/{id}60 sparty roster
# 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/activeconst 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: [...] }
}https://api.outgovern.com/api/community/v1/battles/activeBattles 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.
| Field | Type | Description |
|---|---|---|
| id | integer | Battle id — use it with the detail endpoint. |
| kind | string | "War", "InternalConflict" or "PolarConflict". Training and PMC Cup battles never appear in the feed. |
| status | string | "Scheduled", "Active" or "Finished". Cancelled battles never appear. |
| regionId / regionName | integer / string | The region fought over. Null regionId for Antarctic sector battles. |
| antarcticSectorId | integer | null | Polar conflict sector, when the battle is not over a region. |
| startsAtUtc / endsAtUtc | string | Battle window, UTC ISO-8601. |
| attacker / defender | object | Side objects — see the side fields table. |
| Field | Type | Description |
|---|---|---|
| countryId | integer | Country fighting on this side. In an internal conflict both sides carry the same country. |
| countryName | string | Country name snapshotted at battle creation — a later rename does not rewrite history. |
| countryCode | string | null | Three-letter country code. |
| faction | string | null | "Rebels" (attacker) or "Loyalists" (defender) in an internal conflict, otherwise null. |
| victoryPoints | integer | Banked victory points — the battle is decided by these, not by damage. A tie favors the defender. |
roundEndsAtUtc — end of the currently active round, null between rounds. {
"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
}
}
]
}https://api.outgovern.com/api/community/v1/battles/recentThe 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.
| Field | Type | Description |
|---|---|---|
| resolvedAtUtc | string | When the battle actually resolved — earlier than endsAt when one side locked the outcome. |
| winnerCountryId | integer | The winner's country. In an internal conflict both sides share the country, so read winnerSide for the faction. |
| winnerSide | string | "Attacker" or "Defender". A victory-point tie banks the defender. |
| score | object | Total rawDamage and impact per side, summed across the whole battle. |
{
"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 }
}
}
]
}https://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.
| Field | Type | Description |
|---|---|---|
| roundNumber / name | integer / string | 1-based round index and its display name. |
| status | string | "Pending", "Active" or "Finished". |
| startsAtUtc / endsAtUtc | string | Round window, UTC ISO-8601. |
| victoryPointWeight | integer | Victory points this round banks for its winner — later rounds are worth more. |
| winnerSide | string | null | "Attacker" or "Defender" for a decided round, null while open or drawn. |
| attacker / defender | object | rawDamage and impact dealt by the side inside this round, vehicle support included. |
| Field | Type | Description |
|---|---|---|
| rawDamage | number | Damage before battle-impact conversion — the number players recognize as their hit strength. |
| impact | number | Battle impact: damage after the side-specific conversion, the value that moves the control bar. |
| hits | integer | Citizen weapon hits. Vehicle support fire merges into damage but never counts as a hit. |
| Field | Type | Description |
|---|---|---|
| rawDamage / impact / hits | number / integer | Same semantics as totals, scoped to this country or unit. Vehicle support counts toward countries but never toward units. |
| countryId / militaryUnitId | integer | Stable id of the contributor. |
| countryName / name | string | null | Null when the unit was deleted after the battle — damage stays attributed to the id forever. |
| countryCode | string | null | Three-letter code of the country (or of the unit's home country). |
{
"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": []
}
}https://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.
| Field | Type | Description |
|---|---|---|
| id | integer | Party id — the same id visible in the in-game party URL. |
| name / shortName / description | string | Public party identity and description. |
| color | string | Party color in #RRGGBB form. |
| logoUrl | string | null | Uploaded logo URL, when set. |
| countryId | integer | Country the party operates in. |
| countryName / countryCode | string | null | Country display name and three-letter code. |
| leaderId | integer | null | Current leader's citizen id. |
| leaderName | string | null | Leader's safe public display name. |
| memberCount | integer | Exact number of approved members in the returned roster. |
| seatsInParliament / isRulingParty | integer / boolean | Current parliamentary strength and whether this is the ruling party. |
| isActive | boolean | False for a dissolved party. The row remains available as history, normally with an empty roster. |
| requiresApproval / membershipFee | boolean / number | Whether applications need approval and the weekly membership dues in gold. |
| economicPosition / socialPosition | integer | Party ideology coordinates on the public -100…100 scales. |
| createdAtUtc | string | Party creation time, UTC ISO-8601. |
| Field | Type | Description |
|---|---|---|
| citizenId | integer | Stable citizen id — use it to correlate with public citizen profile pages. |
| citizenName | string | Safe public display name. Login names that look like email addresses are never exposed; the value falls back to "Unknown". |
| citizenLevel | integer | Current citizen level. |
| citizenAvatarUrl | string | null | Avatar image URL, when the citizen has one. |
| role | string | Party role such as "Leader", "ViceLeader", "Officer", "Treasurer", "Recruiter" or "Member". |
| totalDonations | number | Lifetime gold donated by this citizen during their current membership in this party. Not a party-wide all-time total. |
| totalDuesPaid | number | Lifetime membership dues paid during the current membership in this party. |
| joinedAtUtc | string | When the membership was created, UTC ISO-8601. |
| approvedAtUtc | string | null | When the membership was approved, UTC ISO-8601. Can be null for legacy rows. |
{
"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
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.
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.
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.