/api/public/submit-lead
Public · no auth
Submit a lead
Capture a form submission as a lead. Either landing_page_id or custom_form_id must be supplied. On success the lead is created in the target form's tenant and any lead-capture automations fire. Spam-filtered (honeypot + reCAPTCHA) and rate-limited per IP.
Rate limited.
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
landing_page_id
string · identifier
optional
|
Numeric id of the landing page the form lives on. |
|
custom_form_id
integer
optional
|
Numeric id of the form being submitted (when not using a landing page). |
|
embed_id
integer
optional
|
Numeric id of the form embed the submission came from, if embedded. |
|
ab_variant
integer
optional
|
Id of the A/B test version the visitor saw, when the embed is being tested. Ignored unless it belongs to that embed's running test. |
|
form_data
object
required
|
The submitted fields, keyed by form field name. Required. |
|
utm_source
string
optional
|
Campaign source, stored against the lead. max: 255 |
|
utm_medium
string
optional
|
Campaign medium (e.g. "email", "cpc"). max: 255 |
|
utm_campaign
string
optional
|
Campaign name. max: 255 |
|
utm_term
string
optional
|
Paid-search keyword term. max: 255 |
|
utm_content
string
optional
|
Creative/content variant identifier. max: 255 |
|
time_to_submit
integer
optional
|
Seconds the visitor spent before submitting (bot-timing signal). min: 0 |
|
page_url
string
optional
|
— max: 2048 |
Responses
curl -X POST https://landing.pivotal.digital/api/public/submit-lead \
-H "Content-Type: application/json" \
-d '{
"custom_form_id": 12,
"form_data": { "email": "jane@acme.com", "company": "Acme" },
"utm_source": "newsletter"
}'
use Illuminate\Support\Facades\Http;
$res = Http::post('https://landing.pivotal.digital/api/public/submit-lead', [
'custom_form_id' => 12,
'form_data' => ['email' => 'jane@acme.com', 'company' => 'Acme'],
'utm_source' => 'newsletter',
]);
await fetch('https://landing.pivotal.digital/api/public/submit-lead', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
custom_form_id: 12,
form_data: { email: 'jane@acme.com', company: 'Acme' },
}),
});
{
"success": true,
"message": "Thank you! Your submission has been received.",
"lead_id": 9241
}
{
"message": "The form data field is required.",
"errors": { "form_data": ["The form data field is required."] }
}
{ "success": false, "message": "Submission not allowed at this time." }
/api/public/render-asset
Public · no auth
Render a thank-you asset
Render a lead-magnet asset's shortcode HTML for a thank-you page — used to reveal gated content (PDF embed, video, etc.) after a form submission.
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
asset_slug
string
required
|
Slug of the asset to render. Required. |
|
landing_page_id
string · identifier
required
|
Id of the landing page the asset belongs to. Required. |
Responses
curl -X POST https://landing.pivotal.digital/api/public/render-asset \
-H "Content-Type: application/json" \
-d '{"asset_slug": "free-guide", "landing_page_id": 42}'
{
"success": true,
"html": "<div>…rendered asset…</div>",
"asset": { "name": "Guide.pdf", "type": "pdf" }
}
{ "success": false, "message": "Failed to load content" }
{ "message": "The asset slug field is required.", "errors": { "asset_slug": ["The asset slug field is required."] } }
/api/public/forms/{form_id}/upload
Public · no auth
Upload a form file
Upload a single file for a form that has file fields. Two-phase: upload here to get back a token, then include that token in the corresponding field of the submit-lead payload — the file is finalised and attached to the lead on submission. Enforces a 25MB ceiling and a mime whitelist. Send as multipart/form-data with the file under the file key.
Rate limited.
Path parameters
|
form_id
string
required
|
— pattern: [0-9]+ |
Body parameters
|
file
string
optional
|
The file to upload (multipart). Required. |
|
embed_id
string · identifier
optional
|
Id of the form embed, when uploading from an embedded form. |
|
recaptcha_token
string
optional
|
reCAPTCHA token, when the form has reCAPTCHA enabled. |
Responses
curl -X POST https://landing.pivotal.digital/api/public/forms/42/upload \
-F "file=@brief.pdf"
{
"success": true,
"token": "9f1c…",
"original_name": "brief.pdf",
"size": 184320,
"mime": "application/pdf",
"icon": "fa-file-pdf"
}
{ "success": false, "message": "File type not allowed." }
{ "success": false, "message": "File exceeds the 25MB limit." }
{ "success": false, "message": "No file provided." }
{ "success": false, "message": "Upload rejected." }
{ "success": false, "message": "Form not found." }
{ "success": false, "message": "Could not save upload." }
/api/public/forms/{form_id}/video/init
Public · no auth
Start a form video upload
Open a video upload. Returns an upload token, the part plan and the first batch of presigned part URLs. The browser then PUTs parts direct to object storage and calls complete.
Rate limited.
Path parameters
|
form_id
string
required
|
— pattern: [0-9]+ |
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
field_name
string
required
|
The video field's name on the form. Required. max: 64 |
|
size
integer
required
|
Byte size of the file. Required. min: 1 |
|
content_type
string
required
|
video/mp4, video/quicktime or video/webm. Required. max: 64 |
|
filename
string
optional
|
Original filename (display only). max: 255 |
|
duration_seconds
integer
optional
|
Duration read by the browser, if known. max: 86400 min: 0 |
|
width
integer
optional
|
— max: 16384 min: 0 |
|
height
integer
optional
|
— max: 16384 min: 0 |
|
embed_id
string · identifier
optional
|
Id of the form embed, when uploading from an embedded form. |
|
recaptcha_token
string
optional
|
reCAPTCHA token, when the form has reCAPTCHA enabled. |
Responses
{ "success": true, "token": "…", "part_size": 8388608, "part_count": 23, "parts": [{ "n": 1, "url": "https://…" }], "poster_url": "https://…", "expires_in": 7200 }
{ "success": false, "message": "That video is too large. This form accepts up to 500 MB.", "code": "too_large" }
{ "success": false, "message": "This form has reached its video upload limit for today.", "code": "budget" }
{ "success": false, "message": "Video upload is temporarily unavailable.", "code": "unavailable" }
/api/public/forms/{form_id}/video/parts
Public · no auth
Presign more video parts
More presigned part URLs for an upload in progress (≤ 25 per call).
Rate limited.
Path parameters
|
form_id
string
required
|
— pattern: [0-9]+ |
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
token
string
required
|
The upload token from `init`. Required. max: 2048 |
|
from
integer
required
|
First part number wanted. Required. max: 10000 min: 1 |
|
to
integer
required
|
Last part number wanted (clamped to from+24). Required. max: 10000 min: 1 |
Responses
{ "success": true, "parts": [{ "n": 26, "url": "https://…" }] }
/api/public/forms/{form_id}/video/complete
Public · no auth
Complete a form video upload
Finish an upload. The server lists the parts, enforces the size cap and part shape, assembles the object, and sniffs it. On any failure the upload is discarded and the visitor gets a plain message.
Rate limited.
Path parameters
|
form_id
string
required
|
— pattern: [0-9]+ |
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
token
string
required
|
The upload token from `init`. Required. max: 2048 |
|
poster_uploaded
boolean
optional
|
Whether the browser PUT a poster JPEG. |
|
duration_seconds
integer
optional
|
Duration read by the browser, if known. max: 86400 min: 0 |
|
width
integer
optional
|
— max: 16384 min: 0 |
|
height
integer
optional
|
— max: 16384 min: 0 |
Responses
{ "success": true, "token": "…", "name": "IMG_4102.MOV", "size": 187342011, "duration_seconds": 74, "has_poster": true }
{ "success": false, "message": "That file doesn't look like a video. Please choose an MP4, MOV or WebM file.", "code": "not_a_video" }
/api/public/forms/{form_id}/video/abort
Public · no auth
Abort a form video upload
Cancel an upload in progress (best effort — the bucket lifecycle rule reaps anything this misses).
Rate limited.
Path parameters
|
form_id
string
required
|
— pattern: [0-9]+ |
Body parameters
|
token
string
optional
|
The upload token from `init`. Required. |
Responses
{ "success": true }
/api/public/forms/{form_id}/video/status
Public · no auth
Check a form video upload
Is a token still attached to a completed, unsubmitted upload? Used when a resumed session restores a token from autosave.
Rate limited.
Path parameters
|
form_id
string
required
|
— pattern: [0-9]+ |
Query parameters
|
token
string
optional
|
The upload token. Required. |
Responses
{ "success": true, "ok": true, "name": "IMG_4102.MOV", "size": 187342011, "duration_seconds": 74, "has_poster": true }
{ "success": true, "ok": false }
/api/public/google-lead-form/{account}
Signed webhook
Receive a Google Ads lead form lead
Receive a lead from a Google Ads lead form. Google sends the lead's answers, the campaign, ad group and ad it came from, its click id and the key set on the form; Landing checks the key against the ad account's own, saves the lead into the Landing form the form feeds (once, however often Google delivers it), and credits it to the ad. Google's test leads are saved and shown but start no follow-up. Set this up in Google Ads under the lead form's "Lead delivery" → webhook, with the address and key from Settings › Ad accounts.
Rate limited.
Path parameters
|
account
string
required
|
The ad account's id in Landing (in the address). pattern: [0-9]+ |
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
lead_id
string
required
|
Google's id for the lead. A lead already received is not saved again. max: 100 |
|
google_key
string
required
|
The key from Settings › Ad accounts, as set on the lead form. max: 200 |
|
user_column_data
object
optional
|
The answers: each with column_id (FULL_NAME, EMAIL, PHONE_NUMBER…), column_name and string_value. max: 100 |
|
form_id
string · identifier
optional
|
Google's id for the lead form. max: 64 |
|
campaign_id
string · identifier
optional
|
The campaign the lead came from. max: 64 |
|
adgroup_id
string · identifier
optional
|
The ad group (when Google sends it). max: 64 |
|
creative_id
string · identifier
optional
|
The ad (when Google sends it). max: 64 |
|
gcl_id
string
optional
|
Google's click id. max: 512 |
|
is_test
boolean
optional
|
True for a test lead sent from Google Ads: saved, never followed up. |
|
api_version
string
optional
|
Google's payload version. max: 20 |
Responses
curl -X POST https://landing.pivotal.digital/api/public/google-lead-form/42 \
-H "Content-Type: application/json" \
-d '{"lead_id": "TeSter-123", "google_key": "<key from Settings › Ad accounts>", "form_id": 4021, "campaign_id": 101,
"gcl_id": "Cj0KCQjw…", "is_test": true, "api_version": "1.0",
"user_column_data": [{"column_id": "FULL_NAME", "column_name": "Full Name", "string_value": "Sam Taylor"},
{"column_id": "EMAIL", "column_name": "User Email", "string_value": "sam@example.com"}]}'
{}
{ "message": "That key is not this account's." }
Landing Platform