Preskočiť na obsah

Getting started with the Dakoty API

The Dakoty Developer API v1 is a JSON REST API for connecting Dakoty with Make, Zapier, n8n, AI assistants and your own code. This page takes you from nothing to a working call in about five minutes. The full list of endpoints lives in the API reference.

All requests go to https://api.dakoty.com/api/v1/public over HTTPS. A single resource is returned as {"data": {...}} and a list as {"data": [...], "next_cursor": ..., "has_more": ...}. Every response carries the headers X-Dakoty-Api-Version, X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Request bodies are JSON with Content-Type: application/json. The organization is resolved from the key itself, so URLs contain no organization slug.

In Dakoty open Organization settings, then Integrations, then API keys, and choose a new key. Pick the preset for Make, Zapier and n8n, or select scopes yourself, and copy the key that starts with dk_live_. It is shown only once, so store it in a secret manager or an environment variable. The click-by-click steps are in the Slovak help article API keys; scopes are explained in Authentication and scopes.

GET /me needs no scope, so any valid key can call it. It returns the organization, the key’s scopes and expiry, the API version and your rate limits.

Terminal window
export DAKOTY_API_KEY="dk_live_..."
curl -sS https://api.dakoty.com/api/v1/public/me \
-H "Authorization: Bearer $DAKOTY_API_KEY"

A successful call returns status 200. A missing, wrong, expired or revoked key returns 401 with the error code UNAUTHORIZED.

{
"data": {
"organization": { "id": "0b5f7c1e-3c52-4d0e-9a53-6f0c1f6a2b11", "name": "Acme s.r.o.", "slug": "acme" },
"token": {
"id": "6d1c1a58-7a0e-4c0b-8b0e-2f3b9c7d5e42",
"name": "Make - Jana",
"scopes": ["leads:read", "leads:write", "webhooks:manage"],
"expires_at": "2027-10-11T00:00:00Z"
},
"api_version": "2026-10-01",
"limits": { "requests_per_minute": 120, "org_requests_per_minute": 600 }
}
}

This needs Node.js 18 or newer. Save it as me.mjs (the .mjs extension enables top-level await) and run node me.mjs.

const BASE = "https://api.dakoty.com/api/v1/public";
const res = await fetch(`${BASE}/me`, {
headers: { Authorization: `Bearer ${process.env.DAKOTY_API_KEY}` },
});
const body = await res.json();
if (!res.ok) throw new Error(`${res.status} ${body.error.code}: ${body.error.message}`);
console.log(body.data.organization.name, body.data.token.scopes);

This uses the requests package. Run pip install requests once, then execute the script.

import os
import requests
BASE = "https://api.dakoty.com/api/v1/public"
headers = {"Authorization": f"Bearer {os.environ['DAKOTY_API_KEY']}"}
r = requests.get(f"{BASE}/me", headers=headers, timeout=30)
r.raise_for_status()
me = r.json()["data"]
print(me["organization"]["name"], me["token"]["scopes"])

Listing leads needs the scope leads:read, creating one needs leads:write. The inline company and contact objects are matched to existing records or created. Send an Idempotency-Key so a retry cannot create a second lead (see Idempotency).

Terminal window
curl -sS "https://api.dakoty.com/api/v1/public/leads?limit=5" \
-H "Authorization: Bearer $DAKOTY_API_KEY"
curl -sS -X POST https://api.dakoty.com/api/v1/public/leads \
-H "Authorization: Bearer $DAKOTY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: web-form-2026-10-11-0001" \
-d '{"name":"Website enquiry","value":1200,"dedupe":"company",
"company":{"name":"Acme s.r.o.","registration_id":"12345678"},
"contact":{"name":"Jana Novakova","email":"jana@acme.example"}}'

Read Authentication and scopes to give a key only the access it needs, Pagination and sync to read large lists, and Errors and rate limits to handle failures. To receive events instead of polling, continue with Webhooks and Verifying signatures.