Disable 2FA

Disable two-factor authentication (2FA) for your account (authenticated account) or for the accounts you manage.

MasterAdmin can disable 2FA for all accounts, DomainAdmin can disable 2FA for all MailUsers of domains administered by them.

  • HTTP Method: DELETE
  • URL: https://example.domain.tld/api/v1/2fa/<username>/
  • Require authentication: Yes
  • Permission level required: MasterAdmin / DomainAdmin / MailUser

Path parameters

Parameter Type Description Required
username str Account username Required

Response

HTTP 204 NO CONTENT (empty string)

Example request (Python)

import requests
import json
from pprint import pprint

url = "https://example.domain.tld/api/v1/2fa/u2@vonmail.com/"
r = requests.delete(url, auth=("u2@vonmail.com","long-auth_token-here"))
try:
    pprint(r.json())
except:
    print(r.text)
print(r.status_code)

Example response (text)


204