# Add Group

## URL

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

#### **Required Parameters**

<table data-full-width="false"><thead><tr><th width="180">Name</th><th>Value</th></tr></thead><tbody><tr><td><code>apiKey</code></td><td><a href="https://my.smspartner.fr/dashboard/api">Your API key</a></td></tr><tr><td><code>name</code></td><td>Name of the group</td></tr></tbody></table>

#### Request

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

```
curl --location --request POST 'http://api.smspartner.fr/v1/group/add' \--header 'Content-Type: application/json' \--data-raw '{   "apiKey": "YOUR_API_KEY",
   "name": "Nom du groupe"}'
```

{% endtab %}
{% endtabs %}

#### **Response**

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

```json
{
  "success": true,
  "code": 2,
  "name": "Group Name",
  "groupId": "GROUP_ID"
}
```

{% endtab %}
{% endtabs %}

#### Errors

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

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

{% endtab %}
{% endtabs %}

**Error Codes**

| Response Code | Message            |
| ------------- | ------------------ |
| 1             | `name` is required |
| 10            | Invalid API key    |


---

# 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/contact-management/add-group.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.
