> For the complete documentation index, see [llms.txt](https://docs.mailtrap.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mailtrap.io/for-ai-agents/tools/prompts.md).

# Prompts

Mailtrap provides its users with ready-to-copy prompts that include the context AI agents like Cursor or Copilot need to integrate sending into your app/project. You can use AI prompts when you want to:

* **Start sending emails in minutes** without having to manually copy/paste sending configurations.
* **Avoid typos and mistakes** that commonly come when handling code.
* **Learn how the actual code works** by following what AI is doing.

{% hint style="info" %}
In case you have an AI agent that you want to onboard to Mailtrap, please use [this page](https://docs.mailtrap.io/getting-started/ai-onboarding.md). We also offer the following official skills for AI agents:

* [Sending emails](https://github.com/mailtrap/mailtrap-skills/tree/main/skills/sending-emails)
* [Using email templates](https://github.com/mailtrap/mailtrap-skills/tree/main/skills/using-email-templates)
* [Setting up a sending domain](https://github.com/mailtrap/mailtrap-skills/tree/main/skills/setting-up-sending-domain)
  {% endhint %}

### How to use AI prompts&#x20;

First, navigate to the [**Sending Setup**](https://mailtrap.io/api-smtp/sending-setup) page under **API/SMTP** and choose one of the three available prompt types:

1. **API** – Focuses on integrating via the Mailtrap Email API
2. **SMTP** – Focuses on configuring SMTP sending
3. **AI** – Generates a prompt that covers the complete Mailtrap sending setup

<figure><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FpsUfX53eqDYhvzd1HrQF%2FScreenshot%202026-08-13%20at%2011.45.49.png?alt=media&amp;token=14c1f8d2-e97d-4fc7-b64a-8d9468dcde5a" alt=""><figcaption></figcaption></figure>

Keep in mind that the generated prompt depends on several selections, so make sure you choose the right options before copying it. These include the following:

* **Domain** – The sending domain being configured
* **Stream** – Transactional or [Bulk](https://docs.mailtrap.io/email-api-smtp/setup/bulk-stream)
* **Prompt type** – AI, API, or SMTP
* **Technology stack** – Choose the stack that matches your project. For example, cURL, PHP, Node.js, etc.&#x20;

Once you're done selecting the desired parameters, simply click **Copy for AI** and get your prompt.

<figure><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FBVWfJgF2nR6j1UX75Mx0%2FScreenshot%202026-08-13%20at%2012.06.41.png?alt=media&amp;token=897d53b4-bb16-4765-bdaa-a7b35c6a8a26" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Since AI is prone to hallucination and errors, make sure to verify the output before sending any emails to real users.
{% endhint %}


---

# 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.mailtrap.io/for-ai-agents/tools/prompts.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.
