Headscale unofficial
PUT/api/v1/policy

Set the policy

Replaces the current policy with the policy value supplied in the request body. Include the policy text in policy; the response provides the saved policy and its update time.

1 body field

Policy data to save.

policystringoptional
The policy text.

2 status codes
200Returns the saved policy text and its last-updated time in `updatedAt`.
policystringrequired
updatedAtstringrequired
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 request body must be a JSON object. Supply the policy text as a string in policy.