Before adding the Hostname/ IP address please make sure that the Probe Agent IP has API permission to the firewall.
API Key field is not required to be added into ConnectSecure for Sophos XG
The integrated port is the HTTPS Port and the Probe machine IP should be allowed.
Granting API Permissions
Add the probe machine IP under the API section and click on Apply:
Port 444 is generally used by default unless otherwise configured on your Sophos XG