{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-session-info-response-dto-schema.json",
  "title": "SessionInfoResponseDto",
  "description": "Login session info.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-authentication-api-openapi.yml#/components/schemas/SessionInfoResponseDto",
  "type": "object",
  "properties": {
    "organizationId": {
      "type": "string",
      "description": "BILL-generated ID of the current organization"
    },
    "userId": {
      "type": "string",
      "description": "BILL-generated ID of the current user"
    },
    "mfaStatus": {
      "allOf": [
        {
          "$ref": "#/$defs/MfaStatus"
        },
        {
          "description": "MFA status of the organization.\n* `DISABLED`: MFA is disabled for the organization.\n* `SETUP`: MFA setup is incomplete. Validate phone to complete MFA setup.\n* `CHALLENGE`: MFA setup is complete. MFA challenge is required for MFA sign in.\n* `COMPLETE`: Both MFA setup and MFA sign in steps are complete. The API session is MFA trusted."
        }
      ]
    },
    "mfaBypass": {
      "type": "boolean",
      "description": "This field is set as `true` when MFA is disabled at the developer key level. All organizations that are linked to this developer key do not require MFA."
    }
  },
  "$defs": {
    "MfaStatus": {
      "type": "string",
      "enum": [
        "DISABLED",
        "SETUP",
        "CHALLENGE",
        "COMPLETE",
        "UNDEFINED"
      ]
    }
  }
}