Create list

This method allows you to create a list of contacts. Each contacts can have up to 4 custom informations. Those informations can then be displayed inside each text. For instance, if you insert [info1] in your text, it will automatically be replaced with the associated contact.

POST

/list

Body Parameters

value
required
The recipient's number in E.164 format
name The list name. If no name is provided, the creation date will be the default one
info1 Information 1
info2 Information 2
info3 Information 3
info4 Information 4

Examples

JSON
POST /list HTTP/1.1
Host: api.smsfactor.com
Authorization: Bearer your.token
Accept: application/json

{
  "list": {
    "name": "My list",
    "contacts": {
      "gsm": [
        {
          "value": "33612345678",
          "info1": "Louis",
          "info2": "de Broglie",
          "info3": "1892",
          "info4": "Dieppe"
        },
        {
          "value": "33612345677",
          "info1": "Richard",
          "info2": "Feynman",
          "info3": "1918",
          "info4": "New-York"
        }
      ]
    }
  }
}
        

Result Format

JSON
{
  "status": 1,
  "message": "OK",
  "contacts": 2,
  "invalid": 0,
  "duplicates": 0,
  "id": "5a0331bffc5886074551ce97"     //the id of the created list. It's an ObjectId type (string of 12 chars)
}