API v1.0

Leo API

Integrate Leo with Zapier, Make, or any custom workflow. Base URL: https://yourleo.ai

Authentication: API key endpoints require Authorization: Bearer dm_live_... header. Inbound webhooks use x-api-key: dm_live_... header. Get your API key from /admin/settings.

Authentication

POST/api/auth/login

Authenticate with email + password. Returns a session cookie.

Request Body

{ "email": "user@example.com", "password": "secret" }

Response

{ "ok": true, "user": { "id": "...", "name": "...", "role": "..." } }

API Keys

GET/admin/settings

Generate and manage API keys from the Settings page. Keys have prefix dm_live_...

Visit /admin/settings to create API keys for your organization.

Tasks (v1)

GET/api/v1/tasks?status=pending&limit=50AUTH

List tasks for the authenticated organization.

Response

{ "data": [{ "id": "...", "title": "...", "status": "pending", "priority": "high" }], "org_id": "..." }

Contacts (v1)

GET/api/v1/contacts?status=lead&limit=50AUTH

List CRM contacts for the authenticated organization.

Response

{ "data": [{ "id": "...", "name": "...", "email": "...", "status": "lead" }], "org_id": "..." }

Webhooks (Inbound)

POST/api/webhooks/inbound/[orgId]

Push events INTO Leo from Zapier, Make, or any HTTP client. Supports task.create and contact.create.

Requires x-api-key header with your org API key.

Request Body

{ "event": "task.create", "data": { "title": "Follow up with client", "priority": "high" } }

Response

{ "ok": true, "id": "abc123..." }
POST/api/webhooks/inbound/[orgId]

Create a contact via inbound webhook.

Requires x-api-key header with your org API key.

Request Body

{ "event": "contact.create", "data": { "name": "Juan García", "email": "juan@empresa.com", "company": "Empresa SA" } }

Response

{ "ok": true, "id": "def456..." }

Organizations

GET/api/admin/organizationsAUTH

List all organizations (admin session required).

Requires active admin session (cookie-based).

Response

[{ "id": "...", "name": "...", "slug": "...", "plan": "free" }]

Need help? Contact support@yourleo.ai · Back to Dashboard