Get Contact List
The Get Contact List method allows you to obtain complete information on a specific list of contacts, as well as its custom and default variables.
Important!
Minimum one identification (domainId
| domain
| contactListId
) is required.
Request
IMPORTANT: Do not send more than 10 concurrent API requests.
Body Example
{
"domainId": "YOUR_DOMAIN_ID",
"domain": "Default Contact List",
"contactListId":"YOUR_CONTACT_LIST_ID"
}
Parameters
Title | Type | Default | Description |
---|---|---|---|
domainId optional
|
string |
Unique domain ID in Wooxy system. |
|
domain optional
|
string |
The verified domain name from your Wooxy account. |
|
contactListId optional
|
string |
The ID of the Contact List. |
Response
{
"result": true,
"data": {
"contactListName": "Default Contact List",
"contactListId": "YOUR_CONTACT_LIST_ID",
"domainId": "YOUR_DOMAIN_ID",
"domain": "senderDomain.com",
"defaultFromEmail": "notify@senderDomain.com",
"defaultFromName": "notify@senderDomain.com",
"company": "Wooxy",
"replyToEmail": "support@senderDomain.com",
"replyToName": "Support Team",
"smsFromName": "Wooxy",
"isDefault": "1",
"createdAt": "2020-10-02 12:44:03",
"updatedAt": "2020-10-02 12:44:03",
"customVariables": [
{
"name": "companyName",
"type": "string"
}
],
"defaultVariables": [
{
"name": "createdAt",
"type": "datetime"
},
{
"name": "email",
"type": "string"
},
{
"name": "userId",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "active",
"type": "bool"
},
{
"name": "phoneNumber",
"type": "string"
},
{
"name": "emailSubscribe",
"type": "bool"
},
{
"name": "smsSubscribe",
"type": "bool"
},
{
"name": "desktopWebPushSubscribe",
"type": "bool"
},
{
"name": "mobileWebPushSubscribe",
"type": "bool"
},
{
"name": "telegramSubscribe",
"type": "bool"
},
{
"name": "customerSourceId",
"type": "string"
},
{
"name": "sourceName",
"type": "string"
},
{
"name": "sourceId",
"type": "string"
},
{
"name": "avatarLink",
"type": "string"
},
{
"name": "contactBirthday",
"type": "date"
},
{
"name": "contactLanguage",
"type": "string"
},
{
"name": "firstName",
"type": "string"
},
{
"name": "lastName",
"type": "string"
},
{
"name": "contactGender",
"type": "string"
},
{
"name": "contactTimezone",
"type": "string"
},
{
"name": "facebookLink",
"type": "string"
},
{
"name": "instagramLink",
"type": "string"
},
{
"name": "linkedInLink",
"type": "string"
},
{
"name": "twitterLink",
"type": "string"
},
{
"name": "tiktokLink",
"type": "string"
},
{
"name": "contactScore",
"type": "string"
},
{
"name": "cac",
"type": "array"
}
]
},
"errors": []
}
Parameters
Title | Type | Description |
---|---|---|
result |
boolean |
Indicated that the query was successful:
|
data |
object |
An array of fetched information. |
data.contactListName |
string |
Name of the Contact List. |
data.contactListId |
string |
ID of the Contact List. |
data.domainId |
string |
Unique domain ID in Wooxy system. |
data.domain |
string |
Verified domain name from your Wooxy account. |
data.defaultFromEmail |
string |
|
data.defaultFromName |
string |
|
data.company |
string |
The official name of your company including incorporation type used for the footer information. |
data.replyToEmail |
string |
|
data.replyToName |
string |
|
data.smsFromName |
string |
|
data.isDefault |
string |
Indicates that the Contact List is
|
data.createdAt |
string |
Contact List creation time in |
data.updatedAt |
string |
Contact List last updating time in |
data.customVariables |
array |
An array of customer variables from the Contact List. |
data.customVariables.name |
string |
Specific custom variables created from the Contact List. |
data.customVariables.type |
string |
Type of the specific variable fetched from the Contact List. |
data.defaultVariables |
array |
Default system variables from the Contact List. |
data.defaultVariables.name |
string |
Name of system variables:
|
data.defaultVariables.type |
string |
Type of system variables:
|
Method Errors
{
"errors": [
"Error description text"
],
"result": false
}
Error |
---|
“Invalid authorization token!” |
“Internal server error” |
“Bad Request” |
“no matches found for access token {accessToken}” |
“user {id} not enabled” |
“no data found for key {userId}” |
“access token check failed for key/secret $key/$accessToken” |
“Argument {argument} required” |
“Contact lists not found in your domain” |
“Domain not found in your account” |
“Minimum one identification (domainId | domain | contactListId) is required.” |
“Argument ‘domainId’ must be a non-empty string” |
“Argument ‘domain’ must be a non-empty string” |
“Argument ‘contactListId’ must be a non-empty string” |
Code Examples
$accessToken = "YOUR_API_KEY";
$url = 'https://api.wooxy.com/v3/contact-list/get';
$body = json_encode([
"domainId" => "YOUR_DOMAIN_ID",
"domain" => "YOUR_DOMAIN_NAME",
"contactListId" => "YOUR_CONTACT_LIST_ID",
]);
/**
* Request Example
*/
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
//curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_INFILESIZE, null);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Access-Token: $accessToken",
'Content-Type: application/json',
'Content-Length: ' . strlen($body),
]);
$result = curl_exec($ch);
if ($result === false) {
echo 'cURL error:' . curl_error($ch) . PHP_EOL;
} else {
echo strval($result) . PHP_EOL;
}
curl_close($ch);