# Delete Sub-account

## URL

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

#### **Required Parameters**

| Name     | Value                                                  |
| -------- | ------------------------------------------------------ |
| `apiKey` | [Your API key](https://my.smspartner.fr/dashboard/api) |
| `token`  | Sub-account identifier (token)                         |

#### Request

{% 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 %}

#### **Response**

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

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

{% endtab %}
{% endtabs %}

#### Errors

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

```json
{
  "success": false,
  "code": 10,
  "message": "Invalid API key"
}
```

{% endtab %}
{% endtabs %}

**Error Codes**

| Response Code | Message                    |
| ------------- | -------------------------- |
| 1             | Token is required          |
| 10            | API key is required        |
| 404           | Sub-account does not exist |


---

# 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/sub-accounts/delete-sub-account.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.
