Add a one-click API mocking button to your API documentation
Using our embedded button, you can offer your users a convenient way to launch your API mocks in one click. The button uses Mockoon's custom protocol mockoon://
to open your mock API directly in the desktop application. You can also provide your user with a ready-to-use CLI command (see below).
Preview:
Copy the following code:
<style>.mockoon-btn{display:inline-block;padding:5px;border-radius:5px;border:1px solid #d8dbdf;background-color:#5066901a;color:#506690;text-decoration:none;white-space:nowrap;}.mockoon-btn:hover{border:1px solid #d8dbdf;background-color:#50669026;color:#506690;text-decoration:none;}.mockoon-btn img{width:35px;margin: 0 5px}</style><a href="mockoon://load-environment?url={data_URL}"><img src="https://mockoon.com/images/logo-eyes.svg" width="50" />Mock with Mockoon</a>
Feel free to modify this code!
Run a mock with the CLI:
mockoon-cli start -d {data_URL}