{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "method": "getInbox",
    "group": "Inbox",
    "summary": "Get a list of recent PMs for the user",
    "description": "10 conversations per page",
    "deprecated": false,
    "params": {
        "type": "object",
        "properties": {
            "key": {
                "description": "API key",
                "type": "string"
            },
            "page": {
                "$ref": "#/$defs/NumericInput",
                "default": 1
            }
        },
        "required": [
            "key"
        ],
        "x-order": [
            "key",
            "page"
        ]
    },
    "result": {
        "type": "object",
        "properties": {
            "results": {
                "type": "array",
                "items": {
                    "$ref": "#/$defs/ConversationSummary"
                }
            },
            "MaxPages": {
                "type": "integer"
            }
        },
        "required": [
            "results",
            "MaxPages"
        ],
        "additionalProperties": false
    },
    "errors": [
        {
            "code": -32001,
            "message": "Invalid API Key"
        },
        {
            "code": -32002,
            "message": "Call Limit Exceeded"
        },
        {
            "code": -32003,
            "message": "User Account Disabled"
        },
        {
            "code": -32004,
            "message": "IP address needs authorization - please check your notices on BTN"
        },
        {
            "code": -32004,
            "message": "Unauthorized IP address"
        },
        {
            "code": 0,
            "message": "Max Pages: {maxPages}"
        }
    ],
    "examples": [],
    "$defs": {
        "ConversationSummary": {
            "type": "object",
            "properties": {
                "ID": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Subject": {
                    "type": "string"
                },
                "Unread": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Sticky": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "UserID": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                },
                "Username": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "Date": {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                }
            },
            "required": [
                "ID",
                "Subject",
                "Unread",
                "Sticky",
                "UserID",
                "Username",
                "Date"
            ],
            "additionalProperties": false
        },
        "NumericInput": {
            "description": "A whole number, sent either as a JSON number or as a string containing one.\n`5` and `\"5\"` are equivalent, and both are accepted wherever this type appears.",
            "oneOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d+)?$"
                }
            ]
        }
    }
}
