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:Headers
| Header | Value |
|---|---|
Content-Type | application/json |
API-Key | Your Data Legion API key |
Request Body
Select JSON format and enter:/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.
include_fields to the body:
Response Mapping
The API returns a JSON response:matches.0.person prefix:
| 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 |
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:include_fields to limit the response:
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.
Related
- How to Enrich Clay Tables with Data Legion (blog guide with extended walkthrough)
- Person Enrichment API
- Company Enrichment API
- MCP Server for AI assistant integrations
- Clay HTTP API documentation