> For the complete documentation index, see [llms.txt](https://docs.yaycommerce.com/yaymail/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yaycommerce.com/yaymail/developer-zone/api/api-explainer-plugin.md).

# API Explainer Plugin

Welcome to the official documentation for the **YayMail Integration Demo** mini-plugin. It explains the purpose of the API and how this demo plugin illustrates the API's capabilities.

You can download it here:

{% file src="/files/sUMNeW3wfj9TAhnsnrnc" %}

\
This mini-plugin demonstrates that developers can extend **YayMail** using the newly introduced **YayMail API** to:

* Add **custom email templates**.
* Register **custom elements** inside YayMail builder.
* Register **custom shortcodes** for use inside email designs.

Once installed, you will see a new email template, a new element and a new shortcode.

<figure><img src="/files/Z0mBgIS9AaI3vn2G5ZcP" alt=""><figcaption><p>New custom email template</p></figcaption></figure>

<figure><img src="/files/2n5efDyBg0ho02Wm0zIn" alt=""><figcaption><p>New element within a Demo group</p></figcaption></figure>

<figure><img src="/files/0rrP3hJsPFrmysv3W5lA" alt=""><figcaption><p>New custom shortcode used inside YayMail's element</p></figcaption></figure>

To dive into the setup, structure, and how you can modify or build upon this API for your own projects, please see the next pages.


---

# 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.yaycommerce.com/yaymail/developer-zone/api/api-explainer-plugin.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.
