If you need to add a body class for a page , please use below steps.
> Login to M2 Admin > Go to the content -> pages & select the page you want to add a body class > Select Design tab and add in what you want to add a class from Layout Update XML
Ex:
<body>
<attribute name=”class” value=”service-unavailable”/>
</body>