> 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/gestion-des-webhooks.md).

# Webhooks

## Réponse sur un numéro court

Après l’envoi d’une campagne depuis notre numéro court, SMS Partner vous permet de recevoir des réponses.\
Pour en savoir plus, [**contactez nous**](https://www.smspartner.fr/contact).

{% hint style="info" %}

#### À noter

Pour recevoir les réponses, vous devez paramétrer votre URL de réception des réponses&#x20;

dans votre onglet [API SMS](https://my.smspartner.fr/dashboard/parametres/edit)
{% endhint %}

<figure><img src="/files/VmSory8ppZK3IsbGoc5V" alt=""><figcaption></figcaption></figure>

**Exemple de réponse JSON  envoyé en POST**

```json
{
"type":"response",
"phone_number":"+336....",
"text":"test",
"message_id":1111111
}

```

**Pour un STOP SMS la réponse du webhook sera**

```json
{
"type":"stop",
"phone_number":"+336...",
"text":"Stop",
"message_id":111111
}
```

## Réponse sur numéro long (numéro virtuel)

SMS Partner vous propose la location d'un numéro long (exemple: 06 XX XX XX XX)\
Pour en savoir plus sur la création d'un numéro long dédié, [contactez nous](https://www.smspartner.fr/contact/).

#### Exemple de réponse simple (160 caractères maximum)

```json
{
  "msisdn": "33xxxxxxxxx",
  "to": "33xxxxxxxxx",
  "messageId": "1235-1234-1233-4665",
  "text": "Test",
  "type": "text",
  "keyword": "Test",
  "message-timestamp": "2016-03-10 09:51:46"
}
```

#### Exemple de réponse sur SMS long (+160 caractères)

```json
{
  "msisdn": "33xxxxxxxxx",
  "to": "33xxxxxxxxx",
  "messageId": "a1b2c3d4-e5f6-40a1-80b2-c9d0e1f....", //au format UUID
  "concat": "true",
  "concat-ref": "171",
  "concat-total": "2",
  "concat-part": "1",
  "text": "   Message long....",
  "type": "text",
  "keyword": "MESSAGELONG",
  "message-timestamp": "2016-03-09 16:00:30"
}
 
{
  "msisdn": "33xxxxxxxxx",
  "to": "33xxxxxxxxx",
  "messageId": "a1b2c3d4-e5f6-40a1-80b2-c9d0e1...", //au format UUID
  "concat": "true",
  "concat-ref": "171",
  "concat-total": "2",
  "concat-part": "2",
  "text": "....très long",
  "type": "text",
  "keyword": "TRESLONG",
  "message-timestamp": "2016-03-09 16:00:31"
}
```

&#x20;

## DLR - récupération des statuts des SMS

**Le statut de délivrabilité des SMS peut être envoyé via le webhook en POST**

<pre class="language-json" data-overflow="wrap"><code class="lang-json"><strong>{
</strong>"status":"delivered",
"msgId":"11111111",
"date":1764768485,
"phone":"+336.......",
"cost":"0.049",
"currency":"EUR",
"tag":"...."
}
</code></pre>

Les différents statuts sont

* delivered : Le SMS a été délivré
* not delivered : Le SMS n'a pas été délivré
* waiting: Le SMS est en attente chez l'opérateur


---

# 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://www.docpartner.dev/api/sms-partner/gestion-des-webhooks.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.
