Update a basic auth user
PATCH
/api/zones/{zoneId}/basic-auth-users/{id}
Updates the username, comment, or password of an existing basic auth user. Providing plainPassword (minimum 8 characters) replaces the stored password; omitting it leaves the current password unchanged. Changing the username requires providing plainPassword as well, because the stored password is bound to the username. The username must remain unique within the zone.
Authorizations
ApiToken
Long-lived API token created via POST /api/api-tokens (returned once in plaintext). A token created with readOnly may only perform safe requests (GET, HEAD, OPTIONS); write requests are rejected on every endpoint.
Type
API Key (header: X-API-TOKEN)
or
JWT
JWT access token obtained via POST /api/auth/login. Send as: Authorization: Bearer
Type
HTTP (bearer)
Parameters
Path Parameters
zoneId*
Zone identifier
Type
Requiredstring
id*
basic-auth-user identifier
Type
Requiredstring
Request Body
application/merge-patch+json
JSON "username": "jdoe", "plainPassword": "s3cr3tP@ssw0rd", "comment": "Read-only access for the analytics team"
{
}
Responses
basic-auth-user resource updated
JSON "@context": "string", "@id": "string", "@type": "string", "id": "9f8b2c1a-4d3e-4f5a-8b6c-7d8e9f0a1b2c", "zone": "https://example.com/", "username": "jdoe", "comment": "Read-only access for the analytics team", "createdAt": "2026-01-15T09:30:00+00:00", "updatedAt": "2026-01-16T14:05:00+00:00"
{
}
