{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stalwart/main/json-schema/stalwart-post-api-auth-request-schema.json",
  "title": "PostApiAuthRequest",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/stalwart-http-openapi-generated.yml#/components/schemas/PostApiAuthRequest",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "Either \"authCode\" or \"authDevice\" to select the request shape."
    },
    "accountName": {
      "type": "string",
      "description": "Account name or email address."
    },
    "accountSecret": {
      "type": "string",
      "description": "Password or app password."
    },
    "mfaToken": {
      "type": "string",
      "description": "One‑time code, sent on a retry after an mfaRequired response."
    },
    "query": {
      "type": "string",
      "description": "The query string of the OAuth authorisation request."
    },
    "consent": {
      "type": "string",
      "description": "True when the user approved access."
    },
    "code": {
      "type": "string",
      "description": "The user code shown by the device, issued by POST /auth/device."
    }
  },
  "required": [
    "type"
  ]
}