{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$ref": "#/definitions/ResendMFADeviceResponse",
    "definitions": {
        "ResendMFADeviceResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "anyOf": [
                        {
                            "type": "object",
                            "properties": {
                                "trustedDeviceCount": {
                                    "type": "number",
                                    "description": "Number of available trusted devices"
                                },
                                "securityCode": {
                                    "type": "object",
                                    "properties": {
                                        "length": {
                                            "type": "number"
                                        },
                                        "tooManyCodesSent": {
                                            "type": "boolean"
                                        },
                                        "tooManyCodesValidated": {
                                            "type": "boolean"
                                        },
                                        "securityCodeLocked": {
                                            "type": "boolean"
                                        },
                                        "securityCodeCooldown": {
                                            "type": "boolean"
                                        },
                                        "valid": {
                                            "type": "boolean",
                                            "description": "Since iOS 26.4 a successfully validated code is acknowledged with status 409 and this flag set to true"
                                        }
                                    },
                                    "description": "Properties of the requested security code"
                                },
                                "phoneNumberVerification": {
                                    "type": "object",
                                    "properties": {
                                        "trustedPhoneNumber": {
                                            "$ref": "#/definitions/TrustedPhoneNumber",
                                            "description": "The phone number used for verification"
                                        },
                                        "trustedPhoneNumbers": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/TrustedPhoneNumber"
                                            }
                                        },
                                        "securityCode": {
                                            "type": "object",
                                            "properties": {
                                                "length": {
                                                    "type": "number"
                                                },
                                                "tooManyCodesSent": {
                                                    "type": "boolean"
                                                },
                                                "tooManyCodesValidated": {
                                                    "type": "boolean"
                                                },
                                                "securityCodeLocked": {
                                                    "type": "boolean"
                                                },
                                                "securityCodeCooldown": {
                                                    "type": "boolean"
                                                },
                                                "valid": {
                                                    "type": "boolean",
                                                    "description": "Since iOS 26.4 a successfully validated code is acknowledged with status 409 and this flag set to true"
                                                }
                                            },
                                            "description": "Format of the expected security code used in MFA resend responses"
                                        }
                                    },
                                    "required": [
                                        "trustedPhoneNumber"
                                    ],
                                    "description": "Object holding information about alternative phone number verification"
                                }
                            }
                        },
                        {
                            "type": "string",
                            "const": ""
                        }
                    ],
                    "description": "Apple does not reliably return a body for this request (usually status 202 without content)"
                }
            },
            "description": "The expected response format for the MFA resend request on a trusted device"
        },
        "TrustedPhoneNumber": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "number",
                    "minimum": 0
                },
                "numberWithDialCode": {
                    "type": "string",
                    "minLength": 1
                },
                "pushMode": {
                    "type": "string",
                    "pattern": "^sms|voice$"
                },
                "obfuscatedNumber": {
                    "type": "string"
                },
                "lastTwoDigits": {
                    "type": "string"
                },
                "nonFTEU": {
                    "type": "boolean",
                    "description": "Flag provided by the backend, that needs to be echoed when submitting a code received through this number"
                }
            },
            "required": [
                "id",
                "numberWithDialCode"
            ],
            "description": "Object representing a trusted phone number used in MFA resend responses"
        }
    }
}
