Kontakte hinzufügen

Mit dieser Methode können Sie Kontakte zu einer Liste hinzufügen.

POST

/list

Body-Parameter

value
notwendig
Kontaktnummer
listId
notwendig
ID der Liste
info1 Information 1
info2 Information 2
info3 Information 3
info4 Information 4

Beispiele


POST /list HTTP/1.1
Host: api.smsup.ch
Authorization: Bearer your.token
Accept: application/json

{
  "list": {
    "listId": "5a0331bffc5886074551ce97",
    "contacts": {
      "gsm": [
        {
          "value": "41781234567",
          "info1": "Hiroo",
          "info2": "Onoda"
        },
        {
          "value": "41781234566",
          "info1": "Grace",
          "info2": "Hopper"
        },
        {
          "value": "41781234565",
          "info1": "Hedy",
          "info2": "Lamarr",
          "info3": "Extase",
          "info4": "1933"
        }
      ]
    }
  }
}
          
        

POST /list HTTP/1.1
Host: api.smsup.ch
Authorization: Bearer your.token
Accept: application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<list>
  <listId>50433</listId>
  <contacts>
    <gsm info1="Hiroo" info2="Onoda">41781234567</gsm>
    <gsm info1="Grace" info2="Hopper">41781234566</gsm>
    <gsm info1="Hedy" info2="Lamarr" info3="Extase" info4="1933">41781234565</gsm>
  </contacts>
</list>
        
      

Ergebnisformat


{
  "status": 1,
  "message": "OK",
  "contacts": 3,
  "invalid": 0,
  "duplicates": 0,
  "id": "50433"
}
          
        

<?xml version="1.0" encoding="UTF-8" ?>
<response>
  <status>1</status>
  <message>OK</message>
  <contacts>3</contacts>
  <invalid>0</invalid>
  <duplicates>0</duplicates>
  <id>50433</id>
</response>