About the 400 bad request error I discovered that a DEVICEID line is needed. I'm using this lines to register computers with no agent installed:
<?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
<CONTENT>
<ACCOUNTINFO>
<KEYNAME>TAG</KEYNAME>
<KEYVALUE>XXXXXXX</KEYVALUE>
</ACCOUNTINFO>
<HARDWARE>
<CHECKSUM>0</CHECKSUM>
<NAME>myserver</NAME>
<OSNAME>Centos 8</OSNAME>
<PROCESSORN>4</PROCESSORN>
</HARDWARE>
</CONTENT>
<DEVICEID>myserver-2021-02-22-19-08-00</DEVICEID>
<QUERY>INVENTORY</QUERY>
</REQUEST>