> For the complete documentation index, see [llms.txt](https://docs.iotify.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iotify.io/temp/protocol-settings/coap.md).

# CoAP

CoAP is based on UDP and has built in mechanism for ensuring reliable delivery. For a good overview of CoAP, please see the following guides

{% embed url="<http://www.programmingwithreason.com/article-iot-coap.html>" %}

Another interesting tutorial

{% embed url="<https://dzone.com/articles/coap-protocol-step-by-step-guide>" %}

In IoTIFY CoAP protocol settings we allow following fields to be configured

![](/files/-M8P_Dvd4S-yXiGpaevM)

**Method:** CoAP method, which could be GET/POST/PUT/DELETE

**Host:** The CoAP Host name or IP address, followed by the port number (if not default)

**Path:** The CoAP server URL, where the message should be sent to. If you are using a query string, that must be the part of URL itself.&#x20;

**Confirm:** Whether the message should be sent as (Conformable) CON or (Unacknowledged) NON

**Observe:** Whether the resource should be observed and any changes should be sent back to the client. The response handler function will be invoked if a change is detected.&#x20;

**Additional Headers:** Any additional header which must be sent along with the payload.&#x20;

**Timeout:** The timeout value to wait before declaring a non confirmed message a failure.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.iotify.io/temp/protocol-settings/coap.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
