{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/logicmonitor/main/json-schema/logicmonitor-admin-schema.json",
  "title": "Admin",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logicmonitor-users-api-openapi.yml#/components/schemas/Admin",
  "type": "object",
  "required": [
    "email",
    "password",
    "roles",
    "username"
  ],
  "properties": {
    "lastName": {
      "description": "The last name associated with the user",
      "type": "string"
    },
    "note": {
      "description": "Any notes assocaited with the user",
      "type": "string"
    },
    "viewPermission": {
      "description": "The account tabs that will be visible to the user",
      "type": "object"
    },
    "timezone": {
      "description": "The timezone of the user",
      "type": "string"
    },
    "roles": {
      "uniqueItems": true,
      "description": "The roles assigned to the user",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Role"
      }
    },
    "lastLoginOn": {
      "format": "int64",
      "description": "The time that the user last logged in, in epoch format",
      "readOnly": true,
      "type": "integer"
    },
    "lastActionOnLocal": {
      "description": "The time, in local format, of the user's last action",
      "readOnly": true,
      "type": "string"
    },
    "smsEmailFormat": {
      "description": "sms | fullText, where sms = 160 characters and fullText= all characters",
      "type": "string"
    },
    "apionly": {
      "description": "Whether it is a API only user",
      "type": "boolean"
    },
    "apiTokens": {
      "description": "Any API Tokens associated with the user",
      "type": "array",
      "items": {
        "$ref": "#/$defs/APIToken"
      }
    },
    "password": {
      "description": "The password associated with the user",
      "type": "string"
    },
    "lastAction": {
      "description": "The last action taken by the user",
      "readOnly": true,
      "type": "string"
    },
    "trainingEmail": {
      "description": "The email address for user's Training account",
      "readOnly": true,
      "type": "string"
    },
    "lastActionOn": {
      "format": "int64",
      "description": "The time, in epoch format, of the user's last action",
      "readOnly": true,
      "type": "integer"
    },
    "id": {
      "format": "int32",
      "description": "The Id of the user",
      "readOnly": true,
      "type": "integer"
    },
    "email": {
      "description": "The email address associated with the user",
      "type": "string"
    },
    "contactMethod": {
      "description": "email | smsemail",
      "type": "string"
    },
    "acceptEULAOn": {
      "format": "int64",
      "description": "The time, in epoch format, that the user accepted the EULA (if required to)",
      "readOnly": true,
      "type": "integer"
    },
    "smsEmail": {
      "description": "The sms email address associated with the user",
      "type": "string"
    },
    "twoFAEnabled": {
      "description": "Whether or not two factor authentication is enabled for the user",
      "type": "boolean"
    },
    "firstName": {
      "description": "The first name associated with the user",
      "type": "string"
    },
    "phone": {
      "description": "The phone number associated with the user",
      "type": "string"
    },
    "createdBy": {
      "description": "Who created the user. This may be another user, SAML or LogicMonitor",
      "type": "string"
    },
    "forcePasswordChange": {
      "description": "Whether or not the user should be forced to change their password on the next login",
      "type": "boolean"
    },
    "acceptEULA": {
      "description": "Whether or not the user is required to accept the EULA (end user license agreement)",
      "type": "boolean"
    },
    "username": {
      "description": "The username associated with the user",
      "type": "string"
    },
    "status": {
      "description": "The user's status. Should be one of active and suspended",
      "type": "string"
    }
  },
  "$defs": {
    "APIToken": {
      "type": "object",
      "properties": {
        "accessId": {
          "description": "The access Id associated with the API Tokens",
          "readOnly": true,
          "type": "string"
        },
        "adminName": {
          "description": "The name of the user associated with the API Tokens",
          "readOnly": true,
          "type": "string"
        },
        "note": {
          "description": "The note associated with the API Tokens",
          "type": "string"
        },
        "lastUsedOn": {
          "format": "int64",
          "description": "The epoch at which the API Tokens were last used",
          "readOnly": true,
          "type": "integer"
        },
        "accessKey": {
          "description": "The secret key associated with the API Tokens",
          "readOnly": true,
          "type": "string"
        },
        "createdBy": {
          "description": "The user who is the API Tokens created by",
          "readOnly": true,
          "type": "string"
        },
        "roles": {
          "uniqueItems": true,
          "description": "The roles assigned to the user that is associated with the API Tokens",
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adminId": {
          "format": "int32",
          "description": "The id of the user associated with the API Tokens",
          "readOnly": true,
          "type": "integer"
        },
        "id": {
          "format": "int32",
          "description": "The id of the API Token",
          "readOnly": true,
          "type": "integer"
        },
        "createdOn": {
          "format": "int64",
          "description": "The epoch at which the API Tokens were created",
          "readOnly": true,
          "type": "integer"
        },
        "status": {
          "format": "int32",
          "description": "1 | 2 - Whether or not the API Tokens are enabled, where 2 = enabled",
          "type": "integer"
        }
      }
    },
    "Privilege": {
      "type": "object",
      "required": [
        "objectId",
        "objectType",
        "operation"
      ],
      "properties": {
        "objectName": {
          "readOnly": true,
          "type": "string"
        },
        "subOperation": {
          "readOnly": true,
          "type": "string"
        },
        "operation": {
          "type": "string"
        },
        "objectId": {
          "type": "string"
        },
        "objectType": {
          "type": "string"
        }
      }
    },
    "Role": {
      "type": "object",
      "required": [
        "name",
        "privileges"
      ],
      "properties": {
        "enableRemoteSessionInCompanyLevel": {
          "description": "Whether Remote Session should be enabled at the account level",
          "readOnly": true,
          "type": "boolean"
        },
        "customHelpLabel": {
          "description": "The label for the custom help URL as it will appear in the Help & Support dropdown menu",
          "type": "string"
        },
        "customHelpURL": {
          "description": "The URL that should be added to the Help & Support dropdown menu",
          "type": "string"
        },
        "privileges": {
          "description": "The account privileges associated with the role. Privileges can be added to a role for each area of your account",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Privilege"
          }
        },
        "associatedUserCount": {
          "format": "int32",
          "description": "The count of the users which are belongs to the role",
          "readOnly": true,
          "type": "integer"
        },
        "name": {
          "description": "The name of the role",
          "type": "string"
        },
        "description": {
          "description": "The description of the role",
          "type": "string"
        },
        "id": {
          "format": "int32",
          "description": "The Id of the role",
          "readOnly": true,
          "type": "integer"
        },
        "twoFARequired": {
          "description": "Whether Two-Factor Authentication should be required for this role",
          "type": "boolean"
        },
        "requireEULA": {
          "description": "Whether or not users assigned this role should be required to acknowledge the EULA (end user license agreement)",
          "type": "boolean"
        },
        "acctRequireTwoFA": {
          "description": "Whether Two-Factor Authentication should be required for the entire account",
          "readOnly": true,
          "type": "boolean"
        }
      }
    }
  }
}