# SMS Partner

SMS messages are sent via the [SMS Partner](https://smspartner.fr) API. From the website, you have immediate access to our free API: it allows you to easily integrate our SMS services into your website, software, or CRM application in PHP, ASP, .NET, Java, or any other language.

### Required Parameters

Each API request must include at least the following parameters:

| Name     | Description                                                                                                     |
| -------- | --------------------------------------------------------------------------------------------------------------- |
| `apiKey` | Your account's API key. You can obtain it from your [dashboard SMS Partner](https://www.smspartner.fr/api-sms/) |

### Optional Parameters

| Name      | Description                                 |
| --------- | ------------------------------------------- |
| `_format` | Response format: `json` (default) or `xml`. |

**Example call:**

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

### Response Format and Content-Type

You can format your request in either `json` or `xml`.\
You must set the appropriate header (`Content-Type`) accordingly:

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

**Example JSON request:**

```http
POST /v1/send HTTP/1.1
Host: api.smspartner.fr
Content-Type: application/json

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

### Requests

All API requests must be sent to:

```
http://api.smspartner.fr/v1/{command}
```

`{command}` corresponds to the API call you wish to make, with the parameters included in the body (`POST`) or in the URL (`GET`).

***

### Download a PHP Example

Directly download a usage example in PHP:


---

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