> For the complete documentation index, see [llms.txt](https://www.docpartner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.docpartner.dev/api/sms-partner.md).

# SMS Partner

Introduction à l'api 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
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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.docpartner.dev/api/sms-partner.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
