News! SmartSender.io becomes Wooxy. Read a post from the CEO Arrow
Wooxy API v.3.0

Get Contact

The Get Contact method allows you to get detailed information about a contact.

IMPORTANT! Minimum one unique user identificator (userId | email | phoneNumber ) is required.

Request

POST
/v3/contact/get

IMPORTANT: Do not send more than 10 concurrent API requests.

Body Example

                                        {
 "contactListId": "YOUR_CONTACT_LIST_ID",
 "email":         "user@example.com",
 "phoneNumber":   "+15555555",
 "userId":        "myUserId"
}
                                    

Parameters

Title Type Default Description

contactListId

required
string

ID of the Contact List where the contact to be fetched belongs.  
The list should be already created in your account on the Lists page:  
https://app.wooxy.com/email-list

email

optional
string

Contact’s email address.

phoneNumber

optional
string

IMPORTANT: should be valid E.164 phone number format.

userId

optional
string

Contact’s unique user ID from your platform to enable management of the contact in the list based on it.

Response

                                        {
    "result":               true,
    "contact": {
        "name":             "John Doe",
        "email":            "user@example.com",
        "phoneNumber":      "+15555555",
        "userId":           "myUserId",
        "active":           true,
        "emailSubscribe":           true,
        "smsSubscribe":             true,
        "desktopWebPushSubscribe":  false,
        "mobileWebPushSubscribe":   false,
        "telegramSubscribe":        false,
        "viberSubscribe":           false,
        "createdAt":        "2021-12-24 13:32:53",
        "updatedAt":        "2021-12-30 11:48:05",
        "avatarLink":       "img.wooxy.com/g/56fff04568.jpg",
        "contactBirthday":  "1990-01-01",
        "contactLanguage":  "en",
        "firstName":        "John",
        "lastName":         "Doe",
        "contactGender":    "0",
        "contactTimezone":  "Europe/Tallinn",
        "facebookLink":     "facebook.com/wooxy.com",
        "instagramLink":    "instagram.com/wooxy",
        "linkedInLink":     "linkedin.com/company/wooxy",
        "twitterLink":      "twitter.com/wooxy",
        "tiktokLink":       "tiktok.com/wooxy",
        "contactScore":     "0",
        "sourceName":       "Google",
        "sourceId":           "Source_ID_from_Wooxy",
        "customerSourceId": "хххххх",
        "variables": [
            {
                "name":      "var1",
                "value":     null
            }
        ],
        "cac": {
            "value":                "0.30000",
            "currency":             "USD"
        }
    },
    "errors": []
}
                                    

Parameters

Title Type Description

result

boolean

The value indicates that the contact was successfully fetched from your Contact List:

  • true: Contact was successfully fetched.

contact

object

An array of contact information.

contact.name

string

The optional display name to use for the recipient.

contact.email

string

Contact’s email address.

contact.phoneNumber

string

IMPORTANT: should be valid E.164 phone number format.

contact.userId

string

Contact’s unique user ID from your platform to enable management of the contact in the list based on it.

contact.active

boolean

Indicates if the contact is enabled Contact List or not:

  • true: Contact enabled. Contact can receive communication from enabled channels;
  • false: Contact disabled. No communications will be sent to this contact.

contact.emailSubscribe

boolean

Indicates if the contact is subscribed to receiving Emails or not:

  • true: Contact is subscribed to Emails;
  • false: Unsubscribe contact from Emails.

contact.smsSubscribe

boolean

Indicates if the contact is subscribed to receiving SMS or not:

  • true: Contact is subscribed to SMS;
  • false: Contact is unsubscribed from SMS.

contact.desktopWebPushSubscribe

boolean

Indicates if the contact is subscribed to receiving Desktop Web Push notifications or not:

  • true: Contact is subscribed to Desktop Web Push notifications;
  • false: Contact is unsubscribed from Desktop Web Push notifications.

contact.mobileWebPushSubscribe

boolean

Indicates if the contact is subscribed to receiving Mobile Web Push notifications or not:

  • true: Contact is subscribed to Mobile Web Push notifications;
  • false: Contact is unsubscribed from Mobile Web Push notifications.

contact.telegramSubscribe

boolean

Indicates if the contact is subscribed to receiving Telegram messages or not:

  • true: Contact is subscribed to Mobile Web Push notifications.
  • false: Contact is unsubscribed from Mobile Web Push notifications.

contact.viberSubscribe

boolean

Indicates if the contact is subscribed to receiving Telegram messages or not:

  • true: Subscribe contact to Viber messages;
  • false: Contact is unsubscribed from Viber messages.

contact.firstName

string

Contact’s first name.

contact.lastName

string

Contact’s last name.

contact.contactBirthday

string

Contact’s birth date in ENUM_DATE (YYYY-MM-DD) format

contact.contactLanguage

string

Contact’s locale in ISO 639-1 format

contact.contactGender

string

Contact’s gender in ISO/IEC 5218 format:

  • 0: Not known;
  • 1: Male;
  • 2:  Female;
  • 9: Not applicable.

contact.contactTimezone

string

Contact’s timezone in ISO 8601 format.

contact.contactScore

string

Contact Score.

contact.avatarLink

string

Link to contact’s avatar image.

contact.facebookLink

string

Link to contact’s Facebook profile.

contact.instagramLink

string

Link to contact’s Instagram profile.

contact.linkedInLink

string

Link to contact’s LinkedIn profile.

contact.twitterLink

string

Link to contact’s Twitter profile.

contact.tiktokLink

string

Link to contact’s TikTok profile.

contact.variables

array

An array of contact variables and their values.

contact.variables.name

string

Variable name in lowerCamelCase format.

contact.variables.value

string

Variable value in 'ENUM_STRING' or 'ENUM_DATE' format correspondingly.

contact.sourceId

string

Contact’s unique source ID from Wooxy platform.

contact.customerSourceId

string

Contact’s unique source ID from your system to synchronize two sides.

contact.cac

object

An object that contains comprehensive data regarding the cost of acquiring customers comprises the value and currency.

contact.cac.value

string

CAC value in 'ENUM_STRING'format correspondingly.

contact.cac.currency

string

(EUR, USD)
IMPORTANT Please use only latin uppercase format. No numbers or other symbols allowed.

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”

“Argument ‘contactListId’ must be a non-empty string”

“Invalid RFC2822 email {email} at email field”

“Argument ’email’ must be a string”

“Argument ‘phoneNumber’ must be a string”

“{phoneNumber} is not a valid E.164 phone number”

“Argument ‘userId’ must be a string”

Code Examples

PHP
                $accessToken = "YOUR_API_KEY";
$url    = 'https://api.wooxy.com/v3/contact/get';

$body = json_encode([
    "contactListId" => "YOUR_CONTACT_LIST_ID",
    "email"         => "user@example.com",
    "phoneNumber"   => "+15555555",
    "userId"        => "myUserId",
]);

/**
* 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);