A notable exception to this is HomeKit devices. While it's not close to what you'd want for a general third-party API, it does let you integrate some things. I've messed around a bit with using a server to fake being a HomeKit device to get some custom things working with Siri.