# Contact lists

# Create contact list

# Description

You can use this API to create contact list.

# Endpoint

    POST https://019sms.co.il/api
  

# Parameters

Name Type Description Required
newCL object Contains all other elements. ✔️
user object Contains the user element. ✔️
username string The username of the account by which you are recognized in the system ✔️
cl object Contains the Details of the contact list that you want to create ✔️
destinations object Contains all the numbers have been added to a contact list ✔️
destination object contains the details for any phone number. ✔️
phone int must be formatted: 5xxxxxxx or 05xxxxxxx. ✔️
df1/ df2/ df3/ df4/ df5/ df6 string contains a dynamic field for all listed phone number

# Request Example

json
Copy code
    {
  "newCL": {
    "user": {
      "username": "xxxxxx"
    },
    "cl": [
      {
        "name": "name1",
        "destinations": {
          "destination": [
            {
              "phone": "55XXXXXXX",
              "df1": "Israel",
              "df2": "Israeli",
              "df3": "Haifa"
            },
            {"phone": "55XXXXXXX"}
          ]
        }
      },
      {
        "name": "name2",
        "destinations": {
          "destination": [
            {"phone": "55XXXXXXX"},
            {"phone": "55XXXXXXX"}
          ]
        }
      }
    ]
  }
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<newCL>
    <user>
        <username> xxxxxx </username>
    </user>
    <cl>
        <name>name1</name>
        <destinations>
            <destination>
                <phone>055XXXXXXX</phone>
                <df1>Israel</df1>
                <df2>Israeli</df2>
                <df3>Haifa</df3>
            </destination>
            <destination>
                <phone>55XXXXXXX</phone>
            </destination>
        </destinations>
    </cl>
    <cl>
        <name>name2</name>
        <destinations>
            <destination>
                <phone>055XXXXXXX</phone>
            </destination>
            <destination>
                <phone>55XXXXXXX</phone>
            </destination>
        </destinations>
    </cl>
</newCL>

  

# Response Example

json
Copy code
    {
  "status": 0,
  "message": "conact list successfully created",
  "errors": ["The phone is too long or too short or contain characters and therefore not added"],
    "identifiers": "17419"
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<newCL>
    <status>0</status>
    <message>conact list successfully created</message>
    <errors>
        <error>The phone is too long or too short or contain characters
            and therefore not added</error>
    </errors>
    <identifiers>
        <identifier>17419</identifier>
    </identifiers>
</newCL>

  

Note

Full description of the response status and message can be found in here:

# Remove contact list

# Description

You can use this API to remove contact lists.

# Endpoint

    POST https://019sms.co.il/api
  

# Parameters

Name Type Description Required
removeCL object Contains all other elements. ✔️
user object Contains the user element. ✔️
username string The username of the account by which you are recognized in the system ✔️
cl object Contains identifiers you want to remove. ✔️
id string Contains an id of contact list you want to remove. ✔️

# Request Example

json
Copy code
    {
  "removeCL": {
    "user": {
      "username": "xxxxxx"
    },
    "cl": {
      "id": ["21518","21500"]
    }
  }
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<removeCL>
    <user>
        <username>xxxxxx</username>
    </user>
    <cl>
        <id>21518</id>
        <id>21500</id>
    </cl>
</removeCL>

  

# Response Example

json
Copy code
    {
  "status": 0,
  "message": "conact lists successfully removed",
  "errors": ["contact list id: 21500 does not exist and therefore not removed"]
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<removeCL>
    <status>0</status>
    <message>contact list successfully removed</message>
    <errors>
        <error>contact list id: 21500 does not exist and therefore not removed</error>
    </errors>
</removeCL>

  

Note

Full description of the response status and message can be found in here:

# Add a number to existing contact list

# Description

You can use this API to add numbers to an existing contact list.

# Endpoint

    POST https://019sms.co.il/api
  

# Parameters

Name Type Description Required
addNumCL object Contains all other elements. ✔️
user object Contains the user element. ✔️
username string The username of the account by which you are recognized in the system ✔️
cl object Contains the details of the contact list that you want to update. ✔️
id int Contains the id of the contact list you want to update. ✔️
destinations object Contains all the numbers you want to add to this contact list ✔️
destination object contains the details for the phone number. ✔️
phone int must be formatted: 5xxxxxxx or 05xxxxxxx ✔️
df1/ df2/ df3/ df4/ df5/ df6 string contains a dynamic field for this phone number in this contact list

# Request Example

json
Copy code
    {
  "addNumCL": {
    "user": {
      "username": "xxxxxx"
    },
    "cl": [
      {
        "id": "21518",
        "destinations": {
          "destination": [
            {
              "phone": "055XXXXXXX",
              "df1": "Israel",
              "df2": "Israeli",
              "df3": "Haifa"
            },
            {
              "phone": "055XXXXXXX"
            }
          ]
        }
      },
      {
        "id": "21500",
        "destinations": {
          "destination": [
            {"phone": "055XXXXXXX"},
            {"phone": "055XXXXXXX"}
          ]
        }
      }
    ]
  }
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<addNumCL>
    <user>
        <username>xxxxxx</username>
    </user>
    <cl>
        <id>21518</id>
        <destinations>
            <destination>
                <phone>055XXXXXXX</phone>
                <df1>Israel</df1>
                <df2>Israeli</df2>
                <df3>Haifa</df3>
            </destination>
            <destination>
                <phone>55XXXXXXX</phone>
            </destination>
        </destinations>
    </cl>
    <cl>
        <id>21500</id>
        <destinations>
            <destination>
                <phone>055XXXXXXX</phone>
            </destination>
            <destination>
                <phone>55XXXXXXX</phone>
            </destination>
        </destinations>
    </cl>
</addNumCL>

  

# Response Example

json
Copy code
    {
  "status": 0,
  "message": "The phone numbers have been added successfully",
  "errors": [
    "The phone 05XXXXXXXX is already on the contact list and therefore not added",
    "The phone 55XXXXXXX is already on the contact list and therefore not added"
  ]
}

  
xml
Copy code
    <?xml version="1.0" encoding="utf-8"?>
<sms>
    <status>0</status>
    <message>The phone numbers have been added successfully</message>
    <errors>
        <error>The phone 055XXXXXXX is already on the contact list and therefore not added</error>
        <error>The phone 55XXXXXXX is already on the contact list and therefore not added</error>
    </errors>
</sms>

  

Note

Full description of the response status and message can be found in here:

# Remove a number from an existing contact lists

# Description

You can use this API to remove numbers from an existing contact list.

# Endpoint

    POST https://019sms.co.il/api
  

# Parameters

Name Type Description Required
rmNumCL object Contains all other elements. ✔️
user object Contains the user element. ✔️
username string The username of the account by which you are recognized in the system ✔️
cl object Contains the details of the contact list that you want to update. ✔️
id int Contains the id of the contact list you want to update. ✔️
destination object Contains all the numbers want to remove from the contact list. ✔️
phone int must be formatted: 5xxxxxxx or 05xxxxxxx ✔️

# Request Example

json
Copy code
    {
  "rmNumCL": {
    "user": {
      "username": "xxxxxx"
    },
    "cl": [
      {
        "id": "21518",
        "destinations": {
          "phone": "055XXXXXXX"
        }
      },
      {
        "id": "21500",
        "destinations": {
          "phone": ["055XXXXXXX", "055XXXXXXX"]
        }
      }
    ]
  }
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<rmNumCL>
    <user>
        <username>xxxxxx</username>
    </user>
    <cl>
        <id>21518</id>
        <destinations>
            <phone>055XXXXXXX</phone>
        </destinations>
    </cl>
    <cl>
        <id>21500</id>
        <destinations>
            <phone>055XXXXXXX</phone>
            <phone>55XXXXXXX</phone>
        </destinations>
    </cl>
</rmNumCL>

  

# Response Example

json
Copy code
    {
  "status": 0,
  "message": "Successfully deleted phone numbers",
  "errors": [
    "contact list id: 21500 does not exist and therefore not removed"
  ]
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<rmNumCL>
    <status>0</status>
    <message>Successfully deleted phone numbers</message>
    <errors>
        <error>contact list id: 21500 does not exist and therefore not removed</error
    </errors>
</rmNumCL>

  

Note

Full description of the response status and message can be found in here:

# Get all contact lists

# Description

You can use this API to get the contact lists (include empty contact lists).

# Endpoint

    POST https://019sms.co.il/api
  

# Parameters

Name Type Description Required
getCL object Contains all other elements. ✔️
user object Contains the user element. ✔️
username string The username of the account by which you are recognized in the system ✔️

# Request Example

json
Copy code
    {
  "getCL": {
    "user": {
      "username": "xxxxxx"
    }
  }
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<getCL>
    <user>
        <username> xxxxxx </username>
    </user>
</getCL>

  

# Response Example

json
Copy code
    {
  "status": 0,
  "message": "",
  "contact_lists": [
    {
      "cl_id": "21518",
      "phone": "55XXXXXXX",
      "name": "name1"
    },
    {
      "cl_id": "21518",
      "phone": "555XXXXXX",
      "name": "name1"
    },
    {
      "cl_id": "21500",
      "phone": "555XXXXXX",
      "name": "name2"
    }
  ]
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<getCL>
    <status>0</status>
    <message></message>
    <contact_lists>
        <contact_list>
            <cl_id>21518</cl_id>
            <phone>55XXXXXXX</phone>
            <name>name1</name>
        </contact_list>
        <contact_list>
            <cl_id>21518</cl_id>
            <phone>555XXXXXX</phone>
            <name>name1</name>
        </contact_list>
        <contact_list>
            <cl_id>21500</cl_id>
            <phone>055XXXXXXX</phone>
            <name>name2</name>
        </contact_list>
    </contact_lists>
</getCL>

  

Note

Full description of the response status and message can be found in here:

# Get contact lists by ID

# Description

You can use this API to get contact lists by ID.

# Endpoint

    POST https://019sms.co.il/api
  

# Parameters

Name Type Description Required
getCLbyID object Contains all other elements. ✔️
user object Contains the user element. ✔️
username string The username of the account by which you are recognized in the system ✔️
cl object Contains contact list elements ✔️
id int Contains the id of the contact list you want to get. ✔️

# Request Example

json
Copy code
    {
  "getCLbyID": {
    "user": {
      "username": "xxxxxx"
    },
    "cl": {
      "id": "1234"
    }
  }
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<getCLbyID>
    <user>
        <username> xxxxxx </username>
    </user>
    <cl>
        <id>xxxxx</id>
    </cl>
</getCLbyID>

  

# Response Example

json
Copy code
    {
  "status": 0,
  "message": "",
  "contact_lists": [
    {
      "cl_id": "21518",
      "phone": "55XXXXXXX",
      "name": "name1"
    },
    {
      "cl_id": "21518",
      "phone": "555XXXXXX",
      "name": "name1"
    },
    {
      "cl_id": "21500",
      "phone": "555XXXXXX",
      "name": "name2"
    }
  ]
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<getCLbyID>
    <status>0</status>
    <message></message>
    <contact_lists>
        <contact_list>
            <phone>55XXXXXXX</phone>
            <name>name1</name>
        </contact_list>
        <contact_list>
            <phone>555XXXXXX</phone>
            <name>name1</name>
        </contact_list>
        <contact_list>
            <phone>055XXXXXXX</phone>
            <name>name2</name>
        </contact_list>
    </contact_lists>
</getCLbyID>

  

Note

Full description of the response status and message can be found in here:

Last Updated: 8/23/2023, 11:39:26 AM