<p>In Plutus apps, the mechanism for requesting inputs is called &quot;endpoints&quot;.</p>
<p>All endpoints that an app wants to use must be declared as part of the type of the app. The set of all endpoints of an app is called the schema of the app. The schema is defined as a Haskell type. You can build a schema using the <code>Endpoint</code> type family to construct individual endpoint types, and the <code>.\/</code> operator to combine them.</p>
<p>I suggest you design your Plutus app based on the idea that endpoints are the only possible way to interact with the smart contract from a user perspective.</p>

CC BY-SA 4.0
2022-10-18T04:17:19.340Z
2022-10-18T04:17:19.340Z
Falcon Stakepool
<p>and cant figure out what Endpoint do (why are they in the code) and most important of all how should I code them. What are the best practices?</p>

<plutus><smart-contract><on-chain><offchain>
How do Endpoints work?
# How do Endpoints work?

(Asked by: username_0 on 2022-02-22)

and cant figure out what Endpoint do (why are they in the code) and most important of all how should I code them. What are the best practices?

**Tags:** plutus, smart-contract, on-chain, offchain

---

## 1 answers

### Answer by username_1 on 2022-10-18. Score: 2 | Accepted answer

In Plutus apps, the mechanism for requesting inputs is called "endpoints".

All endpoints that an app wants to use must be declared as part of the type of the app. The set of all endpoints of an app is called the schema of the app. The schema is defined as a Haskell type. You can build a schema using the `Endpoint` type family to construct individual endpoint types, and the `.\/` operator to combine them.

I suggest you design your Plutus app based on the idea that endpoints are the only possible way to interact with the smart contract from a user perspective.


---

