Build on DENDAT in five minutes
A REST API with scoped keys, cursor pagination and signed webhooks. Read and write contacts, deals, tasks, notes and more from any language.
Your first call in three steps
Base URL https://dendat.com/api/v3. Create a key, export it, and make your first call.
- Create a key. Sign in to DENDAT, open Developers, API keys, and create a restricted key with
contacts:readandcontacts:write. Copy it when it is shown. - Export it.
export DENDAT_API_KEY=sk_live_... - Call the API. Pick a language below.
curl "https://dendat.com/api/v3/contacts?limit=5" \
-H "Authorization: Bearer $DENDAT_API_KEY"
curl -X POST "https://dendat.com/api/v3/contacts" \
-H "Authorization: Bearer $DENDAT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"email":"[email protected]","first_name":"Jane","last_name":"Doe"}'import os, uuid, requests
BASE = "https://dendat.com/api/v3"
H = {"Authorization": "Bearer " + os.environ["DENDAT_API_KEY"]}
def all_contacts():
params = {"limit": 100}
while True:
r = requests.get(f"{BASE}/contacts", headers=H, params=params, timeout=30)
r.raise_for_status()
page = r.json()
yield from page["data"]
if not page["has_more"]:
break
params["starting_after"] = page["data"][-1]["id"]
for c in all_contacts():
print(c["id"], c.get("email"))
r = requests.post(f"{BASE}/contacts", timeout=30,
headers={**H, "Idempotency-Key": str(uuid.uuid4())},
json={"email": "[email protected]", "first_name": "Jane"})
print(r.status_code, r.json())const BASE = "https://dendat.com/api/v3";
const headers = { Authorization: `Bearer ${process.env.DENDAT_API_KEY}` };
async function* allContacts() {
let cursor;
while (true) {
const qs = new URLSearchParams({ limit: "100" });
if (cursor) qs.set("starting_after", cursor);
const res = await fetch(`${BASE}/contacts?${qs}`, { headers });
if (!res.ok) throw new Error((await res.json()).error.message);
const page = await res.json();
yield* page.data;
if (!page.has_more) return;
cursor = page.data[page.data.length - 1].id;
}
}
for await (const c of allContacts()) console.log(c.id, c.email);
const created = await fetch(`${BASE}/contacts`, {
method: "POST",
headers: { ...headers, "Content-Type": "application/json", "Idempotency-Key": crypto.randomUUID() },
body: JSON.stringify({ email: "[email protected]", first_name: "Jane" }),
});
console.log(created.status, await created.json());Without a key the API answers with a clean JSON error, which is a quick way to check connectivity:
curl -i https://dendat.com/api/v3/contacts
# HTTP/2 401
# {"error":{"type":"authentication_error","code":"api_key_missing","message":"Missing Authorization header.","request_id":"req_..."}}The basics
Authentication
Send Authorization: Bearer <key>. Secret keys (sk_) have full access. Restricted keys (rk_) carry only the scopes you pick, such as deals:read. A key can also be limited to an IP allow-list.
Pagination
Lists take limit (1 to 100, default 25) and starting_after (the id of the last item). Each response has has_more and a data array.
Errors
Failures return {"error": {"type", "code", "message", "request_id"}}, plus param on validation errors. Statuses: 400, 401, 403, 404, 409, 422, 429.
Rate limits
600 requests per minute per key by default. Every response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. A 429 includes Retry-After.
Idempotency
Add an Idempotency-Key header to POST, PATCH and PUT. A repeat with the same payload replays the first response and sets Idempotency-Replayed: 1.
Filtering
Lists accept sort, fields for sparse responses and q for search, plus per-resource filters such as status on contacts.
Resources
Summary of the main resources. The full list is in the interactive docs. Each path is under https://dendat.com/api/v3.
| Resource | Path | Methods | Scopes |
|---|---|---|---|
| Contacts | /contacts | GET, POST, PATCH, DELETE | contacts:read contacts:write |
| Clients | /clients | GET, POST, PATCH, DELETE | clients:read clients:write |
| Deals | /deals | GET, POST, PATCH, DELETE | deals:read deals:write |
| Tasks | /tasks | GET, POST, PATCH, DELETE | tasks:read tasks:write |
| Notes | /notes | GET, POST, PATCH, DELETE | notes:read notes:write |
| Appointments | /appointments | GET, POST, PATCH, DELETE | appointments:read appointments:write |
| Invoices | /invoices | GET, POST, PATCH, DELETE | invoices:read invoices:write |
| Files | /files | GET | files:read |
| Webhooks | /webhook_endpoints | GET, POST, PATCH, DELETE | webhooks:read webhooks:write |
| Events | /events | GET | events:read |
| Search | /search | GET | search:read |
Open the interactive docs to try every operation, or fetch the OpenAPI spec to generate a client.
Webhooks
Register an endpoint with POST /webhook_endpoints and a list of enabled_events such as contact.created, deal.stage_changed, invoice.paid or task.completed. Changes made in the app fire events too. The signing secret (whsec_...) is shown once at creation and can be rolled at any time.
curl -X POST "https://dendat.com/api/v3/webhook_endpoints" \
-H "Authorization: Bearer $DENDAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/hooks/dendat",
"enabled_events":["contact.created","deal.stage_changed"]}'- Each delivery is a signed POST with the header
X-DENCRM-Signature: t=<unix>,v1=<hex>. - The signed message is
t + "." + raw body, HMAC-SHA256 with yourwhsec_secret. - Failed deliveries retry with backoff at 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours.
- Always verify against the raw bytes, and reject timestamps older than 5 minutes.
import hmac, hashlib, time
def verify_webhook(raw_body: bytes, header: str, secret: str,
tolerance: int = 300) -> bool:
parts = dict(p.split("=", 1) for p in header.split(",") if "=" in p)
t, v1 = parts.get("t"), parts.get("v1")
if not t or not v1 or abs(time.time() - int(t)) > tolerance:
return False
expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body,
hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, v1)import crypto from "node:crypto";
export function verifyWebhook(rawBody, header, secret, tolerance = 300) {
const parts = Object.fromEntries(
header.split(",").map((p) => p.split(/=(.*)/s).slice(0, 2)));
const { t, v1 } = parts;
if (!t || !v1 || Math.abs(Date.now() / 1000 - Number(t)) > tolerance) return false;
const expected = crypto.createHmac("sha256", secret)
.update(`${t}.`).update(rawBody).digest("hex");
const a = Buffer.from(expected), b = Buffer.from(v1);
return a.length === b.length && crypto.timingSafeEqual(a, b);
}Build with a prompt
Describe the integration and DENDAT AI will draft it. Pick a starting point, then paste your key into your own environment, never into the chat.
Sync deals to a spreadsheet
Write a script that syncs my deals to a spreadsheet
Try this promptSlack alert on a new lead
Write a small server that posts to Slack when a contact.created webhook arrives
Try this promptNightly contact backup
Write a Python script that exports all my contacts to a CSV file every night
Try this promptCreate tasks from emails
Write a script that creates a task for every new email in a mailbox
Try this promptVerify webhooks in Flask
Show me a Flask endpoint that verifies a signed webhook and logs the event
Try this promptDeal stage dashboard
Build a page that charts my deals by stage using the DENDAT API
Try this promptGet your key
Keys are created from the Developers area after you sign in. Start with a restricted key that has only the scopes you need.