There is a bit of documentaiton on CoAP here:
https://www.digi.com/resources/documentation/Digidocs/90002258/Default.htm#tasks/t_example_python_coap.htm
but it tells you to download a CoAP library from https://pypi.org/project/CoAPthon/ and looking at that library it does not seem to be built for micropython. I'm not sure what this documentation really is, as it refers to XBee3 but then it lists a bunch of steps to perform on a Host PC, without ever connecting the dots re: what you do on the XBee3 / Micropython side.
What's up with this - is there a CoAP library I can just download into the XBee3?
I did find a third party library:
https://github.com/insighio/microCoAPy
but it does not support DTLS which is pretty critical. I think the ssl library in the Xbee3 is ussl (https://docs.micropython.org/en/latest/library/ussl.html#functions) which does not support datagrams.