Skip to main content
Connect Demand IQ lead data to Zapier, your customer relationship management (CRM) system, or a custom application using an API key. A lead is a potential customer. The API calls a lead a prospect, so its URLs use prospects. These examples use https://api.demand-iq.com/api/v1.0, which is separate from the AI Presentations API.

Export leads

Read leads from Demand IQ and save them in another system.

Import leads

Create a lead and add its contact information.

Two-way sync

Read leads and send agreed changes back to Demand IQ.

Create and store your key

  1. Open Settings → Company → API Keys in the Demand IQ dashboard.
  2. Select Add New API Key, then choose the objective that matches your connection. Use Custom to select permissions individually.
  3. Review the permissions before saving. The export and two-way sync presets include read and write permissions for several kinds of lead data. For a read-only export key, choose Custom and select only prospects:read. A permission controls which data the key can read or change; an API may call it a scope.
  4. Copy the key when it appears and store it in your server’s secret storage or your integration’s secure connection settings. Check its expiration date.
Keep your key out of browser code, public repositories, URLs, and logs. If it is lost or exposed, remove it in API Keys, create a replacement, and update each connection that used it.
Send the key in the Authorization header on every request:
For the TypeScript examples, set DIQ_API_KEY in your server environment. Each example checks the HTTP result before using the response. Appointments, notes, attachments, and other related data have separate permissions. Only select them if your connection uses their endpoints. A key is associated with a company; use a key for the company whose leads you want to access.

Send leads to another tool

Required permission: prospects:read.

Read company leads over HTTP

Call GET /prospects/company to read company lead summaries, including available contact details. This endpoint requires company-level access; a key acting as a sales representative cannot use it.
An illustrative 200 OK response:
result is the array of leads. Field names are case-sensitive: company summaries use ProspectId and ContactEmail, while city, state, and zipCode are lowercase. Contact values can be null. page is the page number; total is the number of records in this response, not the company-wide count. Continue until result has fewer records than your requested limit. This server-side example reads every page. Replace saveLead with a write to your destination, using ProspectId as the saved Demand IQ identifier so a repeat export updates the same record.
Records can change during an export. Reconcile periodically and update existing destination records rather than assuming an export is a fixed snapshot.

Export with Zapier

A scheduled Zap can read leads and write them to your destination:
  1. Use Schedule by Zapier as the trigger.
  2. Add a Webhooks by Zapier → GET action. Set the URL to https://api.demand-iq.com/api/v1.0/prospects/company and query parameters to limit=100, offset=0, and orderBy=prospect_id.
  3. Add an Authorization header with value Bearer YOUR_API_KEY, and an Accept header with value application/json. Leave Basic Auth empty.
  4. Test the request. Use the records in result as line items for a Looping by Zapier step.
  5. Inside the loop, find or update the destination record by ProspectId; create it only if it does not exist. Map ContactName, ContactEmail, and ContactPhoneNumber to your destination fields.
This Zap reads one page. If it returns 100 records, retrieve subsequent pages by increasing offset, or use the paginated server example above. Do not publish a one-page Zap as a complete export for a company with more than 100 leads. Check that your Zapier plan supports the selected actions.
For Zapier’s request settings, see Webhooks by Zapier setup. Troubleshooting: an empty result can mean the company has no matching leads or the wrong company’s key was used. A 403 can mean the read permission or company-level access is missing. If only the first 100 leads appear, add pagination. Repeated destination records mean the Zap needs to find or update by ProspectId before creating.

Bring leads into DIQ

Required permissions: prospects:write and contacts:write. Create the address record with POST /prospects, then use its returned id to add a contact with POST /prospects/{id}/contact. Adding firstName or email to the first request does not create the contact. The first call looks up the address. If it cannot resolve it, correct the address before retrying. Call from your server when another system receives a new lead:
The lead call returns 201 Created with an address record. Response excerpt:
The full lead response also includes locationId, unit, userId, companyId, closer, averageUtilityBill, wasOnsite, and creation/update timestamps and user IDs. Save id as the connection between your source record and the Demand IQ lead. The contact call returns 201 Created:
Using Zapier: start with the other tool’s new-lead trigger. Add a Webhooks by Zapier → POST action with the /prospects URL, JSON payload, the four address fields, and the authorization header above. Add a second POST action to /prospects/{id}/contact, mapping id from the first response and the contact fields from the trigger. Save the source-to-Demand IQ ID mapping before enabling retries. Troubleshooting: 400 may indicate a missing address field, an unresolved address, or invalid contact data. If the lead succeeds and the contact fails, retry only the contact call using the saved lead ID. An existing contact produces a conflict; reconcile it before using PUT /prospects/{id}/contact. Replaying the entire create sequence can create duplicates; do not assume repeated POSTs are deduplicated.

Two-way sync

Required permissions: prospects:read, contacts:read, and contacts:write for the contact example below. Add prospects:write for the import flow above or address updates. Use the export flow to read leads and the import flow to create missing records. Keep a mapping between the other system’s record ID and the Demand IQ ProspectId/id. For an existing lead, read its contact with GET /prospects/{id}/contact (contacts:read). It returns 200 OK with the same contact fields shown above. To change it, send PUT /prospects/{id}/contact (contacts:write).
A successful update returns 200 OK:
Read the existing contact first and send the complete contact values you want to keep: omitted contact fields can be cleared. A contact must already exist for PUT; use POST to create one. For address changes, PUT /prospects/{id} requires locationId, latitude, longitude, address, city, state, and zipCode. It is a full update, not a partial PATCH. Read the current lead with GET /prospects/{id} first; its response includes these fields. Include the existing unit and averageUtilityBill if you want to preserve them: omitting unit clears it, and omitting averageUtilityBill resets it to 0. Before enabling two-way sync:
  • Choose who owns each field. For example, your CRM owns email and Demand IQ owns lead status. Decide what happens when both systems change the same field before copying it.
  • Prevent loops. Compare stored values before writing; do not send an unchanged record back just because your own update triggered the other system.
  • Use saved IDs. Do not match only by name or email, and do not assume a create request has an idempotency key (a value that makes repeated requests count as one operation).
  • Reconcile regularly. The company list’s start/end filters concern lead or disposition creation, not every change to a lead. Updated is not a guaranteed change feed for contact edits. A timestamp-only poll can miss changes; periodically re-read records and compare fields.
  • Handle retries deliberately. Retry temporary read failures with a delay. After an uncertain write result, read the saved record to confirm whether it succeeded before repeating it.
Troubleshooting: if changes bounce between systems, add field ownership and unchanged-value checks. If fields disappear, stop sending partial contact PUT bodies. If changes are missing, remove the assumption that start, end, or Updated captures all contact edits. If PUT fails because no contact exists, check the lead ID and create the contact first.

Troubleshoot your connection

If you need help, send Demand IQ support the endpoint, HTTP status, and time of the request. Do not send the API key or a customer’s personal information.