The /2/files/restore endpoint is the right way to restore a previous version of a file. An 'invalid_revision' error like that should indicate that the value you supplied in the "rev" parameter isn't usable though, e.g., it's not an actual revision value, or it refers to a version that cannot be restored (e.g., because it doesn't exist anymore).
If something's not working as expected/documented, I'll be happy to look into it, but I'd need some more information. In that case, reply with:
the name and version number of the SDK/library you are using, if any
the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)