Headscale unofficial
POST/api/v1/node/{nodeId}/approve_routes

Set approved routes for a node

Updates the approved routes for a node. Send the route values in the routes array to set which routes are approved for that node.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 1 body field
nodeIdstringrequired
The node identifier, formatted as an unsigned 64-bit integer.

Route settings for the node.

routesarray<string>optional
The routes to approve, supplied as an array of strings.

2 status codes
200Returns the updated node record, including its approved routes and other node details.
nodeobjectrequired
defaultError
detailstringoptional
A human-readable explanation specific to this occurrence of the problem.
errorsarray<object>optional
Optional list of individual error details
instancestringoptional
A URI reference that identifies the specific occurrence of the problem.
statusintegeroptional
HTTP status code
titlestringoptional
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
typestringoptional
A URI reference to human-readable documentation for the error.
Default:about:blank

Error handling

The nodeId path parameter must be a string in unsigned 64-bit integer format. The request body accepts routes as an array of strings; each array item must be a string.