Add Contact

This request is used to create a contact within a group

URL

POST https://api.smspartner.fr/v1/contact/add

Required Parameters

Name
Value

groupId

The ID of the group to which the contact will be added

phoneNumber

Contact phone number. It must be:

  • In national format (06xxxxxxxx) or international format (+336xxxxxxxx) for French numbers

  • In international format (+496xxxxxxxx) for numbers outside France

Optional Parameters

Name
Value

firstname

First name (max 32 characters)

lastname

Last name (max 32 characters)

date

Date in YYYY-MM-DD format. Can be used for automatic sending (e.g., birthday)

url

URL, must start with http:// or https://

custom1

Custom field 1

custom2

Custom field 2

custom3

Custom field 3

custom4

Custom field 4

Request

{
  "curl_command": {
    "method": "POST",
    "url": "http://api.smspartner.fr/v1/contact/add",
    "headers": {
      "Content-Type": "application/json"
    },
    "data": {
      "apiKey": "YOUR_API_KEY",
      "groupId": "ID GROUP",
      "contact": {
        "phoneNumber": "xxxxxxxxx",
        "firstname": "prénom",
        "lastname": "nom",
        "date": "YYYY-MM-DD",
        "shortUrlPartnr": "http://",
        "url": "http://",
        "custom1": "custom 1",
        "custom2": "custom 2",
        "custom3": "custom 3",
        "custom4": "custom 4"
      }
    }
  }
}

Réponse

{
  "success": true,
  "code": 200,
  "contact": {
    "phoneNumber": "xxxxxxxx",
    "firstname": "FirstName",
    "lastname": "LastName",
    "date": "YYYY-MM-DD",
    "shortUrlPartnr": "http://",
    "url": "http://",
    "custom1": "custom 1",
    "custom2": "custom 2",
    "custom3": "custom 3",
    "custom4": "custom 4",
    "contactId": "CONTACT_ID"
  }
}

Errors

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

Error Codes

Response Code
Message

1

groupId is required

2

Contact information is required

10

API key is required

15

The phone number already exists in the group

Last updated