title: | How we built an API for Clay |
---|---|
description: | Enriching users to find ideal customers |
pubDate: | 2025-08-12T00:00:00.000Z |
author: | Charmaine Lee |
This post is for our fellow engineers & founders doing GTM / sales.
I used to think doing enrichment was for big companies with massive outbound sales functions.
Before launching Val Town for Teams (coming this week!), we set a goal: find 10 pre‑sales customers. All of a sudden, I was spending all my time looking for teams who could be the right fit.
Our best channel was obviously new users signing up for Val Town. However, scrolling through emails and hoping we recognize someone quickly became unsustainable. (And really it only works for celebrities anyways.)
Clearbit used to be the obvious answer, but post‑HubSpot acquisition, it's no longer an option for small new customers.
Clay is great, but we wanted to use it like an API so anyone on our team could use it programatically, without Clay knowledge or set-up.
We asked on X, the CEO explained how we could do it.
You can pass in data via a webhook and pass it to any system after that
— Kareem Amin (@kareemamin) May 1, 2025
We turned Clay into an API / SDK on Val Town via our Clay API Proxy.
The hard part was that Clay enrichments are triggered by one webhook, but you get the results from another webhook. We wanted the developer experience to be a single request that gets back the enriched data as the response.
Here's how we built it:
clay()
"sdk" function with an email or
GitHub usernameEnriching emails with Clay is now as simple as:
import { clay } from "https://esm.town/v/charmaine/clay-proxy/sdk.ts";
const result = await clay({
email: "steve@val.town",
source: "user_signup",
});
console.log(result);
Which returns:
{ "email": "steve@val.town", "person": "Steve Krouse", "linkedin": "https://www.linkedin.com/in/stevekrouse", "company": "Val Town", "funding": "Seed round", "totalFunding": "$7 million", "employeeCount": "6" }
User enrichment is a big part of how we successfully found our first 10 pre-sales customers.
Our users are no longer a long list of anonymous emails. We are able to more efficiently spend our time interacting with our ICP (Ideal Customer Profile) as soon as they sign up, instead of combing through endless dashboards in search of a unicorn.
Once you have this data on Val Town, there's lots you can do.
Here are some templates:
We've been loving these experiments, and would love to help more engineers scale the traditional GTM function.
Clay credits aren't free, so we can't let just anyone use our proxy. We've allowlisted a couple of friends who we know are good for it, and can bill them later. If you wanted to get started, shoot me an email at charmaine@val.town and I'll personally help you get set up.
We also have a self-hosted alternative, if you'd like to create an API for your own Clay account.