Now open. Sign up with a work email and get 250 free credits, no card. Get your free API key →
FOR AGENTSSkip the HTML: this page as .md · llms.txt · openapi.json · MCP mcp.dizo.ai/mcp
Integrations / Workflow & GTM
// rest recipe

Dizo + Close

Enrich new Close leads: a Close webhook subscription calls your function, which asks Dizo for title and phone and updates each contact.

No native app needed. This calls the Dizo REST API at https://api.dizo.ai/v1. Use a dz_test_ key while you build: it returns synthetic data and costs nothing.
Official setup guide

Create a webhook subscription for lead events that points at your function, which calls Dizo.

https://developer.close.com/api/resources/webhooks

Steps

  1. Deploy the function below with DIZO_API_KEY, CLOSE_API_KEY and CLOSE_SIG_KEY as environment variables.
  2. Create a webhook subscription with POST https://api.close.com/api/v1/webhook/ for lead created events, pointing at the function URL.
  3. Copy the signature_key from the response into CLOSE_SIG_KEY so the function can verify every delivery.
  4. Create a test lead with a contact email and check that the title and phone appear on the contact.
curl -X POST https://api.close.com/api/v1/webhook/ \
  -u "$CLOSE_API_KEY:" -H "Content-Type: application/json" \
  -d '{"url": "https://your-host.example/close-enrich",
       "events": [{"object_type": "lead", "action": "created"}]}'
# response includes "signature_key" -> CLOSE_SIG_KEY
import crypto from "node:crypto";
const CLOSE = "https://api.close.com/api/v1";
const closeAuth = "Basic " + Buffer.from(process.env.CLOSE_API_KEY + ":").toString("base64");

export default async function handler(req) {
  const raw = await req.text();
  const sig = crypto.createHmac("sha256", Buffer.from(process.env.CLOSE_SIG_KEY, "hex"))
    .update(req.headers.get("close-sig-timestamp") + raw).digest("hex");
  if (sig !== req.headers.get("close-sig-hash")) return new Response("bad signature", { status: 401 });

  const { event } = JSON.parse(raw);
  const r = await fetch(`${CLOSE}/contact/?lead_id=${event.lead_id}`, { headers: { Authorization: closeAuth } });
  for (const c of (await r.json()).data ?? []) {
    const email = c.emails?.[0]?.email;
    if (!email) continue;
    const res = await fetch("https://api.dizo.ai/v1/people/enrich", {
      method: "POST",
      headers: { Authorization: `Bearer ${process.env.DIZO_API_KEY}`, "Content-Type": "application/json",
                 "Idempotency-Key": `close-${c.id}` },
      body: JSON.stringify({ email, include: ["phone"], max_credits: 12 }),
    });
    if (res.status === 404) continue; // not found, not charged
    const { person } = await res.json();
    const ph = person.phones?.[0];
    const phones = [...(c.phones ?? []).map(({ phone, type }) => ({ phone, type }))];
    if (ph?.number && ph.dnc === false) phones.push({ phone: ph.number, type: "mobile" });
    await fetch(`${CLOSE}/contact/${c.id}/`, {
      method: "PUT", headers: { Authorization: closeAuth, "Content-Type": "application/json" },
      body: JSON.stringify({ title: person.title, phones }),
    });
  }
  return new Response("ok");
}

Notes

Endpoints used

Close and how Dizo plugs into it

Close is a CRM built for teams that sell by phone and email. Leads are the top-level record, each lead holds one or more contacts, and calling, emailing and sequences all happen inside the app. Its REST API at https://api.close.com/api/v1 uses your API key as the Basic auth username with an empty password, and it supports webhook subscriptions that POST an event to your URL whenever a matching object is created, updated or deleted.

Close does not document a step that calls an outside API from inside its own automation and reads the reply. So the integration on this page uses the API on both sides. A webhook subscription tells your function that a lead was created, the function calls Dizo's REST API for each contact on that lead, and it writes the title and a phone number back with Close's contact update endpoint. There is no Dizo app in Close; the code is yours.

Why a calling team wants this

A Close rep's day is measured in conversations. A new lead with an email and no phone number cannot be called, and a contact with no title is hard to prioritize. Researching each one by hand eats the time that should go to dials. Filling those fields automatically, the moment the lead appears, means the lead is ready to work when the rep opens it.

Dizo's person enrich endpoint returns title, seniority, department, location and work history for 2 credits when a person is matched. With include: ["phone"] it also looks for a mobile or direct dial, charging 10 more credits only if one is found. Every number comes in E.164 format, which is the format Close stores phones in, along with line type, a confidence score and a dnc flag from the US National Do Not Call Registry. An email that matches nobody returns 404 and costs nothing.

What you can automate

The page's function handles new leads. The same subscription-plus-function pattern supports other Close jobs:

  • Add a title and a mobile number to every contact on a new lead before the first call.
  • Skip numbers flagged dnc so they never enter a calling queue.
  • Find a work email for contacts that only have a name, using POST /v1/email/find with the lead's company domain, 1 credit if found.
  • Store headcount and industry on the lead from POST /v1/companies/enrich, 1 credit if the domain matches.
  • When an email bounces, look the contact up again with POST /v1/people/enrich to see where they work now, 2 credits if matched, then find the new address with email find.
  • Use the decision-maker finder to add the right second contact to a lead that only has a gatekeeper.

Setting it up

Deploy the function first, since the subscription needs its URL. Any host that runs Node 18 or later is fine. Set three environment variables: DIZO_API_KEY, CLOSE_API_KEY and, after the next step, CLOSE_SIG_KEY. Then create the subscription with the curl command on this page. It asks Close to POST whenever a lead is created. The response includes a signature_key, which you store as CLOSE_SIG_KEY.

Close signs every delivery. The close-sig-hash header is a SHA-256 HMAC of the close-sig-timestamp header concatenated with the raw body, keyed with your signature key decoded from hex. The function recomputes it and rejects anything that does not match, so nobody can make your function spend credits by posting fake events.

Each event carries the lead_id. The function lists that lead's contacts with GET /contact/?lead_id=..., which returns a data array, then calls Dizo for each contact that has an email. It sends max_credits: 12 and an Idempotency-Key built from the contact ID. On a match, it updates the contact with PUT /contact/{id}/, setting title and the phones list. Close replaces the phones list on update, so the function resends the contact's existing numbers along with the new mobile.

Sign up for a live key and 250 free credits, with no card. While you build, a dz_test_ key returns synthetic data for free.

No-code alternative

If you prefer not to host a function, point the subscription at a workflow tool. In n8n, a Webhook node receives the event, an HTTP Request node calls Dizo with a Header Auth credential holding Bearer dz_live_..., and another HTTP Request node updates the contact in Close with Basic auth. Zapier can do the same with its webhook and HTTP steps.

Signature checking is harder in no-code tools, so if you skip it, at least keep the workflow URL private and give the Dizo key tight caps. The core rules stay the same: stop on 404, send max_credits, and check dnc before writing a number.

Controlling spend

A lead can carry several contacts, so one webhook may produce several Dizo calls. Budget for that. Give the function its own key in API keys with data:read scope, a daily cap, a monthly cap, a per-request ceiling and an allow-list of the endpoints it uses. Keep max_credits in every body. Set an account-wide monthly USD cap; once it is reached, calls return 402 monthly_cap_reached and auto-refill never pushes past it.

Hypothetical volumes at the $10–$499 tier of $0.025 per credit, assuming 1.5 contacts per lead, 70% of contacts matched and phones found for half of the matches:

  • 400 new leads a month: 600 contacts, 420 matches × 2 = 840 credits, plus 210 phones × 10 = 2,100, for 2,940 credits or $73.50.
  • Profile only, no phones: 840 credits, or $21.
  • A larger team at 2,000 leads a month with phones: 14,700 credits. A $500 purchase moves you to the $0.021 tier, so that is about $308.70.

Example workflows

Speed to first call. A form or import creates a lead. Within seconds the function adds a title and a mobile to each contact. The rep opens a Smart View of new leads with a phone and starts dialing. Contacts with no match cost nothing and stay in the view for manual research.

Phones only when it matters. If you sell to a broad audience, phones on every contact may be more than you need. Drop include from the request, set max_credits: 2, and fetch phones later with phone finder when a lead reaches a status where calling begins. You pay 10 credits per number found, only for leads that earned a call.

Adding the missing decision-maker. Some inbound leads arrive with only an office manager or a generic inbox as the contact. A second function, triggered when a lead moves to a qualified status, sends the lead's domain to the decision-maker finder with a ranked list of titles such as head of sales, then VP sales, then founder. Dizo returns the top-ranked match it has, falling through the titles in order, for 1 credit per 25 people returned. The function then creates that person as a new contact on the lead and runs the enrich step for an email and phone.

Troubleshooting and security

If deliveries are rejected with 401 from your own function, the signature check is failing: make sure you hash the raw body before parsing it, and that the key is decoded from hex. If Dizo returns 401, the Authorization header must be Bearer, a space, then the key. If Close returns an auth error, remember its Basic auth uses the API key as the username and an empty password. A 402 from Dizo means a cap was reached; the free GET /v1/billing endpoint shows where you stand.

Keep all three secrets in your host's secret store. Use a Dizo key created only for Close so you can rotate it on its own, and keep billing scopes off it. Report any bounced email or disconnected number through POST /v1/feedback; confirmed reports are credited back. See trust for opt-outs and data-subject requests.

Frequently asked questions

Is there a Dizo integration inside Close?

No. You connect them with a Close webhook subscription and a function, or a workflow tool such as n8n, that calls Dizo's REST API and updates contacts through Close's API.

Why does the function list contacts instead of reading them from the event?

Each lead can have several contacts, and the event gives you the lead_id. Close's docs recommend listing contacts with the lead_id filter, which returns every contact on the lead in a data array.

Will updating phones delete existing numbers?

Close replaces the whole phones list on a contact update. The example resends the contact's existing numbers together with the new one, so nothing is lost.

What does it cost if Dizo finds nothing?

Nothing. Person enrich returns 404 for an unmatched email and charges no credits, and the extra 10 credits for a phone apply only when a number is found.

How are Do Not Call numbers handled?

Each phone Dizo returns has a dnc flag based on the US National Do Not Call Registry, and the example only writes numbers where it is false. This is not legal advice; check your own calling obligations.

Can I enrich leads already in Close?

Yes. Export the contacts, send them to POST /v1/batch as one job of up to 10,000 lookups, and update Close from the results file. Add dry_run first to see the maximum cost.

Last reviewed 2026-11-24.

Related integrations