# otCoapOption Struct Reference

# otCoapOption


`#include <openthread/coap.h>`

Represents a CoAP option.

## Summary

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-coap-option#structot_coap_option_1af19af35480dd7280f32e6ca5f2f20f59` | `uint16_t` Option Length. |
| `https://openthread.io/reference/struct/ot-coap-option#structot_coap_option_1afd7edce76e154842f55714bc56b655a8` | `uint16_t` Option Number. |

## Public attributes

### mLength

```
uint16_t otCoapOption::mLength
```
Option Length.

### mNumber

```
uint16_t otCoapOption::mNumber
```
Option Number.

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).