MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include a x-api-key header with the value "your-api-key-here".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Accounts

Profile360

requires authentication

GET https://api2.sonalabs.com/resource/profile360/overview

Use the Profile360 endpoint to enrich data for one person based on their email address. To process multiple profiles in a single request, use the Bulk Profile360 endpoint instead.

Profile360 relies on the information you pass through the endpoint's parameters to identify and enrich the correct user record. The more specific and accurate the email you provide, the more likely Profile360 will return complete and verified profile data. If you submit a general or invalid email, you may still receive a 200 response, but the response data will indicate that no profile was found or enriched.

By default, this endpoint returns publicly available identity and professional details, such as name, job title, and profile photo. Attributes like company information, visitor journey, and ad conversions are only included when available in the connected data sources.

Calling this endpoint consumes credits under your Sona pricing plan.

Example request:
curl --request GET \
    --get "https://api2.sonalabs.com/resource/profile360/overview?email=john.doe%40example.com" \
    --header "x-api-key: your-api-key-here" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api2.sonalabs.com/resource/profile360/overview"
);

const params = {
    "email": "john.doe@example.com",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "x-api-key": "your-api-key-here",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://api2.sonalabs.com/resource/profile360/overview';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-api-key' => 'your-api-key-here',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'email' => 'john.doe@example.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "version": "2.0.0",
    "php": "8.3.19",
    "status": "success",
    "data": {
        "identifier": "richard@piedpiper.com",
        "companyUuid": "pp123456-78ab-4cde-9012-345678901234",
        "companyName": "Pied Piper",
        "visitors": [
            "fd5140c26a86ab16644b695c1a859451",
            "3747a38c5d7412d7baf320e28a611c26"
        ],
        "ips": [
            "24.9.178.35"
        ],
        "journey": [],
        "milestones": [],
        "adConversions": [],
        "fullName": "Richard Hendricks",
        "firstName": "Richard",
        "lastName": "Hendricks",
        "gender": "Male",
        "jobTitle": "CEO & Founder",
        "photoUrl": "https://piedpiper.com/assets/team/richard-hendricks.jpg",
        "createdAt": "2024-03-14T04:56:49",
        "type": "Suggested"
    }
}
 

Example response (404, Error):


{
    "version": "2.0.0",
    "php": "8.3.19",
    "status": "error",
    "data": {
        "message": "Profile not found"
    }
}
 

Request      

GET resource/profile360/overview

Headers

x-api-key      

Example: your-api-key-here

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

email   string   

string The email identifier. Example: john.doe@example.com

Account360

requires authentication

GET https://api2.sonalabs.com/resource/account360/overview

Use the Account360 endpoint to retrieve comprehensive account intelligence for a company based on its domain. This endpoint provides a holistic view of account activity, engagement signals, and firmographic data in a single API call.

Account360 aggregates data across multiple dimensions including visitor activity, intent signals, technology stack, and engagement history. The more interaction data available for a domain in your connected sources, the richer the insights returned. If you query a domain with limited or no tracked activity, you may receive a 200 response with empty arrays for activity-based fields like journey, people, and intent signals.

By default, this endpoint returns account details, buying stage indicators, ICP scoring, and technology information. Fields like website visitors, intent signals, and people are populated based on available tracking data from your connected data sources.

Calling this endpoint consumes credits under your Sona pricing plan.

Example request:
curl --request GET \
    --get "https://api2.sonalabs.com/resource/account360/overview?domain=example.com" \
    --header "x-api-key: your-api-key-here" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api2.sonalabs.com/resource/account360/overview"
);

const params = {
    "domain": "example.com",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "x-api-key": "your-api-key-here",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://api2.sonalabs.com/resource/account360/overview';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-api-key' => 'your-api-key-here',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'domain' => 'example.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "version": "2.0.0",
    "php": "8.3.19",
    "status": "success",
    "data": {
        "details": {
            "name": "Pied Piper",
            "description": "Pied Piper is a revolutionary data compression company that has developed a groundbreaking lossless compression algorithm. Our proprietary technology achieves unprecedented compression ratios while maintaining perfect data integrity.",
            "domain": "piedpiper.com",
            "type": "private",
            "phone": "+1-650-555-0123",
            "uuid": "pp123456-78ab-4cde-9012-345678901234",
            "createdAt": "2014-04-15T10:30:00",
            "employees": 42,
            "employeesRange": "11-50",
            "visitorsCount": 156,
            "identifiedPeople": 23,
            "annualRevenue": 15000000,
            "estimatedAnnualRevenue": "$10M-$50M",
            "foundedYear": 2014,
            "streetAddress": "5230 Newell Road",
            "city": "Palo Alto",
            "postalCode": "94303",
            "state": "California",
            "country": "United States",
            "industry": "Data Compression Technology",
            "subIndustry": "Data Compression Software",
            "linkedin": "company/pied-piper-compression"
        },
        "activity": [],
        "journey": [
            {
                "date": "2024-03-14",
                "dataLayer": null,
                "scrollPercentage": 0,
                "source": "report",
                "duration": null,
                "browser": null,
                "customTimestamp": null,
                "userAgentBrowser": null,
                "userAgentOS": null,
                "iframe": null,
                "event": null,
                "segmentAnonymousId": null,
                "key": null,
                "email": null,
                "eventId": null,
                "identifier": "richard@piedpiper.com",
                "timeSpent": 0,
                "ip": null,
                "isMilestone": true,
                "adblocker": null,
                "params": null,
                "version": null,
                "userId": null,
                "utm": {
                    "channelSubchannel": "With intent signal",
                    "ad": null,
                    "adId": null,
                    "color": null,
                    "campaignId": null,
                    "adgroupId": null,
                    "campaign": null,
                    "term": null,
                    "source": "With intent signal",
                    "medium": null,
                    "content": null,
                    "adgroup": null
                },
                "referrer": null,
                "userAgentModel": null,
                "deviceInformation": null,
                "customIndex": null,
                "phone": null,
                "meta": null,
                "customEvent": null,
                "pageParams": null,
                "userAgentType": null,
                "hitTimestamp": "2024-03-14T05:00:08",
                "name": "With intent signal",
                "ajaxResponse": null,
                "formData": null,
                "attributes": {
                    "Buying Stage": "Purchase"
                },
                "page": null,
                "time": "05:00:08",
                "visitorId": null
            },
            {
                "date": "2024-03-14",
                "dataLayer": null,
                "scrollPercentage": 0,
                "source": "report",
                "duration": null,
                "browser": null,
                "customTimestamp": null,
                "userAgentBrowser": null,
                "userAgentOS": null,
                "iframe": null,
                "event": null,
                "segmentAnonymousId": null,
                "key": null,
                "email": null,
                "eventId": null,
                "identifier": "dinesh@piedpiper.com",
                "timeSpent": 0,
                "ip": null,
                "isMilestone": true,
                "adblocker": null,
                "params": null,
                "version": null,
                "userId": null,
                "utm": {
                    "channelSubchannel": "With intent signal",
                    "ad": null,
                    "adId": null,
                    "color": "#4A6AF2",
                    "campaignId": null,
                    "adgroupId": null,
                    "campaign": null,
                    "term": null,
                    "source": "With intent signal",
                    "medium": null,
                    "content": null,
                    "adgroup": null
                },
                "referrer": null,
                "userAgentModel": null,
                "deviceInformation": null,
                "customIndex": null,
                "phone": null,
                "meta": null,
                "customEvent": null,
                "pageParams": null,
                "userAgentType": null,
                "hitTimestamp": "2024-03-14T05:00:08",
                "name": "With intent signal",
                "ajaxResponse": null,
                "formData": null,
                "attributes": {
                    "Buying Stage": "Purchase"
                },
                "page": null,
                "time": "05:00:08",
                "visitorId": null
            }
        ],
        "people": [],
        "intentSignals": [
            "Visited Website"
        ],
        "intentTrends": [],
        "sessionsDuration": 7,
        "totalActiveTime": 0,
        "buyingStage": "Awareness",
        "lifecycleStage": "",
        "icpScore": 17,
        "websiteVisitors": [],
        "topPages": [],
        "tags": [
            "Data Compression",
            "Technology",
            "Software",
            "Startup",
            "Silicon Valley",
            "Enterprise",
            "Cloud Computing",
            "B2B"
        ],
        "tech": [
            "python",
            "javascript",
            "react",
            "nodejs",
            "mongodb",
            "aws",
            "docker",
            "kubernetes",
            "redis",
            "nginx",
            "google_analytics",
            "stripe",
            "github",
            "slack"
        ],
        "techCategories": [
            "programming_languages",
            "web_frameworks",
            "databases",
            "cloud_computing_services",
            "containerization",
            "web_servers",
            "analytics",
            "payment_processing",
            "version_control",
            "communication",
            "development_tools",
            "data_compression"
        ]
    }
}
 

Example response (404, Error):


{
    "version": "2.0.0",
    "php": "8.3.19",
    "status": "error",
    "data": {
        "message": "Account not found"
    }
}
 

Request      

GET resource/account360/overview

Headers

x-api-key      

Example: your-api-key-here

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

domain   string   

string The domain identifier of the account. Example: example.com

Companies

requires authentication

POST https://api2.sonalabs.com/resource/companies/search

Use the Company Search endpoint to discover and filter companies based on various firmographic criteria. This endpoint allows you to search through thousands of company records using parameters like domain, name, industry, and location to find organizations that match your ideal customer profile.

Company Search supports flexible filtering by combining multiple parameters to narrow down results. You can search by specific domains, company names, industries, or geographic locations. The endpoint returns paginated results with detailed company information including firmographic data, technology stack, social media profiles, and estimated revenue ranges.

The response includes comprehensive company details such as employee count ranges, founding year, headquarters location, industry classifications, and technology categories. Each company record also provides social media URLs, website traffic estimates, and advertising activity indicators when available in the database.

Calling this endpoint consumes credits under your Sona pricing plan.

Example request:
curl --request POST \
    "https://api2.sonalabs.com/resource/companies/search" \
    --header "x-api-key: your-api-key-here" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filters\": [
        {
            \"field\": \"name\",
            \"operator\": \"contains\",
            \"value\": \"Apple\"
        },
        {
            \"field\": \"industry\",
            \"operator\": \"=\",
            \"value\": \"Technology\"
        }
    ]
}"
const url = new URL(
    "https://api2.sonalabs.com/resource/companies/search"
);

const headers = {
    "x-api-key": "your-api-key-here",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filters": [
        {
            "field": "name",
            "operator": "contains",
            "value": "Apple"
        },
        {
            "field": "industry",
            "operator": "=",
            "value": "Technology"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://api2.sonalabs.com/resource/companies/search';
$response = $client->post(
    $url,
    [
        'headers' => [
            'x-api-key' => 'your-api-key-here',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
            $o = [
                clone (($p = &\Symfony\Component\VarExporter\Internal\Registry::$prototypes)['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
                clone $p['stdClass'],
            ],
            null,
            [
                'stdClass' => [
                    'field' => [
                        'name',
                        'industry',
                    ],
                    'operator' => [
                        'contains',
                        '=',
                    ],
                    'value' => [
                        'Apple',
                        'Technology',
                    ],
                ],
            ],
            [
                'filters' => [
                    $o[0],
                    $o[1],
                ],
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "version": "2.0.0",
    "php": "8.3.22",
    "status": "success",
    "data": {
        "list": [
            {
                "website": "piedpiper.com",
                "name": "Pied Piper",
                "founded": 2014,
                "employeesRange": "11-50",
                "locality": "Palo Alto",
                "region": "California",
                "country": "United States",
                "industry": "Data Compression Technology",
                "tech": [
                    "Python",
                    "JavaScript",
                    "React",
                    "Node.js",
                    "MongoDB",
                    "AWS"
                ],
                "techCategories": [
                    "Data Compression",
                    "Cloud Computing",
                    "Software Development",
                    "Information Technology",
                    "Artificial Intelligence",
                    "Machine Learning"
                ],
                "minEstimatedAnnualRevenue": 5000000,
                "maxEstimatedAnnualRevenue": 25000000,
                "subIndustry": "Data Compression Software",
                "lat": 37.4419,
                "lng": -122.143,
                "description": "Pied Piper is a revolutionary data compression company that has developed a groundbreaking lossless compression algorithm. Our proprietary technology achieves unprecedented compression ratios while maintaining perfect data integrity. Founded by Richard Hendricks, we're transforming how the world stores and transmits data, making the internet faster and more efficient for everyone. Our platform serves enterprise clients looking to optimize their data storage costs and improve transfer speeds.",
                "logo": "https://piedpiper.com/assets/logo.png",
                "type": "Private Company",
                "timezone": "America/Los_Angeles",
                "employees": 42,
                "annualRevenue": 15000000,
                "estimatedAnnualRevenue": "$10M-$50M",
                "streetAddress": "5230 Newell Road",
                "city": "Palo Alto",
                "postalCode": "94303",
                "phone": "+1-650-555-0123",
                "state": "California",
                "tags": [
                    "startup",
                    "compression",
                    "technology",
                    "silicon-valley",
                    "b2b"
                ],
                "ips": [
                    "192.168.1.100",
                    "10.0.0.50"
                ],
                "category": "Technology",
                "subCategory": "Data Management",
                "tagline": "Making data smaller, faster, better",
                "specialties": "Lossless data compression, Enterprise data solutions, Cloud storage optimization",
                "ads30days": 15,
                "ads365days": 180,
                "adsYTD": 145,
                "socialHandles": "@piedpipertech",
                "linkedinUrl": "linkedin.com/company/pied-piper-compression",
                "facebookUrl": "facebook.com/piedpipertech",
                "twitterUrl": "twitter.com/piedpipertech",
                "instagramUrl": "instagram.com/piedpipertech",
                "youtubeUrl": "youtube.com/c/piedpipertech",
                "tiktokUrl": "tiktok.com/@piedpipertech",
                "pinterestUrl": "pinterest.com/piedpipertech",
                "githubUrl": "github.com/piedpiper",
                "discordUrl": "discord.gg/piedpiper",
                "telegramUrl": "t.me/piedpipertech",
                "redditUrl": "reddit.com/r/piedpiper",
                "snapchatUrl": "snapchat.com/add/piedpipertech",
                "mediumUrl": "medium.com/@piedpiper",
                "twitchUrl": "twitch.tv/piedpipertech",
                "crunchbaseUrl": "crunchbase.com/organization/pied-piper",
                "g2Url": "g2.com/products/pied-piper",
                "organicKeywords": 2500,
                "organicTraffic": 45000,
                "organicCost": 125000,
                "adwordsKeywords": 150,
                "adwordsTraffic": 8500,
                "adwordsCost": 25000
            }
        ],
        "total": 2321,
        "page": 1,
        "offset": 0
    }
}
 

Example response (400, Error):


{
    "version": "2.0.0",
    "php": "8.3.19",
    "status": "error",
    "data": {
        "message": "Please provide at least one filter."
    }
}
 

Example response (404, Error):


{
    "version": "2.0.0",
    "php": "8.3.19",
    "status": "error",
    "data": {
        "message": "No results found"
    }
}
 

Company Enrichment

requires authentication

GET https://api2.sonalabs.com/resource/company/enrich

Use the Company Enrichment endpoint to enrich data for a single company. To enrich data for multiple companies with a single API call, use the Bulk Company Enrichment endpoint instead.

The API relies on the company domain you provide via the website parameter to identify and retrieve comprehensive company information from the database. Providing an accurate and complete domain ensures the highest match rate and data quality.

By default, this endpoint returns a wide range of company attributes including firmographic data, social media profiles, technology usage, and revenue estimates. The response includes company details such as founding year, employee count, location, industry classification, and estimated annual revenue ranges.

Important: Calling this endpoint consumes credits as part of your pricing plan.

Example request:
curl --request GET \
    --get "https://api2.sonalabs.com/resource/company/enrich?website=ifs.com" \
    --header "x-api-key: your-api-key-here" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api2.sonalabs.com/resource/company/enrich"
);

const params = {
    "website": "ifs.com",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "x-api-key": "your-api-key-here",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://api2.sonalabs.com/resource/company/enrich';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-api-key' => 'your-api-key-here',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'website' => 'ifs.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "version": "2.0.0",
    "php": "8.3.22",
    "status": "success",
    "data": {
        "website": "piedpiper.com",
        "name": "Pied Piper",
        "founded": 2014,
        "employeesRange": "11-50",
        "locality": "Palo Alto",
        "region": "California",
        "country": "United States",
        "industry": "Data Compression Technology",
        "tech": [
            "Python",
            "JavaScript",
            "React",
            "Node.js",
            "MongoDB",
            "AWS"
        ],
        "techCategories": [
            "Data Compression",
            "Cloud Computing",
            "Software Development",
            "Information Technology",
            "Artificial Intelligence",
            "Machine Learning"
        ],
        "minEstimatedAnnualRevenue": 5000000,
        "maxEstimatedAnnualRevenue": 25000000,
        "subIndustry": "Data Compression Software",
        "lat": 37.4419,
        "lng": -122.143,
        "description": "Pied Piper is a revolutionary data compression company that has developed a groundbreaking lossless compression algorithm. Our proprietary technology achieves unprecedented compression ratios while maintaining perfect data integrity. Founded by Richard Hendricks, we're transforming how the world stores and transmits data, making the internet faster and more efficient for everyone. Our platform serves enterprise clients looking to optimize their data storage costs and improve transfer speeds.",
        "logo": "https://piedpiper.com/assets/logo.png",
        "type": "Private Company",
        "timezone": "America/Los_Angeles",
        "employees": 42,
        "annualRevenue": 15000000,
        "estimatedAnnualRevenue": "$10M-$50M",
        "streetAddress": "5230 Newell Road",
        "city": "Palo Alto",
        "postalCode": "94303",
        "phone": "+1-650-555-0123",
        "state": "California",
        "tags": [
            "startup",
            "compression",
            "technology",
            "silicon-valley",
            "b2b"
        ],
        "ips": [
            "192.168.1.100",
            "10.0.0.50"
        ],
        "category": "Technology",
        "subCategory": "Data Management",
        "tagline": "Making data smaller, faster, better",
        "specialties": "Lossless data compression, Enterprise data solutions, Cloud storage optimization",
        "ads30days": 15,
        "ads365days": 180,
        "adsYTD": 145,
        "socialHandles": "@piedpipertech",
        "linkedinUrl": "linkedin.com/company/pied-piper-compression",
        "facebookUrl": "facebook.com/piedpipertech",
        "twitterUrl": "twitter.com/piedpipertech",
        "instagramUrl": "instagram.com/piedpipertech",
        "youtubeUrl": "youtube.com/c/piedpipertech",
        "tiktokUrl": "tiktok.com/@piedpipertech",
        "pinterestUrl": "pinterest.com/piedpipertech",
        "githubUrl": "github.com/piedpiper",
        "discordUrl": "discord.gg/piedpiper",
        "telegramUrl": "t.me/piedpipertech",
        "redditUrl": "reddit.com/r/piedpiper",
        "snapchatUrl": "snapchat.com/add/piedpipertech",
        "mediumUrl": "medium.com/@piedpiper",
        "twitchUrl": "twitch.tv/piedpipertech",
        "crunchbaseUrl": "crunchbase.com/organization/pied-piper",
        "g2Url": "g2.com/products/pied-piper",
        "organicKeywords": 2500,
        "organicTraffic": 45000,
        "organicCost": 125000,
        "adwordsKeywords": 150,
        "adwordsTraffic": 8500,
        "adwordsCost": 25000
    }
}
 

Example response (404, Error):


{
    "version": "2.0.0",
    "php": "8.3.19",
    "status": "error",
    "data": {
        "message": "No results found."
    }
}
 

Request      

GET resource/company/enrich

Headers

x-api-key      

Example: your-api-key-here

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

website   string   

The domain identifier of the company. Example: ifs.com

requires authentication

GET https://api2.sonalabs.com/resource/company/logo

Use the Company Logo endpoint to retrieve the logo image URL for a specific company. This lightweight endpoint is designed for quickly fetching company logos without consuming the full enrichment credits required by the Company Enrichment endpoint.

The API identifies the company based on the domain you provide and returns a direct URL to the company's logo image hosted on our CDN. This endpoint is ideal for populating UI elements, building company directories, or displaying visual brand identifiers in your application.

Important: Calling this endpoint consumes credits as part of your pricing plan, though typically at a lower rate than full company enrichment.

People

People Search

requires authentication

POST https://api2.sonalabs.com/resource/people/search

Use the People Search endpoint to discover professionals working at a specific company. This endpoint allows you to filter and retrieve detailed employee information based on various professional and demographic criteria, making it ideal for building targeted prospecting lists, identifying decision-makers, and enriching your CRM data.

How it works:The API searches for people associated with a company domain you provide via the website parameter. You can further refine results using flexible filters based on job titles, names, locations, skills, and other professional attributes. The endpoint returns paginated results with comprehensive profile information including contact details, social media profiles, and professional history.

Note: Calling this endpoint consumes credits under your Sona pricing plan. Email addresses marked as email_not_unlocked@domain.com require additional credits to unlock full contact information.

Example request:
curl --request POST \
    "https://api2.sonalabs.com/resource/people/by-company" \
    --header "x-api-key: your-api-key-here" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"website\": \"reliancelogisticsgroup.com\",
    \"filters\": [
        {
            \"field\": \"name\",
            \"operator\": \"contains\",
            \"value\": \"Apple\"
        },
        {
            \"field\": \"industry\",
            \"operator\": \"=\",
            \"value\": \"Technology\"
        }
    ]
}"
const url = new URL(
    "https://api2.sonalabs.com/resource/people/by-company"
);

const headers = {
    "x-api-key": "your-api-key-here",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "website": "reliancelogisticsgroup.com",
    "filters": [
        {
            "field": "name",
            "operator": "contains",
            "value": "Apple"
        },
        {
            "field": "industry",
            "operator": "=",
            "value": "Technology"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://api2.sonalabs.com/resource/people/by-company';
$response = $client->post(
    $url,
    [
        'headers' => [
            'x-api-key' => 'your-api-key-here',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
            $o = [
                clone (($p = &\Symfony\Component\VarExporter\Internal\Registry::$prototypes)['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
                clone $p['stdClass'],
            ],
            null,
            [
                'stdClass' => [
                    'field' => [
                        'name',
                        'industry',
                    ],
                    'operator' => [
                        'contains',
                        '=',
                    ],
                    'value' => [
                        'Apple',
                        'Technology',
                    ],
                ],
            ],
            [
                'website' => 'reliancelogisticsgroup.com',
                'filters' => [
                    $o[0],
                    $o[1],
                ],
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "version": "2.0.0",
    "php": "8.3.22",
    "status": "success",
    "data": {
        "list": [
            {
                "createdAt": "2014-04-15T10:30:00",
                "email": "richard@piedpiper.com",
                "firstName": "Richard",
                "lastName": "Hendricks",
                "fullName": "Richard Hendricks",
                "jobTitle": "CEO & Founder",
                "gender": "Male",
                "photoUrl": "https://piedpiper.com/assets/team/richard-hendricks.jpg",
                "birthDate": "1987-03-15",
                "linkedinUrl": "http://www.linkedin.com/in/richard-hendricks-piedpiper",
                "facebookUrl": "facebook.com/richard.hendricks.pp",
                "twitterUrl": "twitter.com/richardhendricks",
                "githubUrl": "github.com/richardhendricks",
                "workEmail": "richard@piedpiper.com",
                "personalEmails": [
                    "richard.hendricks@gmail.com"
                ],
                "phone": "+1-650-555-0101",
                "phoneNumbers": [
                    "+1-650-555-0101",
                    "+1-650-555-0102"
                ],
                "emails": [
                    "richard@piedpiper.com",
                    "richard.hendricks@gmail.com"
                ],
                "timezone": "America/Los_Angeles",
                "city": "Palo Alto",
                "state": "California",
                "country": "United States",
                "continent": "North America",
                "streetAddress": "5230 Newell Road",
                "postalCode": "94303",
                "lat": 37.4419,
                "lng": -122.143,
                "skills": [
                    "Data Compression",
                    "Algorithm Development",
                    "Software Engineering",
                    "Leadership",
                    "Product Management"
                ],
                "socials": [
                    "@richardhendricks",
                    "@piedpipertech"
                ],
                "tags": [
                    "buying committee"
                ]
            },
            {
                "createdAt": "2014-04-15T10:35:00",
                "email": "dinesh@piedpiper.com",
                "firstName": "Dinesh",
                "lastName": "Chugtai",
                "fullName": "Dinesh Chugtai",
                "jobTitle": "Senior Software Engineer",
                "gender": "Male",
                "photoUrl": "https://piedpiper.com/assets/team/dinesh-chugtai.jpg",
                "birthDate": "1988-07-22",
                "linkedinUrl": "http://www.linkedin.com/in/dinesh-chugtai-piedpiper",
                "facebookUrl": "facebook.com/dinesh.chugtai.pp",
                "twitterUrl": "twitter.com/dineshchugtai",
                "githubUrl": "github.com/dineshchugtai",
                "workEmail": "dinesh@piedpiper.com",
                "personalEmails": [
                    "dinesh.chugtai@gmail.com"
                ],
                "phone": "+1-650-555-0201",
                "phoneNumbers": [
                    "+1-650-555-0201"
                ],
                "emails": [
                    "dinesh@piedpiper.com",
                    "dinesh.chugtai@gmail.com"
                ],
                "timezone": "America/Los_Angeles",
                "city": "Palo Alto",
                "state": "California",
                "country": "United States",
                "continent": "North America",
                "streetAddress": "5230 Newell Road",
                "postalCode": "94303",
                "lat": 37.4419,
                "lng": -122.143,
                "skills": [
                    "Java",
                    "Python",
                    "Software Development",
                    "System Architecture",
                    "Database Design"
                ],
                "socials": [
                    "@dineshchugtai",
                    "@piedpipertech"
                ],
                "tags": [
                    "location match"
                ]
            }
        ],
        "total": 2
    }
}
 

Example response (400, Error):


{
    "version": "2.0.0",
    "php": "8.3.22",
    "status": "error",
    "data": {
        "message": "Please provide the company `website`"
    }
}
 

Request      

POST resource/people/by-company

Headers

x-api-key      

Example: your-api-key-here

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

website   string   

The company website to search for people Example: reliancelogisticsgroup.com

filters   object[]   

An array of filter objects. Each filter object contains 3 attributes: field, operator, and value.

field   string   

The field to filter on. Supported fields: Email, First Name, Last Name, Full Name, Tags, Job Title, Gender, Photo Url, Birth Date, Linkedin Url, Facebook Url, Twitter Url, Github Url, Work Email, Personal Emails, Phone, Phone Numbers, Emails, Timezone, City, State, Country, Continent, Street Address, Postal Code, Lat, Lng, Skills, Socials

operator   string   

The filter operator. Supported operators: is not empty, contains, =, >, <, >=, <=, <>, range, in set (exact), in set (phrase), starts with, does not contain, is empty

value   string   

The value to filter by. In the case of is not empty and is empty operators this is not required.