# Mail Partner

Les envois de mail sont effectués à partir de la plateforme [Mail Partner](http://www.mailpartner.fr/). Depuis le site, vous avez un accès immédiat à notre API gratuite : elle vous permet d’intégrer facilement nos services de mail à votre site web, logiciel ou application CRM en PHP, ASP, .NET, Java ou tout autre langage.

### Paramètres obligatoires

Chaque demande d’API prend en charge au minimum les paramètres suivants :

| Nom      | Description                                                                                                           |
| -------- | --------------------------------------------------------------------------------------------------------------------- |
| `apiKey` | Clé API de votre compte. Vous l’obtenez dans votre [dashboard Mail Partner](https://my.mailpartner.fr/dashboard/api). |

### Paramètres optionnels

| Nom       | Description                                          |
| --------- | ---------------------------------------------------- |
| `_format` | Format de la réponse : `json` (par défaut) ou `xml`. |

**Exemple d’appel :**

```
https://api.smspartner.fr/v1/me?apiKey=YOUR_API_KEY&_format=json
```

### Format de la réponse et Content-Type

Vous pouvez formater votre requête en `json` ou en `xml`.\
Vous devez renseigner l’en-tête (`Content-Type`) en conséquence :

| `_format` | Content-Type       |
| --------- | ------------------ |
| json      | `application/json` |
| xml       | `application/xml`  |

**Exemple de requête JSON :**

```http
POST /v1/send HTTP/1.1
Host: api.mailpartner.fr
Content-Type: application/json
{
    "apiKey": "API_KEY",
    "subject": "Mon premier email",
    "htmlContent": "Hello world",
    "params":{
        "to":[
             {
                "email":"mon@email2.com"
             }
         ]
    }
}
```

### Requêtes

Toutes les demandes API doivent être envoyées vers :

```
http://api.mailpartner.fr/v1/{commande}
```

`{commande}` correspond à l’appel API que vous souhaitez exécuter, avec les paramètres inclus dans le body (`POST`) ou dans l’URL (`GET`).


---

# 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://www.docpartner.dev/api/mail-partner.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.
