Rebroadcast API
Endpoint reference for the Helldivers Bot API. All responses follow a standard envelope with time, code, message, and data / error fields.
Response Envelopes
Standard Envelope
Used by /api/healthcheck, /api/h1/campaign, /api/h1/update. The time field is elapsed milliseconds (floating-point). The message field is derived from the HTTP status code.
// Success
{ "time": 42.5, "code": 200, "message": "OK", "data": { ... } }
// Error
{ "time": 42.5, "code": 400, "message": "Bad Request", "error": "details" }Rebroadcast Envelope
Used by /api/h1/rebroadcast error paths only. Mirrors the official HD1 API error format so proxy clients don't need to detect the error source. Successful rebroadcast responses return raw JSON directly.
{ "time": 1711234567, "error_code": 0, "error_message": "Invalid Content Type" }Authentication
/api/h1/rebroadcast requires an API key via Authorization: Bearer <key>. Keys are managed from the user dashboard. /api/h1/update is internal (worker-only, Bearer token must match UPDATE_KEY). All other endpoints are public.
Endpoints
get/api/h1/campaign— Get campaign data for a specific season or the latest.
/api/h1/campaign— Get campaign data for a specific season or the latest.Returns campaign data for a given season if the `season` query parameter is provided and valid. If no season is provided, returns the latest campaign data. If data is not found locally, attempts to fetch and update from a remote source.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| season | query | string | no | The season number to fetch campaign data for. |
Responses
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
data | any | no | The campaign data object |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
error | any | no | Error details or null |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
error | any | no | Error details or null |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
error | any | no | Error details or null |
post/api/h1/rebroadcast— Perform a campaign status or snapshot action
/api/h1/rebroadcast— Perform a campaign status or snapshot actionRequest Body(required)
| Property | Type | Required | Description |
|---|---|---|---|
action | "get_campaign_status" | "get_snapshots" | yes | The action to perform. |
season | integer | no | Required if action is get_snapshots. |
| Property | Type | Required | Description |
|---|---|---|---|
action | "get_campaign_status" | "get_snapshots" | yes | The action to perform. |
season | integer | no | Required if action is get_snapshots. |
Responses
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | |
error_code | number | yes | |
error_message | string | yes |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | |
error_code | number | yes | |
error_message | string | yes |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | |
error_code | number | yes | |
error_message | string | yes |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | |
error_code | number | yes | |
error_message | string | yes |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | |
error_code | number | yes | |
error_message | string | yes |
get/api/h1/update— Trigger current campaign status and snapshot updates
/api/h1/update— Trigger current campaign status and snapshot updates**Internal-use-only.** This endpoint is used by a node (web) worker to continuously trigger status and season updates for the current campaign. It is not intended for external user consumption. Requires a valid `key` query parameter matching the server's `UPDATE_KEY` environment variable.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| key | query | string | yes | Internal API key for authorization. |
Responses
| Property | Type | Required | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
time | number | yes | |||||||||||||||||||||
code | number | yes | |||||||||||||||||||||
message | string | yes | |||||||||||||||||||||
data | object | yes |
|
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
error | any | no | Error details or null |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
error | any | no | Error details or null |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
error | any | no | Error details or null |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
error | any | no | Error details or null |
get/api/h1/live— Get current campaign state for live polling
/api/h1/live— Get current campaign state for live pollingLightweight endpoint returning the current campaign data and computed map state. Designed for client-side polling via `useLiveData` hook at 10-second intervals.
Responses
| Property | Type | Required | Description |
|---|---|---|---|
data | any | no | Full campaign object |
mapState | array | yes | Sector ownership array |
postdelete/api/notifications/subscribe
/api/notifications/subscribeRegisters a Web Push subscription. The server will send push notifications for campaign events (started, won, lost) to the provided endpoint.
Request Body(required)
| Property | Type | Required | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
endpoint | string | yes | The push subscription endpoint URL. | ||||||||||||
keys | object | yes |
|
Responses
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
data | any | no | Response data |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
error | any | no | Error details or null |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
error | any | no | Error details or null |
Removes a Web Push subscription by endpoint URL. Silently succeeds if the subscription does not exist.
Request Body(required)
| Property | Type | Required | Description |
|---|---|---|---|
endpoint | string | yes | The push subscription endpoint URL to remove. |
Responses
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
data | any | no | Response data |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
error | any | no | Error details or null |
| Property | Type | Required | Description |
|---|---|---|---|
time | number | yes | Time taken to process the request (ms) |
code | number | yes | HTTP status code |
message | string | yes | Human-readable status message |
error | any | no | Error details or null |
