> 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/gerer-le-transfert-dappel.md).

# Gérer le transfert d'appel

## URL

<mark style="color:green;">`POST`</mark> `https://api.smspartner.fr/v1/vn/callforward`

#### **Paramètres obligatoires**

<table data-full-width="false"><thead><tr><th width="180">Nom</th><th>Valeur</th></tr></thead><tbody><tr><td><code>apiKey</code></td><td><a href="https://my.smspartner.fr/dashboard/api">Votre clé API</a></td></tr><tr><td><code>number</code></td><td>Numéro virtuel</td></tr><tr><td><code>type</code></td><td>Type de transfert : <br>0 → Désactivé<br>1 → Transfert d'appel<br>2 → Messagerie</td></tr><tr><td><code>param</code></td><td>Si type = 0 → laisser vide<br>Si type = 1 → ajouter le numéro du transfert<br>Si type = 2 → ajouter l'email qui sera notifié d'un nouveau message</td></tr></tbody></table>

#### Requête

{% tabs %}
{% tab title="cURL" %}

```
curl --location 'https://api.smspartner.fr/v1/vn/callforward' \
--header 'Content-Type: application/json' \
--data '{
    "apiKey": "API_KEY",
    "number": "NUMBET",
    "type": 0, 
    "param": ""
}'
```

{% endtab %}
{% endtabs %}

#### **Réponse**

{% tabs %}
{% tab title="json" %}

```json
{
    "success": true,
    "code": 2,
    "message": "Callforward disabled"
}
```

{% endtab %}
{% endtabs %}

#### Erreurs

{% tabs %}
{% tab title="json" %}

```json
{
    "success": false,
    "code": 5,
    "message": "email is not valid"
}
```

{% endtab %}
{% endtabs %}

#### **Code erreurs**

| Code de réponse | Réponse                                 |
| --------------- | --------------------------------------- |
| 10              | La Clé API est requise                  |
| 1               | name est requis                         |
| 5               | Le numéro virtuel est requis            |
| 6               | Le type est requis                      |
| 7               | Le type n’est pas valide                |
| 8               | param est requis                        |
| 9               | L’email n’est pas valide                |
| 12              | Le numéro de transfert n’est pas valide |
| 13              | Le numéro virtuel n’existe pas          |
| 14              | Le transfert d’appel n’est pas activé   |
| 15              | Le numéro est désactivé                 |
| 16              | Le transfert d’appel est déjà activé    |
| 17              | La messagerie est déjà activée          |
| 18              | Le transfert d’appel est déjà désactivé |


---

# 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/gerer-le-transfert-dappel.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.
