Find Contact List
The Find Contact List method allows you to obtain information on several lists that belong to a domain.
Important! Minimum one identification (domainId | domain | contactListId) is required.
Important! In this method, pagination is used to display information about a large number of lists simultaneously. The offset is considered the starting point, and the limit is the endpoint.
Request
IMPORTANT: Do not send more than 10 concurrent API requests.
Body Example
                                        {
    "domainId":         "YOUR_DOMAIN_ID",
    "domain":           "senderDomain.com",
    "contactListId":    "YOUR_CONTACT_LIST_ID",
    "contactListName":  "Default Contact List",
    "offset":           0,
    "limit":            20
}
                                    
                                Parameters
| Title | Type | Default | Description | 
|---|---|---|---|
| domainId optional | string | Unique domainId that is already registered in Wooxy system. | |
| domain optional | string | Unique DomainName that is already registered in Wooxy system. | |
| contactListId optional | string | ID of the Contact List where the contact to be updated belongs.   | |
| contactListName optional | string | Name of the Contact List.   | |
| offset optional | integer | 0 | Allows you to omit a specified number of rows (number of domains) before the beginning of return rows (events) from the query. The  | 
| limit optional | integer | 20 | Allows you to limit the number of rows (domains) returned from a query. The  | 
Response
                                        {
    "result": true,
    "data": [
    {
        "contactListName":  "Default Contact List",
        "contactListId":    "YOUR_FIRST_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"
            }
        ]
    },
    {
       "contactListId":    "YOUR_SECOND_CONTACT_LIST_ID"
    }
  ],
    "totalCount": 18,
    "offset": 0,
    "limit": 20,
    "errors": []
}
                                    
                                Parameters
| Title | Type | Description | 
|---|---|---|
| result | boolean | Indicated that the query was successful: 
 | 
| data | array | 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.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: 
 | 
| data.totalCount | integer | Total number of fetched Contact Lists. | 
| data.offset | integer | Allows you to omit a specified number of rows (number of templates) before the beginning of return rows (templates) from the query. | 
| data.limit | integer | Allows you to limit the number of rows (Contact Lists) returned from a query. | 
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” | 
| “Parameter ‘limit’ must have a numeric value” | 
| “Parameter ‘offset’ must have a numeric value” | 
| “Argument ‘contactListName’ must be a non-empty string” | 
| “Argument ‘contactListId’ must be a non-empty string” | 
| “Argument ‘domain’ must be a non-empty string” | 
| “Argument ‘domainId’ must be a non-empty string” | 
Code Examples
                $accessToken = "YOUR_API_KEY";
$url    = 'https://api.wooxy.com/v3/contact-list/find';
$body = json_encode([
   "domainId"        => "YOUR_DOMAIN_ID",
   "domain"          => "senderDomain.com",
   "contactListId"   => "YOUR_CONTACT_LIST_ID",
   "contactListName" => "Default Contact List",
   "offset"          => 0,
   "limit"           => 20,
]);
/**
* 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);