LeadDuo REST API Documentation

⚑ Real-time form submissions with instant notifications

The LeadDuo API allows you to submit form data via a simple REST endpoint, retrieve form submissions programmatically, and integrate with your CRM via webhooks or REST API. Each submission triggers optional email and SMS alerts if configured.

LeadDuo is part of the Three Core AI developer suite, alongside EngageAI and AgileAI.

Authentication

The LeadDuo API uses API keys for authentication. You can generate an API key from your form settings page.

Note: Keep your API key secure. Do not expose it in client-side code or public repositories.

Submit Form Data

POSThttps://api.leadduo.io/api/v1/form/{formId}

Request Body

{
  "ld_key": "your_form_key_here",
  "email": "user@example.com",
  "name": "John Doe",
  "message": "I'm interested in your services"
}

Response

{
  "ok": true
}

Code Examples

Choose your preferred language to see how to submit form data

const formData = {
  ld_key: 'your_form_key_here',
  email: 'user@example.com',
  name: 'John Doe',
  message: "I'm interested in your services"
};

fetch('https://api.leadduo.io/api/v1/form/YOUR_FORM_ID', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(formData)
})
  .then(response => response.json())
  .then(data => {
    if (data.ok) {
      console.log('Form submitted successfully!');
    }
  })
  .catch(error => console.error('Error:', error));

Get Submissions

GEThttps://api.leadduo.io/api/v1/submissions?formId={formId}

Headers

X-API-Key: your_api_key_here

Query Parameters

ParameterTypeDescription
formIdstringRequired. Your form ID
limitnumberOptional. Number of submissions to return (default: 50)
offsetnumberOptional. Number of submissions to skip (default: 0)

Response

{
  "ok": true,
  "submissions": [
    {
      "id": "clx1234567890",
      "formId": "abc123",
      "fields": {
        "email": "user@example.com",
        "name": "John Doe",
        "message": "I'm interested in your services"
      },
      "createdAt": "2024-01-15T10:30:00.000Z",
      "isSpam": false,
      "emailSent": true,
      "smsSent": true,
      "qualified": true,
      "qualifyScore": 13,
      "qualifyData": {
        "score": 13,
        "qualified": true,
        "responses": {
          "q1762030857037": "$25,000+",
          "q1762030884180": "ASAP",
          "q1762031015454": true
        }
      }
    }
  ],
  "total": 42,
  "hasMore": true
}

πŸ’‘ LeadQualify Fields: If your form has LeadQualify enabled (Pro plan), submissions will include qualified, qualifyScore, and qualifyData with the full qualification responses.

Code Examples

Retrieve submissions with authentication

fetch('https://api.leadduo.io/api/v1/submissions?formId=YOUR_FORM_ID&limit=10', {
  method: 'GET',
  headers: {
    'X-API-Key': 'your_api_key_here'
  }
})
  .then(response => response.json())
  .then(data => {
    console.log('Submissions:', data.submissions);
    console.log('Total:', data.total);
  })
  .catch(error => console.error('Error:', error));

Rate Limits

Form Submissions: 10 requests per hour per IP address + form key combination

API Requests: 10 requests per hour per API key + IP address combination

Rate limits help prevent abuse and ensure service reliability for all users.

Error Codes

ErrorDescription
missing_ld_keyForm key is required
invalid_ld_keyForm key is invalid
form_not_foundForm does not exist
form_inactiveForm is paused
rate_limitedToo many requests, please try again later
invalid_api_keyAPI key is invalid or missing
unauthorizedYou don't have permission to access this resource

Need Help?

Have questions about the API? Contact us at support@leadduo.io

LeadDuo API Reference | Form Submission & Webhook Integration Docs