Are these devices programmable? Are you in control of what these devices are sending and to what endpoint?
If this is the case, you can either try to put code on it with one of the Device SDKs. Or you can use the pure REST approach.
If not, you need to introduce a local gateway in between, an edge device.
Please check out this MS Learn learning path.