# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
