Enrich Company
OK
Not found
curl -s 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/companies/acme.com?include=stats' \ -H 'Authorization: Bearer <SERVICE_ROLE_KEY>'
Paste-ready request bodies for Clay’s “Send to Webhook” action. Every scenario uses the same envelope — { provider, payload, external_id? } — and the same headers. Pick a scenario from the rail, copy the body, paste into Clay’s HTTP Request Body field, adjust the column mappings.
Per-row webhook fired from Clay's Companies table. The upsert is idempotent on payload.domain — use the same endpoint for find-companies output and re-enrichment runs.
Authorization: Bearer <SUPABASE_SERVICE_ROLE_KEY> Content-Type: application/json
sb_secret_* from Supabase Dashboard → Settings → API. The legacy service_role JWT still works but is on the deprecation path.{
"provider": "clay",
"payload": {
"domain": "{{column: domain}}",
"name": "{{column: name}}",
"website": "{{column: website}}",
"linkedin_url": "{{column: linkedin_url}}",
"industry": "{{column: industry}}",
"employee_count": "{{column: employee_count}}",
"country": "{{column: country}}",
"description": "{{column: description}}"
},
"external_id": "{{column: clay_row_id}}"
}{{column: name}} syntax is Clay’s mapping shorthand — replace with your actual column names. The full canonical field list lives in the API reference below.Every adapter (clay, firmable, icypeas, prospeo, manual) receives the raw payload and is responsible for normalising it into the canonical row shape before the upsert.
This keeps Clay’s output untouched (no fragile field renaming in Clay’s webhook builder), lets the adapter handle shape changes server-side (one deploy fixes all clients), and gives every raw payload a permanent audit row in raw_records.
9 endpoints · 4 schemas · service-role auth required
OK
Not found
curl -s 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/companies/acme.com?include=stats' \ -H 'Authorization: Bearer <SERVICE_ROLE_KEY>'
OK
curl -s 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/companies/acme.com/contacts?title=ilike.*CFO*&limit=50' \ -H 'Authorization: Bearer <SERVICE_ROLE_KEY>'
Ingest a single company row. The standard body is `{ provider, payload, external_id? }`: `provider` selects which adapter normalizes `payload` before the canonical upsert. For the Resora Firmable-list-to-Clay-enrichment flow, Clay sends one HTTP request per row with `{ provider: "firmable", firmable_company_id, enriched_company }`. The retained `firmable_company_id` becomes the canonical `firmable_id` lookup, and the first object in `enriched_company` supplies the enriched company fields. `enriched_company` may be Clay's object value or a one-item array. Idempotent on `firmable_id` when present, otherwise `domain` or LinkedIn URL. Re-POSTing the same lookup key updates the existing row, bumps `enriched_at` (clay only), and appends to `sources[]` without duplicating.
{
"provider": "firmable",
"firmable_company_id": "f000000517970",
"enriched_company": [
{
"url": "https://www.linkedin.com/company/igniteco",
"name": "Ignite",
"slug": "igniteco",
"domain": "igniteco.com",
"website": "https://igniteco.com/",
"industry": "Staffing and Recruiting",
"country": "AU",
"employee_count": 233
}
]
}Canonical company row
Adapter rejected or skipped the payload
curl -s -X POST 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/companies' \
-H 'Authorization: Bearer <SERVICE_ROLE_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"provider": "firmable",
"firmable_company_id": "f000000517970",
"enriched_company": [{
"url": "https://www.linkedin.com/company/igniteco",
"name": "Ignite",
"slug": "igniteco",
"domain": "igniteco.com",
"website": "https://igniteco.com/",
"industry": "Staffing and Recruiting",
"country": "AU"
}]
}'OK
Not found
curl -s 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/contacts/jdoe?include=company' \ -H 'Authorization: Bearer <SERVICE_ROLE_KEY>'
Ingest a single contact row. The standard body is `{ provider, payload, external_id? }`: `provider` selects which adapter normalizes `payload` before the canonical upsert. For the Resora Firmable-list-to-Clay-person-enrichment flow, Clay sends one HTTP request per row with `{ provider: "firmable", id, firmable_company_id, linkedin_company_url, domain, job_title, linkedin_profile, enrich_person }`. The retained contact `id` becomes `contacts.firmable_id`, `firmable_company_id` resolves the internal `primary_company_id`, and `enrich_person` supplies the enriched person fields. Idempotent on `firmable_id` when present, otherwise LinkedIn URL or slug. If a new Firmable id conflicts with a LinkedIn lookup already owned by another Firmable id, the write fails instead of rewriting the existing row.
{
"provider": "firmable",
"id": "fp000123456789",
"firmable_company_id": "f000000517970",
"linkedin_company_url": "https://www.linkedin.com/company/labour-solutions-australia",
"domain": "laboursolutions.com.au",
"job_title": "WA Regional Director",
"linkedin_profile": "https://www.linkedin.com/in/karl-stockman-85134761",
"enrich_person": {
"org": "Labour Solutions Australia",
"url": "https://www.linkedin.com/in/karl-stockman-85134761",
"name": "Karl Stockman",
"slug": "karl-stockman-85134761",
"title": "WA Regional Director",
"country": "Australia",
"headline": "Manager at Labour Solutions Australia",
"first_name": "Karl",
"last_name": "Stockman",
"profile_id": 218819581,
"connections": 94,
"num_followers": 96,
"jobs_count": 1,
"location_name": "Greater Perth Area, Australia",
"latest_experience": {
"url": "https://www.linkedin.com/company/labour-solutions-australia",
"title": "WA Regional Director",
"company": "Labour Solutions Australia",
"company_domain": "laboursolutions.com.au",
"is_current": true
}
}
}Canonical contact row
Adapter rejected or skipped the payload
curl -s -X POST 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/contacts' \
-H 'Authorization: Bearer <SERVICE_ROLE_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"provider": "firmable",
"id": "fp000123456789",
"firmable_company_id": "f000000517970",
"linkedin_company_url": "https://www.linkedin.com/company/labour-solutions-australia",
"domain": "laboursolutions.com.au",
"job_title": "WA Regional Director",
"linkedin_profile": "https://www.linkedin.com/in/karl-stockman-85134761",
"enrich_person": {
"org": "Labour Solutions Australia",
"url": "https://www.linkedin.com/in/karl-stockman-85134761",
"name": "Karl Stockman",
"title": "WA Regional Director"
}
}'Queued or processed
Sync-mode adapter failure
curl -s -X POST 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/ingest' \
-H 'Authorization: Bearer <SERVICE_ROLE_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"provider": "clay",
"kind": "company",
"payload": {"name": "Acme", "website": "https://acme.com"},
"external_id": "clay-acme-001",
"sync": false
}'Marks untouched Firmable-backed companies as pending for contact search when they have zero linked canonical contacts. This does not call Firmable. It only prepares work for the throttled worker.
Queue count
curl -s -X POST 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/firmable-find-contacts/enqueue' \
-H 'Authorization: Bearer <SERVICE_ROLE_KEY>' \
-H 'Content-Type: application/json' \
-d '{"limit":500}'Claims pending companies one at a time, calls Firmable People Search with only `{ companyId, selectedCountry: "AU" }`, and spreads 15-20 requests randomly across roughly one minute. A rolling 60-second guard prevents more than 20 Firmable search starts even if the worker overlaps with a manual invocation. Results are stored in `firmable_contact_search_runs` and `firmable_contact_candidates`. Candidate rows are for Clay enrichment; canonical `contacts` rows are created only when Clay posts enriched people back to `POST /contacts`.
Worker summary
curl -s -X POST 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/firmable-find-contacts/process' \
-H 'Authorization: Bearer <SERVICE_ROLE_KEY>' \
-H 'Content-Type: application/json' \
-d '{"min_requests":15,"max_requests":20}'OK
curl -s 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/admin/failed-raws?limit=100&offset=0' \ -H 'Authorization: Bearer <SERVICE_ROLE_KEY>'