# Retool + Dizo

> Add Dizo to Retool as a REST API resource with Bearer token auth, or as an MCP Server resource for Retool Agents, and build internal data tools.

Type: REST recipe — base URL `https://api.dizo.ai/v1`. No native app needed.

## Steps
1. Go to **Resources → Create new → Resource** and pick **REST API**.
2. Set **Base URL** to `https://api.dizo.ai/v1`, choose **Bearer token** under **Authentication** and paste a `dz_live_...` key (ideally from a configuration variable or Retool secret).
3. Click **Test connection**, then **Create resource**.
4. In an app, create a query on the resource: **Action type** POST, path `/email/find`, JSON body referencing your components with `{{ }}`.
5. For Retool Agents, create an **MCP Server** resource instead, with Server URL `https://mcp.dizo.ai/mcp` and **Bearer Token** authentication, and add it to the agent as a tool.

## Where to go
Resources → Create new → **REST API**: base URL `https://api.dizo.ai/v1`, Authentication Bearer token.

Open the Retool REST API docs: https://docs.retool.com/queries/guides/api/rest

## REST API resource + query
```
Resource: REST API (Manual queries)
  Base URL:        https://api.dizo.ai/v1
  Authentication:  Bearer token → dz_live_...

Query (on the Dizo resource):
  Action type:  POST
  URL:          /email/find
  Body (JSON):
  {
    "first_name": "{{ firstName.value }}",
    "last_name": "{{ lastName.value }}",
    "company_domain": "{{ domain.value }}",
    "max_credits": 1
  }
  Run: only when manually triggered
```

## MCP Server resource (Retool Agents)
```
Resource: MCP Server
  Server URL:      https://mcp.dizo.ai/mcp
  Authentication:  Bearer Token → dz_live_...
  Test connection → Create resource

Then add the resource as a tool on your Retool Agent.
```

## Notes
- Billable Dizo calls are writes in spirit: set them to run only when manually triggered (a button) so a page load never spends credits.
- Give the Retool resource its own key with an endpoint allow-list and a monthly cap, separate from your production keys.

## Related API docs
- [/docs/email-find](https://dizo.ai/docs/email-find.md)
- [/docs/people-search](https://dizo.ai/docs/people-search.md)
- [/docs/keys](https://dizo.ai/docs/keys.md)
- [/docs/billing-limits](https://dizo.ai/docs/billing-limits.md)


## What Retool is

Retool is a platform for building internal tools. You assemble an app from components such as tables, forms, text inputs and buttons, and connect them to resources: databases, REST APIs and other services. Queries run against those resources, and component values flow into queries through `{{ }}` expressions, which Retool evaluates as JavaScript. Ops, sales and support teams use Retool apps as admin panels, review queues and lookup consoles.

Retool connects to Dizo in two ways, both through standard resource types. A **REST API** resource points at `https://api.dizo.ai/v1` with Bearer token authentication and powers queries in apps. An **MCP Server** resource points at `https://mcp.dizo.ai/mcp` and gives a Retool Agent the Dizo tools, or lets an app call them from a function. There is no Dizo integration tile or listing in Retool; you use these generic resource types.

## Why build on Dizo in Retool

Internal tools are where people look things up. A sales ops lead wants to paste a domain and see the account. A support agent wants to know who is behind an email. A RevOps engineer wants a safe console for reps to pull a contact without handing everyone an API key. Retool gives those people a purpose-built interface, and Dizo supplies the people, company, email and phone data behind it.

Centralising lookups in one Retool app also centralises cost. Every query runs through one resource and one key, so a single per-key cap governs the whole team. And because Dizo bills only for found records, at 1 credit for a found email, 10 for a found phone and nothing for a miss, a lookup console costs what it delivers. Rates are on the [pricing page](/pricing).

## What you can build

A few internal tools that map cleanly onto Dizo endpoints:

- A contact lookup form: first name, last name and domain in, verified work email out, with its `status` and `researched_at` shown.
- An account console: paste a domain, see the company profile from `GET /v1/companies/{domain}` and the org chart grouped by department.
- A people search page with filters for title, seniority, department and location, backed by people search and shown in a table.
- A reverse lookup tool for support: an email or phone in, the person and employer out.
- A bounce-recovery screen: paste contacts whose emails bounced, re-run email find against their current company domain, and flag the ones with no result for suppression.
- A spend panel that shows balance, this month's spend and per-key usage from the free `GET /v1/billing` endpoint.
- A Retool Agent that answers prospecting questions in plain English using the Dizo MCP tools.

## Setting up the REST API resource

Go to **Resources**, click **Create new → Resource**, search for REST API and pick the tile. Give it a name such as Dizo and choose manual queries. Set **Base URL** to `https://api.dizo.ai/v1`. Under **Authentication**, choose **Bearer token** and supply a `dz_live_...` key; Retool sends it as `Authorization: Bearer` on every request. Retool recommends keeping tokens in configuration variables or secrets rather than typing them into the resource, so do that if your plan offers it. Click **Test connection**, then **Create resource**.

In an app, add a query on the Dizo resource. Set **Action type** to POST and the URL path to `/email/find`. In the JSON body, reference your inputs, for example `{{ firstName.value }}`, and include `"max_credits": 1`. Set the query to run only when manually triggered, then attach it to a button's click event. That last step is important. Retool can run read-style queries automatically when inputs change, and you do not want every keystroke in a name field to trigger a billable call.

Show the response in components: `{{ emailFind.data.email.address }}` in a text field, or a table bound to `{{ peopleSearch.data.people }}`. [Sign up](/signup) for a live key and 250 free credits, with no card. A `dz_test_` key returns synthetic data for free, which is enough to build and demo the app.

## Setting up the MCP Server resource for agents

For a Retool Agent, create a second resource: **Resources → Create new → Resource**, search for MCP and pick **MCP Server**. Set **Server URL** to `https://mcp.dizo.ai/mcp`. Retool supports remote servers over streamable HTTP or SSE. Under **Authentication**, choose **Bearer Token** and enter the key, or use the OAuth 2.0 option if you prefer per-user sign-in. Click **Test connection**, then **Create resource**, and add the resource as a tool on your agent.

The agent then sees every Dizo tool with its credit cost in the description, plus the free `dizo_quote`, `dizo_count` and `dizo_whoami` tools. Tell it in its instructions to call `dizo_whoami` first and quote any job over 100 credits before running it. MCP connections default to `data:read` and a 500-credit per-call limit. See the MCP page for the full tool list.

## Controlling spend

Give the Retool resource its own key, created through [API keys](/docs/keys). Scope it to `data:read`, set `max_credits_per_request`, set daily and monthly credit caps, and list only the endpoints your app uses in `allowed_endpoints`. If the app only does email lookups and company profiles, the key should not be able to call phone find at all. Add an account-wide monthly USD cap through [spend limits](/docs/billing-limits), with alerts at 50%, 80% and 100%.

A hypothetical month for a 15-person sales team using a lookup console: 1,500 email lookups with 1,200 found, 300 company profiles all found, and 80 phone lookups with 50 found. That is 1,200 + 300 + 500 = 2,000 credits. At the $0.025 pay-as-you-go rate it is $50. Bought in a single $2,000 purchase at the $0.017 Growth rate, the same usage is $34, with the rest of the credits carrying forward for up to 12 months.

## Design patterns that save credits

Cache results in your own database. When a rep looks up a contact, write the result to a table, and check that table before calling Dizo the next time. Retool makes this easy because the database query and the Dizo query sit in the same app. A second lookup of the same person a week later then costs nothing.

Show the cost before the click. Run the same query with `"dry_run": true` when the form is filled in, display the quoted credits next to the button, and run the real query only on click. Dry runs are free. For anything over a handful of records, such as a pasted list of 500 domains, use `POST /v1/batch` and poll the free `GET /v1/batch/{id}` endpoint with a timer instead of firing 500 queries from the browser.

Exclude what you already own. Push current customers and open opportunities to Dizo's [suppression list](/docs/suppression), which is free, so a people search in the app never returns, or charges for, contacts your team already works with. A small admin screen in the same Retool app can let ops add domains to that list without touching the API directly.

## Troubleshooting

If **Test connection** fails, check the Base URL has `/v1` and no trailing path, and that the token is the key itself without the word Bearer, since Retool adds the prefix. A `404` from a lookup is a normal not-found result and is free; handle it in the UI as "no match" rather than an error toast. A `402` means a cap was reached, such as `402 monthly_cap_reached`.

Every Dizo error carries `error.code` and a plain-English `error.fix`. Show `error.fix` in the app so the user knows what to change. Retry only if `error.retryable` is true, after `error.retry_after` seconds. If the per-key rate limit is the issue, `GET /v1/me` reports it along with remaining budget.

## Security practices

Store the key in a Retool configuration variable or secret, never in a query body or a JavaScript transformer, where app editors could read it. Use separate keys for staging and production resources. Keep billing and key management out of the app entirely: the key should never hold `billing:write` or `keys:write`.

Use Retool's own permissions to decide who can open the lookup app, and Dizo's per-key caps to decide how much it can spend. Together they let you give a whole team access to data without giving anyone an API key. For Dizo's handling of opt-outs and data requests, see the [trust page](/trust).

## FAQ

### Is there a Dizo integration tile in Retool?
No. There is no native Dizo app or listing. You use Retool's generic REST API resource for apps and its MCP Server resource for Retool Agents.

### Should I use the REST resource or the MCP Server resource?
Use REST for apps with forms and tables, where you control exactly which endpoint runs and when. Use the MCP Server resource for a Retool Agent that decides which Dizo tool to call from a plain-English request.

### How do I stop a query spending credits on every keystroke?
Set the query to run only when manually triggered and attach it to a button. Use a free dry run on input change if you want to show the cost before the click.

### Do I need to add the Bearer prefix myself?
Not with the Bearer token authentication option. Retool sends the value as `Authorization: Bearer` followed by your token.

### Can the whole team share one key safely?
Yes, if the key lives only in the resource and has caps. Give it `data:read`, an endpoint allow-list and daily and monthly credit caps, so the app can never spend more than you set.

### What happens when a lookup finds nothing?
Dizo returns `404 not_found` and charges nothing. Handle it in the app as a no-match state rather than an error.
