NodukanNodukan/ Developers
API Reference

Lead Magnets

API reference for Nodukan Lead Magnets — list, read, create, update lead magnets and export captured leads.

Lead Magnets API

Lead magnets are downloadable assets (PDFs, templates, videos, courses) that creators offer in exchange for a visitor's contact details. This API lets you read and manage lead magnets programmatically and export the leads they capture.

Endpoints#

MethodPathScopeDescription
GET/lead-magnetslead_magnets:readList all lead magnets
POST/lead-magnetslead_magnets:writeCreate a lead magnet
GET/lead-magnets/:idlead_magnets:readGet a single lead magnet
PUT/lead-magnets/:idlead_magnets:writeUpdate a lead magnet
GET/lead-magnets/:id/leadsleads:readList leads captured by a lead magnet

GET /lead-magnets#

Returns a paginated list of lead magnets for the authenticated account.

Query parameters#

ParameterTypeDescription
limitintegerMax records to return (default 20, max 100)
offsetintegerRecords to skip (default 0)
typestringFilter by type: digital, video, course, template
isActivebooleanFilter by active status
curl "https://api.nodukan.com/v1/lead-magnets?limit=20&isActive=true" \
  -H "Authorization: Bearer NDK_live_..."
const url = new URL('https://api.nodukan.com/v1/lead-magnets');
url.searchParams.set('limit', '20');
url.searchParams.set('isActive', 'true');

const res = await fetch(url, {
  headers: { Authorization: `Bearer ${process.env.NODUKAN_API_KEY}` },
});
const { data, pagination } = await res.json();

Response#

{
  "data": [
    {
      "id": "lm_01j9x4km2v",
      "title": "Free Notion Template for Creators",
      "description": "A complete Notion workspace for managing your content calendar.",
      "type": "template",
      "isActive": true,
      "fileUrl": "https://cdn.nodukan.com/lead-magnets/lm_01j9x4km2v/notion-template.zip",
      "thumbnailUrl": "https://cdn.nodukan.com/thumbs/notion-template.jpg",
      "leadsCount": 847,
      "conversionRate": 0.34,
      "createdAt": "2025-11-10T08:00:00Z",
      "updatedAt": "2026-04-15T12:00:00Z"
    },
    {
      "id": "lm_01j9y7mp3k",
      "title": "Instagram Caption Pack — 100 Done-for-You Captions",
      "type": "digital",
      "isActive": true,
      "leadsCount": 1203,
      "conversionRate": 0.41,
      "createdAt": "2025-12-01T09:00:00Z",
      "updatedAt": "2026-03-20T14:30:00Z"
    }
  ],
  "pagination": { "total": 7, "limit": 20, "offset": 0, "hasMore": false },
  "requestId": "req_01j9xabc..."
}

POST /lead-magnets#

Creates a new lead magnet. The asset file must already be uploaded to Nodukan's dashboard; provide its URL in fileUrl.

Request body#

FieldTypeRequiredDescription
titlestring✅Display name (max 120 chars)
descriptionstringShort description shown on the opt-in form
typestring✅One of: digital, video, course, template, ebook
fileUrlstring✅HTTPS URL to the downloadable asset
thumbnailUrlstringCover image URL
isActivebooleanWhether to accept submissions (default true)
successMessagestringThank-you message shown after form submission
redirectUrlstringRedirect URL after submission instead of showing success message
fieldsarrayExtra form fields beyond email (e.g., name, phone)
curl -X POST https://api.nodukan.com/v1/lead-magnets \
  -H "Authorization: Bearer NDK_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Free Notion Template for Creators",
    "description": "A complete Notion workspace for your content calendar.",
    "type": "template",
    "fileUrl": "https://cdn.nodukan.com/uploads/notion-template.zip",
    "thumbnailUrl": "https://cdn.nodukan.com/uploads/notion-thumb.jpg",
    "isActive": true,
    "successMessage": "Your template is on its way! Check your email.",
    "fields": [
      { "name": "name", "label": "Your Name", "required": true },
      { "name": "phone", "label": "WhatsApp Number", "required": false }
    ]
  }'
const res = await fetch('https://api.nodukan.com/v1/lead-magnets', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.NODUKAN_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Free Notion Template for Creators',
    type: 'template',
    fileUrl: 'https://cdn.nodukan.com/uploads/notion-template.zip',
  }),
});
const { data } = await res.json();
console.log('Created lead magnet:', data.id);

Response 201 Created#

{
  "data": {
    "id": "lm_01j9znew00",
    "title": "Free Notion Template for Creators",
    "type": "template",
    "isActive": true,
    "leadsCount": 0,
    "shareUrl": "https://priyasharma.nodukan.com/lead-magnets/free-notion-template",
    "embedCode": "<script src=\"https://nodukan.com/embed/lm_01j9znew00.js\"></script>",
    "createdAt": "2026-05-06T11:00:00Z",
    "updatedAt": "2026-05-06T11:00:00Z"
  },
  "requestId": "req_01j9xabc..."
}

GET /lead-magnets/:id#

Returns a single lead magnet by ID.

curl https://api.nodukan.com/v1/lead-magnets/lm_01j9x4km2v \
  -H "Authorization: Bearer NDK_live_..."

Returns the same shape as a single item in the list response above, plus shareUrl and embedCode.


PUT /lead-magnets/:id#

Updates an existing lead magnet. Send only the fields you want to change (partial update).

curl -X PUT https://api.nodukan.com/v1/lead-magnets/lm_01j9x4km2v \
  -H "Authorization: Bearer NDK_live_..." \
  -H "Content-Type: application/json" \
  -d '{"isActive": false}'
const res = await fetch('https://api.nodukan.com/v1/lead-magnets/lm_01j9x4km2v', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.NODUKAN_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ isActive: false }),
});

GET /lead-magnets/:id/leads#

Returns all leads captured by a specific lead magnet, with optional date range filtering.

Query parameters#

ParameterTypeDescription
fromISO dateFilter leads captured on or after this date (YYYY-MM-DD)
toISO dateFilter leads captured on or before this date
limitintegerMax records (default 20, max 100)
offsetintegerRecords to skip
curl "https://api.nodukan.com/v1/lead-magnets/lm_01j9x4km2v/leads?from=2026-05-01&limit=100" \
  -H "Authorization: Bearer NDK_live_..."
const res = await fetch(
  'https://api.nodukan.com/v1/lead-magnets/lm_01j9x4km2v/leads?from=2026-05-01&limit=100',
  { headers: { Authorization: `Bearer ${process.env.NODUKAN_API_KEY}` } },
);
const { data: leads, pagination } = await res.json();
// Push to CRM
for (const lead of leads) {
  await crm.createContact({ email: lead.email, name: lead.name });
}

Response#

{
  "data": [
    {
      "id": "lead_01j9x...",
      "email": "[email protected]",
      "name": "Ravi Kumar",
      "phone": "+91 98765 43210",
      "customFields": { "instagram_handle": "@ravikumar" },
      "ipCountry": "IN",
      "utmSource": "instagram",
      "utmMedium": "bio_link",
      "capturedAt": "2026-05-06T08:30:00Z"
    },
    {
      "id": "lead_01j9y...",
      "email": "[email protected]",
      "name": "Meera Pillai",
      "phone": null,
      "customFields": {},
      "capturedAt": "2026-05-06T09:45:00Z"
    }
  ],
  "pagination": { "total": 847, "limit": 100, "offset": 0, "hasMore": true },
  "requestId": "req_01j9xabc..."
}
Note:

Leads data includes PII (email, phone). Ensure your integration complies with India's DPDP Act and your privacy policy. Do not store leads data longer than necessary.

Was this helpful?
Edit on GitHub

Last updated