# SMS Partner

Les envois de SMS sont effectués à partir de l’API SMS de [SMS Partner](https://smspartner.fr). Depuis le site, vous avez un accès immédiat à notre API gratuite : elle vous permet d’intégrer facilement nos services de SMS à 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 SMS Partner](https://my.smspartner.fr/dashboard). |

### 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.smspartner.fr
Content-Type: application/json

{
    "apiKey": "API_KEY",
    "phoneNumbers": "+33600000000",
    "message": "Hello world"
}
```

### Requêtes

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

```
http://api.smspartner.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`).

***

### Télécharger un exemple PHP

Téléchargez directement un exemple d’utilisation en PHP :

***

N’hésitez pas à consulter nos SDK disponibles sur ce site.

{% content-ref url="/pages/AvpXEtyiyWSwB5CaStJE" %}
[SDKS](/sdks.md)
{% endcontent-ref %}


---

# 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/sms-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.
