# Supprimer un sous-compte

## URL

<mark style="color:red;">`DELETE`</mark> `https://api.smspartner.fr/v1/subaccount/delete`

#### **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>token</code></td><td>Identifiant du sous-compte</td></tr></tbody></table>

#### Requêtes

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

```
curl --location --request DELETE 'http://api.smspartner.fr/v1/subaccount/remove' \
--header 'Content-Type: application/json' \
--data-raw '{
   "apiKey": "YOUR_API_KEY",
   "token": "TOKEN SUBACCOUNT"}'
```

{% endtab %}
{% endtabs %}

#### **Réponse**

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

```json
{
   "success": true,
   "code": 200
}
```

{% endtab %}
{% endtabs %}

#### Erreurs

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

```json
{
  "success": false,
  "code": 10,
  "message": "Clef API incorrecte"
}
```

{% endtab %}
{% endtabs %}

#### **Code erreurs**

<table><thead><tr><th width="234">Code de réponse</th><th>Réponse</th></tr></thead><tbody><tr><td>1</td><td>Le Token est requis</td></tr><tr><td>10</td><td>La Clé API est requise</td></tr><tr><td>404</td><td>Le sous-compte n'existe pas</td></tr></tbody></table>


---

# 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/sous-comptes/supprimer-un-sous-compte.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.
