Skip to content

Public Endpoint API

The public endpoint presents a minimal number of APIs to the world. This is primarily to reduce the attack surface area of wag.

GET /reachability

Test if the wag node is up, down, or draining (removing all active clients).

Return codeContentMeaning
200OKWag node is up and accepting new clients
410DrainedWag node is actively trying to remove clients

GET /register_device

This is the device registration endpoint, when you create a registration token this is where your clients should query.

ParametersUse
keyThe registration token
pubkeySupply a public key, the wag server will not generate a private key
Return codeContentMeaning
404N/AToken was either invalid or not found
500N/AAdding the device/user has failed, check server logs for reason
200Wireguard ProfileThe device/user has been added

ANY /webhooks/<webhook_id>

The webhooks endpoint can take any method, this is where a client should be posting its data.

This endpoint can take any schema of JSON

Required HeaderUse
X-AUTH-HEADERThe authorisation header for this webhook

Released under the MIT License