Skip to main content
Connect Data Legion to Clay using Clay’s HTTP API integration. This adds person and company enrichment as a column in any Clay table.

Prerequisites

  • A Clay account with a table that has an email column (for person enrichment) or a domain column (for company enrichment)
  • A Data Legion API key

Person Enrichment Setup

Add the Enrichment Column

Open your Clay table and click Add enrichment. Search for “HTTP API” and select it. Clay opens a configuration panel. It defaults to the Generate tab (AI-assisted setup). For manual configuration, switch to the Configure tab.

Endpoint

Set the method to POST and enter the URL:
https://api.datalegion.ai/person/enrich
See the Person Enrichment API reference for the full list of available fields.

Headers

HeaderValue
Content-Typeapplication/json
API-KeyYour Data Legion API key

Request Body

Select JSON format and enter:
{
  "email": "/Email"
}
/Email is a Clay column reference. It pulls the value from the Email column for each row. If your column has a different name, use that instead (e.g., "/Work Email").
String values in the request body need quotes around the column reference. Clay replaces the reference with the actual cell value at runtime.
You can add more input fields to improve match accuracy:
{
  "email": "/Email",
  "first_name": "/First Name",
  "last_name": "/Last Name",
  "company": "/Company",
  "birth_date": "/Birth Date"
}
To limit the response to specific fields, add include_fields to the body:
{
  "email": "/Email",
  "include_fields": "full_name,job_title,seniority_level,company_name,company_size,company_industry,work_email,mobile_phone,linkedin_url,city,state"
}
See the Person Enrichment API reference for all supported input fields.

Response Mapping

The API returns a JSON response:
{
  "matches": [
    {
      "person": {
        "full_name": "jane doe",
        "job_title": "senior product manager",
        "seniority_level": "senior",
        "company_name": "tech company",
        "work_email": "jane.doe@techcompany.com",
        "mobile_phone": "+15551234567",
        "linkedin_url": "https://www.linkedin.com/in/janedoe"
      },
      "match_metadata": {
        "matched_on": ["email"],
        "match_type": "exact",
        "match_confidence": "high"
      }
    }
  ],
  "total": 1
}
Clay uses dot notation for field paths. Set each field path to return using the matches.0.person prefix:
Field PathColumn Name
matches.0.person.full_nameFull Name
matches.0.person.job_titleJob Title
matches.0.person.seniority_levelSeniority
matches.0.person.company_nameCompany
matches.0.person.company_sizeCompany Size
matches.0.person.company_industryIndustry
matches.0.person.cityCity
matches.0.person.stateState
matches.0.person.work_emailWork Email
matches.0.person.mobile_phonePhone
matches.0.person.linkedin_urlLinkedIn URL

Run

Click Run to test on a single row. Verify the mapped columns populate correctly, then run across your full table. If the email doesn’t match any records, the API returns HTTP 404 and Clay leaves the enrichment columns empty for that row.
Use Clay’s conditional runs (under advanced options) to skip rows where the email column is empty. This avoids unnecessary API calls on incomplete records.

Company Enrichment Setup

The same process works for company enrichment. Use the Company Enrich endpoint:
https://api.datalegion.ai/company/enrich
The request body takes a domain, name, LinkedIn ID, or ticker symbol. Add include_fields to limit the response:
{
  "domain": "/Company Domain",
  "include_fields": "name,domain,legion_employee_count,industry"
}
Use the matches.0.company prefix for field paths (e.g., matches.0.company.legion_employee_count, matches.0.company.industry). See the Company Enrichment API reference for all supported input and output fields.

Using Both on the Same Table

You can run person and company enrichment on the same table. Add two HTTP API columns: one for person enrichment keyed on email, and one for company enrichment keyed on domain.

AI-Assisted Setup

Clay’s Generate tab can configure the integration from a natural language description. Paste something like:
Use the Data Legion Person Enrich API to look up each person by their email address. The endpoint is https://api.datalegion.ai/person/enrich, it uses POST with an API-Key header, and the request body should include the email field. Return the person’s name, job title, company, seniority level, phone, and LinkedIn URL.
Review the generated configuration before running. Check that column references and field paths are correct.

Rate Limits

The Data Legion API returns rate limit headers on every response (RateLimit-Remaining, RateLimit-Reset). Clay has a configurable rate limit setting under advanced options for HTTP API enrichments. Set the rate to stay within your API plan limits when running large tables. See Rate Limiting for details.