CoAP API

info

The following API is subject to change.

The myDevices Constrained Application Protocol (CoAP) endpoint provides an additional connectivity to send device to cloud messages using the CoAP protocol. This endpoint is ideal for NarrowBand (NB-IoT) and LTE CAT M1 devices.

At this time, the endpoint only offers a very basic functionality to publish messages to a generic path using JSON format. We'll be working to support additional payload type, such as Protobuf and native publish/subscribe features.

Method#

MethodURINameSummary
POSTcoap://coap.m2c.io/api/v1/uplinkDevice UplinkSends telemetry data

Custom JSON Payload

{
"key": "",
"eui": "UNIQUE_DEVICE_ID",
"format": "json",
"data": {
"temp": 20
}
}

JSON Example Using Cayenne LPP

{
"eui": "UNIQUE_DEVICE_ID",
"format": "hex",
"data": "0367014a046882"
}

For Cayenne LPP Documentation

Example Using MQTT API Payload

{
"eui": "UNIQUE_DEVICE_ID",
"format": "json",
"data": [
{
"channel": 1,
"value": 16.4,
"type": "temp",
"unit": "c"
},
{
"channel": 2,
"value": 75,
"type": "rel_hum",
"unit": "p"
},
{
"channel": 5,
"value": 75,
"type": "batt",
"unit": "v"
},
{
"channel": 10,
"value": 1,
"type": "digital_sensor",
"unit": "d"
},
{...}
]
}

The data property must be a JSON array of objects, each element having channel, value, type and unit porperties. Refer to the list of our supported data types for the type and unit properties.