Introduction
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
This API is not authenticated.
Endpoints
Determine if a Discord ID is linked to a user account.
Example request:
curl --request GET \
--get "https://leadmagnetmarketing.eu/api/discord/verify/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://leadmagnetmarketing.eu/api/discord/verify/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Landing Pages
List landing pages.
requires authentication
Example request:
curl --request GET \
--get "https://leadmagnetmarketing.eu/api/v1/landing-pages?locale=en&title=Demo&sort=created_at&order=desc&per_page=15" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"locale\": \"sr_BA\",
\"title\": \"architecto\",
\"sort\": \"created_at\",
\"order\": \"asc\",
\"per_page\": 22
}"
const url = new URL(
"https://leadmagnetmarketing.eu/api/v1/landing-pages"
);
const params = {
"locale": "en",
"title": "Demo",
"sort": "created_at",
"order": "desc",
"per_page": "15",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"locale": "sr_BA",
"title": "architecto",
"sort": "created_at",
"order": "asc",
"per_page": 22
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": [
{
"id": 1,
"title": "Demo",
"locale": "en"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a landing page.
requires authentication
Example request:
curl --request POST \
"https://leadmagnetmarketing.eu/api/v1/landing-pages" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"lead_magnet_id\": 1,
\"title\": \"Demo page\",
\"slug\": \"demo-page\",
\"template\": \"default\",
\"content\": \"architecto\",
\"locale\": \"en\"
}"
const url = new URL(
"https://leadmagnetmarketing.eu/api/v1/landing-pages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"lead_magnet_id": 1,
"title": "Demo page",
"slug": "demo-page",
"template": "default",
"content": "architecto",
"locale": "en"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"data": {
"id": 1,
"title": "Demo page"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show a landing page.
requires authentication
Example request:
curl --request GET \
--get "https://leadmagnetmarketing.eu/api/v1/landing-pages/e-book" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://leadmagnetmarketing.eu/api/v1/landing-pages/e-book"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 1,
"title": "Demo"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a landing page.
requires authentication
Example request:
curl --request PUT \
"https://leadmagnetmarketing.eu/api/v1/landing-pages/e-book" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"Updated title\",
\"slug\": \"updated-page\",
\"template\": \"default\",
\"content\": \"architecto\",
\"locale\": \"en\"
}"
const url = new URL(
"https://leadmagnetmarketing.eu/api/v1/landing-pages/e-book"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Updated title",
"slug": "updated-page",
"template": "default",
"content": "architecto",
"locale": "en"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 1,
"title": "Updated title"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a landing page.
requires authentication
Example request:
curl --request DELETE \
"https://leadmagnetmarketing.eu/api/v1/landing-pages/e-book" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://leadmagnetmarketing.eu/api/v1/landing-pages/e-book"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Leads
List leads.
requires authentication
Example request:
curl --request GET \
--get "https://leadmagnetmarketing.eu/api/v1/leads?landing_page_id=1&email=user%40example.com&first_name=John&from=2024-01-01&to=2024-12-31&sort=created_at&order=desc&per_page=15" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"landing_page_id\": 16,
\"email\": \"gbailey@example.net\",
\"first_name\": \"architecto\",
\"from\": \"2025-09-03T21:47:43\",
\"to\": \"2025-09-03T21:47:43\",
\"sort\": \"first_name\",
\"order\": \"asc\",
\"per_page\": 22
}"
const url = new URL(
"https://leadmagnetmarketing.eu/api/v1/leads"
);
const params = {
"landing_page_id": "1",
"email": "user@example.com",
"first_name": "John",
"from": "2024-01-01",
"to": "2024-12-31",
"sort": "created_at",
"order": "desc",
"per_page": "15",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"landing_page_id": 16,
"email": "gbailey@example.net",
"first_name": "architecto",
"from": "2025-09-03T21:47:43",
"to": "2025-09-03T21:47:43",
"sort": "first_name",
"order": "asc",
"per_page": 22
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": [
{
"id": 1,
"first_name": "John",
"email": "john@example.com"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a lead.
requires authentication
Example request:
curl --request POST \
"https://leadmagnetmarketing.eu/api/v1/leads" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"landing_page_id\": 1,
\"first_name\": \"John\",
\"email\": \"john@example.com\",
\"consent\": true,
\"tags\": [
\"architecto\"
]
}"
const url = new URL(
"https://leadmagnetmarketing.eu/api/v1/leads"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"landing_page_id": 1,
"first_name": "John",
"email": "john@example.com",
"consent": true,
"tags": [
"architecto"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"data": {
"id": 1,
"first_name": "John"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show a lead.
requires authentication
Example request:
curl --request GET \
--get "https://leadmagnetmarketing.eu/api/v1/leads/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://leadmagnetmarketing.eu/api/v1/leads/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 1,
"first_name": "John"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a lead.
requires authentication
Example request:
curl --request PUT \
"https://leadmagnetmarketing.eu/api/v1/leads/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"Jane\",
\"email\": \"jane@example.com\",
\"consent\": true,
\"tags\": [
\"architecto\"
]
}"
const url = new URL(
"https://leadmagnetmarketing.eu/api/v1/leads/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "Jane",
"email": "jane@example.com",
"consent": true,
"tags": [
"architecto"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 1,
"first_name": "Jane"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a lead.
requires authentication
Example request:
curl --request DELETE \
"https://leadmagnetmarketing.eu/api/v1/leads/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://leadmagnetmarketing.eu/api/v1/leads/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.