Skip to content

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/campaignGet 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

NameInTypeRequiredDescription
seasonquerystringnoThe season number to fetch campaign data for.

Responses

200Campaign data found and returned successfully.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
dataanynoThe campaign data object
400Invalid season parameter.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
erroranynoError details or null
404Campaign data not found.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
erroranynoError details or null
500Internal server error.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
erroranynoError details or null
post/api/h1/rebroadcastPerform a campaign status or snapshot action

Request Body(required)

multipart/form-data
PropertyTypeRequiredDescription
action"get_campaign_status" | "get_snapshots"yesThe action to perform.
seasonintegernoRequired if action is get_snapshots.
application/x-www-form-urlencoded
PropertyTypeRequiredDescription
action"get_campaign_status" | "get_snapshots"yesThe action to perform.
seasonintegernoRequired if action is get_snapshots.

Responses

200Success
400Invalid request (content type, action, or arguments).
PropertyTypeRequiredDescription
timenumberyes
error_codenumberyes
error_messagestringyes
401Unauthorized. API key missing, malformed, or not found.
PropertyTypeRequiredDescription
timenumberyes
error_codenumberyes
error_messagestringyes
403Forbidden. API key found but disabled.
PropertyTypeRequiredDescription
timenumberyes
error_codenumberyes
error_messagestringyes
404Not found.
PropertyTypeRequiredDescription
timenumberyes
error_codenumberyes
error_messagestringyes
405Method not allowed.
PropertyTypeRequiredDescription
timenumberyes
error_codenumberyes
error_messagestringyes
get/api/h1/updateTrigger 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

NameInTypeRequiredDescription
keyquerystringyesInternal API key for authorization.

Responses

200Update successful. Returns the updated status and season data.
PropertyTypeRequiredDescription
timenumberyes
codenumberyes
messagestringyes
dataobjectyes
PropertyTypeRequiredDescription
updatedobjectyes
PropertyTypeRequiredDescription
statusanynoThe updated status data.
seasonanynoThe updated season data.
400Bad request. Missing key parameter.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
erroranynoError details or null
401Unauthorized. The provided key is missing or invalid.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
erroranynoError details or null
405Method Not Allowed. Only GET is supported.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
erroranynoError details or null
500Internal server error.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
erroranynoError details or null
get/api/h1/liveGet current campaign state for live polling

Lightweight endpoint returning the current campaign data and computed map state. Designed for client-side polling via `useLiveData` hook at 10-second intervals.

Responses

200Current campaign state with computed map ownership.
PropertyTypeRequiredDescription
dataanynoFull campaign object
mapStatearrayyesSector ownership array
500Database error fetching campaign data.
postdelete/api/notifications/subscribe
postSubscribe to push notifications

Registers a Web Push subscription. The server will send push notifications for campaign events (started, won, lost) to the provided endpoint.

Request Body(required)

application/json
PropertyTypeRequiredDescription
endpointstringyesThe push subscription endpoint URL.
keysobjectyes
PropertyTypeRequiredDescription
p256dhstringyesBase64-encoded P-256 ECDH public key.
authstringyesBase64-encoded authentication secret.

Responses

201Subscription created or updated.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
dataanynoResponse data
400Invalid JSON or missing required fields.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
erroranynoError details or null
500Internal server error.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
erroranynoError details or null
deleteUnsubscribe from push notifications

Removes a Web Push subscription by endpoint URL. Silently succeeds if the subscription does not exist.

Request Body(required)

application/json
PropertyTypeRequiredDescription
endpointstringyesThe push subscription endpoint URL to remove.

Responses

200Subscription removed.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
dataanynoResponse data
400Invalid JSON or missing endpoint.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
erroranynoError details or null
500Internal server error.
PropertyTypeRequiredDescription
timenumberyesTime taken to process the request (ms)
codenumberyesHTTP status code
messagestringyesHuman-readable status message
erroranynoError details or null