Adding Contacts / Assigning Contacts to Groups
Description
When adding new contacts to your Contacts List, or adding existing Contacts to a Contact Group, calls to the API must be made via URL:
http://www.webtext.com/api/add_contact.html
or, to use SSL:
https://www.webtext.com/api/add_contact.html
Mandatory Parameters when adding a contact, or adding an existing contact to a group.
|
api_id |
This is your WebTEXT API id, unique to your WebTEXT account. Issued on request by WebTEXT (support@webtext.com). Note that this is NOT your WebTEXT user name. |
|
api_pwd |
API password, as issued to you by WebTEXT. |
|
contact_num |
The mobile phone number for this contact |
Optional Parameters when adding a contact, or adding an existing contact to a group.
|
contact_name |
This is the name for the new Contact which you are adding. If you do not include this parameter, the value for contact_num will also be used as the Contact Name. |
|
group_alias |
This is an 8-digit numerical value, which can be found adjacent to the group in the WEBTEXT.COM web interface, under CONTACTS - CONTACT GROUPS |
Usage Example
This is a sample GET request, adding 353881234567 to my Contact List.
http://www.webtext.com/api/add_contact.html?api_id=myid&api_pwd=mypwd&contact_num=353881234567
This is a sample GET request, adding 353881234567, with name Joe, to my Contact List.
http://www.webtext.com/api/add_contact.html?api_id=myid&api_pwd=mypwd&contact_num=353881234567&contact_name=Joe
This is a sample GET request, adding 353881234567, to my Contact Group, alias 88812345. Note that, if this number is not already a contact, it will be added to my Contact List, then to the specified group.
http://www.webtext.com/api/add_contact.html?api_id=myid&api_pwd=mypwd&contact_num=353881234567&group_alias=88812345
A successful call to the API, to add a Contact, will return the string: 000
An unsuccessful call will return a 3-digit error code, which can be found in the table 'RETURN CODES', at the end of this document.
