Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

Description

Add contacts to group specified. Accepts GET or POST requests.

URL

https://melotext.com/apis/addcontact/

Example Call: https://melotext.com/apis/addcontact/?apikey=APIKEY&group=GROUPNAME&number=PHONENUMBER&name=NAME&email=EMAIL&bday=BDAY

PHP Code Sample (cURL):

$url = 'https://melotext.com/apis/addcontact/';
$fields = array('apikey' => $api_key,
'group' => $group_name,
'number' => $number,
'name' => $name,
'email' => $email,
'bday' => $bday,
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
$result = curl_exec($ch);
return $result;

Parameters

Parameters

Required

Description

apikey

Required

The API key of your account

group

Required

The name of the group yo uare associating this contact to. Must be a valid group name that already exists in the system.

number

Required

The number of the contact. NO spaces, dashes, or parentheses in phone numbers.
Include country code in the number

name

Optional

The name of the contact.

email

Optional

The email address of the contact.

bday

Optional

The birthday of the contact. Format: YYYY-MM-DD

  • No labels