# Get Contact List

## URL

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

#### **Parameters**

| Name      | Value                                                  |
| --------- | ------------------------------------------------------ |
| `apiKey`  | [Your API key](https://my.smspartner.fr/dashboard/api) |
| `groupId` | The ID of the contact group                            |

#### Request

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

```
{
  "curlCommand": {
    "location": true,
    "request": "GET",
    "url": "https://api.smspartner.fr/v1/group/list?apiKey=YOUR_API_KEY&groupId=group_id"
  }
}
```

{% endtab %}
{% endtabs %}

#### **Response**

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

```json
{
  "success": true,
  "code": 200,
  "currentPage": 1,
  "total": "2",
  "datas": [
    {
      "contactId": "ID_CONTACT",
      "phone": "+33XXXXXXXXX",
      "firstname": "Michel",
      "lastname": "Dupont",
      "url": "",
      "shortUrl": "",
      "date": "",
      "custom1": "",
      "custom2": "",
      "custom3": "",
      "custom4": "",
      "createdAt": "2025-03-12T13:49:22+01:00",
      "stopSms": false
    },
    {
      "contactId": "ID_CONTACT",
      "phone": "+33XXXXXXXXX",
      "firstname": "Marie",
      "lastname": "Bertrand",
      "url": "",
      "shortUrl": "",
      "date": "",
      "custom1": "",
      "custom2": "",
      "custom3": "",
      "custom4": "",
      "createdAt": "2025-03-12T14:33:55+01:00",
      "stopSms": false
    }
  ]
}
```

{% endtab %}
{% endtabs %}

#### Errors

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

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

{% endtab %}
{% endtabs %}

**Error Codes**

| Response Code | Message             |
| ------------- | ------------------- |
| 1             | groupId is required |
| 10            | API key is required |
