MailMasker API
Claude Code
Users and roles

Take a role from an account

DELETE/api/v1/admin/users/:id/roles/:role

Who can use this: Site adminsAs Markdown

The account loses what the role allowed, unless another of its roles allows the same. Each removal is recorded in the audit log.

Parameters

NameWhereWhat it is
id required path The account's number, from the account list.e.g. 7
role required path The role's name.e.g. auditor

Good to know

  • It answers ok even when the account didn't have the role.
  • Nothing stops you taking site_admin from your own account, so take care.