Clay's HTTP API integration lets you connect any REST API as an enrichment source. You add a column, point it at an endpoint, and Clay calls it for every row in your table. The enriched data lands in new columns alongside your existing records.
This guide walks through connecting Data Legion's Person Enrich API to a Clay table. By the end, you'll have a working enrichment column that takes an email address from your table and returns the full person profile: name, job title, seniority, company, phone, LinkedIn, location, and 50+ other fields. The same approach works for company enrichment with the Company Enrich endpoint.
What You Need
- A Clay account with a table that has an email column
- A Data Legion API key (available from your dashboard)
Step 1: Add an HTTP API Enrichment Column
Open your Clay table and click Add enrichment. Search for "HTTP API" and select it. This adds a new enrichment column that you'll configure in the next steps.
Clay opens a configuration panel on the right side. It defaults to the Generate tab, which uses AI to auto-configure the integration from a natural language description (more on that in the last section). For manual setup, switch to the Configure tab. You'll fill in the endpoint, authentication, request body, and response mapping.
Step 2: Configure the Endpoint
Set the HTTP method to POST and enter the endpoint URL:
https://api.datalegion.ai/person/enrichIf you only need specific fields (recommended for faster responses and cleaner column mapping), add include_fields to the request body (see Step 4). This limits the response to the fields you actually want in your table instead of returning the full profile.
Step 3: Set Up Authentication
In the Headers section, add two headers:
| Header | Value |
|---|---|
Content-Type |
application/json |
API-Key |
Your Data Legion API key |
Paste your API key directly into the value field. Clay stores it securely with the enrichment configuration.
Step 4: Build the Request Body
This is the part that connects your Clay table data to the API request. In the Body section, select JSON and enter:
{
"email": "/Email"
}The /Email reference pulls the value from your table's Email column for each row. If your column has a different name (like "Work Email" or "Contact Email"), use that instead: "/Work Email" or "/Contact Email".
String values in the 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. If your table has name and company columns, include them:
{
"email": "/Email",
"first_name": "/First Name",
"last_name": "/Last Name",
"company": "/Company"
}More inputs mean better matching. Email alone gets you a strong match in most cases. Adding name and company helps when the email is a personal address (Gmail, Outlook) rather than a work domain.
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"
}Step 5: Map Response Fields
The API returns a JSON response with this structure:
{
"matches": [
{
"person": {
"full_name": "jane doe",
"job_title": "senior product manager",
"seniority_level": "senior",
"company_name": "tech company",
"company_size": "1001-5000",
"company_industry": "technology, information and internet",
"city": "san francisco",
"state": "california",
"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
}The person object has top-level work_email and mobile_phone fields, which are the easiest to map in Clay. The full response also includes nested emails and phones arrays with multiple entries, confidence scores, and validation status per record if you need them.
In Clay's response configuration, set the field paths to return. Clay uses dot notation, so prefix each field with matches.0.person to extract from the first match. Map the fields you want as new columns:
| Field Path | Column Name |
|---|---|
matches.0.person.full_name |
Full Name |
matches.0.person.job_title |
Job Title |
matches.0.person.seniority_level |
Seniority |
matches.0.person.company_name |
Company |
matches.0.person.company_size |
Company Size |
matches.0.person.company_industry |
Industry |
matches.0.person.city |
City |
matches.0.person.state |
State |
matches.0.person.work_email |
Work Email |
matches.0.person.mobile_phone |
Phone |
matches.0.person.linkedin_url |
LinkedIn URL |
You can map as many or as few fields as you need. The full person schema has 60+ fields including work history, education, social profiles, and confidence scores per field. See the Clay integration docs for a quick-reference version of this setup, or the API documentation for the complete field list.
Step 6: Run the Enrichment
Click Run to enrich a single row and verify the configuration. Check that the mapped columns populate correctly. If the response looks right, run it across your full table.
A few things to watch for.
If a row returns empty columns, the email didn't match any records (the API returns HTTP 404 for no match, and Clay leaves the columns blank). Match rates vary by dataset. Work email domains match at higher rates than personal addresses (Gmail, Yahoo). You can use Clay's conditional runs (under advanced options) to skip rows where the email cell is empty.
The API returns rate limit headers (RateLimit-Remaining, RateLimit-Reset) on every response. Clay has a configurable rate limit setting for HTTP API enrichments (under advanced options). If you're running large tables (10,000+ rows), set the rate to stay within your API plan limits or break them into batches.
Each match also includes a match_metadata.match_confidence field that tells you how strong the overall match is. You can use Clay's conditional logic to filter out low-confidence results or flag them for review.
Enriching with Company Data
The same setup works for company enrichment. Use the Company Enrich endpoint instead:
https://api.datalegion.ai/company/enrichThe 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"
}The response returns firmographic data: employee count, industry, growth trends, workforce distributions, and more. Use the matches.0.company prefix for your field paths (e.g., matches.0.company.legion_employee_count) and map the fields you need.
You can run both 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). This gives you the full picture at both the contact and account level.
Using Clay's AI Setup
Clay's Sculptor feature can configure HTTP API integrations from a natural language description. Instead of filling in the fields manually, you can describe what you want:
"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."
Sculptor generates the endpoint configuration, headers, body, and response mapping. Review the output before running to make sure the column references and response paths are correct.
Building It Into Your Pipeline
Clay is the fastest way to test an enrichment API against your existing data without writing code. Once you've validated the data quality and match rates, you may want to build enrichment directly into your systems for real-time use. Building a Real-Time Enrichment Pipeline with a Person API covers the full technical implementation with webhook handlers, retry logic, caching, and batch backfills.