GTM Atelier  //  Resora  //  Console
v1.0.0·build 2026-05-19Live
Section 01 · Adding data

Adding
data.

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.

01

Endpoint

POSThttps://hcpocrfabfthlvgilymd.supabase.co/functions/v1/companies

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.

02

Headers

Authorization: Bearer <SUPABASE_SERVICE_ROLE_KEY>
Content-Type: application/json
Use the sb_secret_* from Supabase Dashboard → Settings → API. The legacy service_role JWT still works but is on the deprecation path.
03

Request body

{
  "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}}"
}
The {{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.
Note 01
Why the envelope?

The API doesn’t couple itself to one provider’s schema.

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.

Section 03

API Reference.

↓ Reference below
Section 04 · API Reference

Endpoints.

7 endpoints · 3 schemas · service-role auth required

GET/companies/{domain}

Enrich Company

Parameters
NameInRequiredTypeDescription
domainpathrequiredstring
includequeryoptionalenum
Responses
200

OK

application/jsonClayCompany
404

Not found

Code samples
curl -s 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/companies/acme.com?include=stats' \
  -H 'Authorization: Bearer <SERVICE_ROLE_KEY>'
GET/companies/{domain}/contacts

Find Contacts using Company Domain

Parameters
NameInRequiredTypeDescription
domainpathrequiredstring
titlequeryoptionalstringe.g. 'ilike.*CFO*'
limitqueryoptionalinteger
offsetqueryoptionalinteger
Responses
200

OK

application/json
Code samples
curl -s 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/companies/acme.com/contacts?title=ilike.*CFO*&limit=50' \
  -H 'Authorization: Bearer <SERVICE_ROLE_KEY>'
POST/companies

Add Company

Request body
application/jsonrequired
Responses
200

Canonical company row

application/jsonClayCompany
422

Adapter rejected or skipped the payload

Code samples
curl -s -X POST 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/companies' \
  -H 'Authorization: Bearer <SERVICE_ROLE_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "provider": "manual",
    "payload": {"domain": "acme.com", "name": "Acme", "industry": "Software"},
    "external_id": "acme-001"
  }'
GET/contacts/{linkedin_slug}

Enrich Contact

Parameters
NameInRequiredTypeDescription
linkedin_slugpathrequiredstring
includequeryoptionalenum
Responses
200

OK

application/jsonClayContact
404

Not found

Code samples
curl -s 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/contacts/jdoe?include=company' \
  -H 'Authorization: Bearer <SERVICE_ROLE_KEY>'
POST/contacts

Add Contact

Request body
application/jsonrequired
Responses
200

Canonical contact row

application/jsonClayContact
422

Adapter rejected or skipped the payload

Code samples
curl -s -X POST 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/contacts' \
  -H 'Authorization: Bearer <SERVICE_ROLE_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "provider": "manual",
    "payload": {
      "linkedin_url": "https://www.linkedin.com/in/jdoe",
      "name": "Jane Doe",
      "title": "CFO",
      "primary_company_domain": "acme.com"
    },
    "external_id": "jdoe-001"
  }'
POST/ingest

Raw push (batch / async)

Request body
application/jsonIngestBodyrequired
Responses
200

Queued or processed

422

Sync-mode adapter failure

Code samples
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
  }'
GET/admin/failed-raws

List failed raw_records (dead-letter)

Parameters
NameInRequiredTypeDescription
limitqueryoptionalinteger
offsetqueryoptionalinteger
Responses
200

OK

Code samples
curl -s 'https://hcpocrfabfthlvgilymd.supabase.co/functions/v1/admin/failed-raws?limit=100&offset=0' \
  -H 'Authorization: Bearer <SERVICE_ROLE_KEY>'

Schemas.

ClayCompany

NameTypeRequiredDescriptionExample
domainstringrequiredworkforce.com.au
namestringoptional
linkedin_urlstringoptionalNullable.
industrystringoptionalNullable.
employee_countintegeroptionalNullable.
countrystringoptionalNullable.
extrasobjectoptionalOpen shape — provider-specific extras stored as JSONB.

ClayContact

NameTypeRequiredDescriptionExample
linkedin_urlstringrequiredhttps://www.linkedin.com/in/jdoe
linkedin_slugstringoptionalNullable.
namestringrequired
titlestringoptionalNullable.
primary_company_domainstringoptionalNullable.
emailsarray<object>optionalItems: { value, type, source }.
phonesarray<object>optionalItems: { value, type, source }.

IngestBody

NameTypeRequiredDescriptionExample
providerenum<string>requiredValues: clay, manual, firmable, icypeas, prospeo.manual
kindenum<string>requiredValues: company, contact.
payloadobjectrequired
external_idstringoptionalNullable.
fetched_atstring<date-time>optionalNullable.
syncbooleanoptionalDefault: false.