Forms and leads
Save a new lead capture
metadata.fluid_session is best-effort here. A lead carries a real
person’s name, email and question, so a browser that cannot produce a
readable session token is not a reason to reject it: the captured
event falls back to its own UUID and the lead is still recorded.
Attribution is carried by metadata.attribution rather than the
session, so rep credit is unaffected by the fallback.
This is deliberately more forgiving than the other analytics events on
this API, which still require a readable session token. RequestMetadata
is shared with those operations, so the fs_... format it annotates on
fluid_session describes them rather than this one — a value that fails
it is still accepted here.
POST
/
api
/
public
/
v2025-06
/
events
/
leads
/
capture
Save a new lead capture
curl --request POST \
--url https://api.fluid.app/api/public/v2025-06/events/leads/capture \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"lead": {
"message": "Can Dunder Mifflin match our current paper supplier's price for 40 cases a month?",
"contact": {
"name": "Jan Levinson",
"email": "jan.levinson@serenitybyjan.com",
"phone": "+1 570 555 0143"
}
},
"page": {
"url": "https://shop.dundermifflin.com/pages/bulk-orders",
"title": "Bulk paper orders",
"description": "Volume pricing for offices of every size.",
"image": "https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg"
},
"metadata": {
"fluid_shop": "dunder-mifflin.fluid.app",
"fluid_session": "fs_7kQx9mR2vWbT4nHcJ8pLz3",
"fluid_locale": "en_US",
"attribution": {
"username": "dwight-schrute"
}
}
}
EOFimport requests
url = "https://api.fluid.app/api/public/v2025-06/events/leads/capture"
payload = {
"lead": {
"message": "Can Dunder Mifflin match our current paper supplier's price for 40 cases a month?",
"contact": {
"name": "Jan Levinson",
"email": "jan.levinson@serenitybyjan.com",
"phone": "+1 570 555 0143"
}
},
"page": {
"url": "https://shop.dundermifflin.com/pages/bulk-orders",
"title": "Bulk paper orders",
"description": "Volume pricing for offices of every size.",
"image": "https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg"
},
"metadata": {
"fluid_shop": "dunder-mifflin.fluid.app",
"fluid_session": "fs_7kQx9mR2vWbT4nHcJ8pLz3",
"fluid_locale": "en_US",
"attribution": { "username": "dwight-schrute" }
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
lead: {
message: 'Can Dunder Mifflin match our current paper supplier\'s price for 40 cases a month?',
contact: {
name: 'Jan Levinson',
email: 'jan.levinson@serenitybyjan.com',
phone: '+1 570 555 0143'
}
},
page: {
url: 'https://shop.dundermifflin.com/pages/bulk-orders',
title: 'Bulk paper orders',
description: 'Volume pricing for offices of every size.',
image: 'https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg'
},
metadata: {
fluid_shop: 'dunder-mifflin.fluid.app',
fluid_session: 'fs_7kQx9mR2vWbT4nHcJ8pLz3',
fluid_locale: 'en_US',
attribution: {username: 'dwight-schrute'}
}
})
};
fetch('https://api.fluid.app/api/public/v2025-06/events/leads/capture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/public/v2025-06/events/leads/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'lead' => [
'message' => 'Can Dunder Mifflin match our current paper supplier\'s price for 40 cases a month?',
'contact' => [
'name' => 'Jan Levinson',
'email' => 'jan.levinson@serenitybyjan.com',
'phone' => '+1 570 555 0143'
]
],
'page' => [
'url' => 'https://shop.dundermifflin.com/pages/bulk-orders',
'title' => 'Bulk paper orders',
'description' => 'Volume pricing for offices of every size.',
'image' => 'https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg'
],
'metadata' => [
'fluid_shop' => 'dunder-mifflin.fluid.app',
'fluid_session' => 'fs_7kQx9mR2vWbT4nHcJ8pLz3',
'fluid_locale' => 'en_US',
'attribution' => [
'username' => 'dwight-schrute'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/public/v2025-06/events/leads/capture"
payload := strings.NewReader("{\n \"lead\": {\n \"message\": \"Can Dunder Mifflin match our current paper supplier's price for 40 cases a month?\",\n \"contact\": {\n \"name\": \"Jan Levinson\",\n \"email\": \"jan.levinson@serenitybyjan.com\",\n \"phone\": \"+1 570 555 0143\"\n }\n },\n \"page\": {\n \"url\": \"https://shop.dundermifflin.com/pages/bulk-orders\",\n \"title\": \"Bulk paper orders\",\n \"description\": \"Volume pricing for offices of every size.\",\n \"image\": \"https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg\"\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/public/v2025-06/events/leads/capture")
.header("Content-Type", "application/json")
.body("{\n \"lead\": {\n \"message\": \"Can Dunder Mifflin match our current paper supplier's price for 40 cases a month?\",\n \"contact\": {\n \"name\": \"Jan Levinson\",\n \"email\": \"jan.levinson@serenitybyjan.com\",\n \"phone\": \"+1 570 555 0143\"\n }\n },\n \"page\": {\n \"url\": \"https://shop.dundermifflin.com/pages/bulk-orders\",\n \"title\": \"Bulk paper orders\",\n \"description\": \"Volume pricing for offices of every size.\",\n \"image\": \"https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg\"\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/public/v2025-06/events/leads/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"lead\": {\n \"message\": \"Can Dunder Mifflin match our current paper supplier's price for 40 cases a month?\",\n \"contact\": {\n \"name\": \"Jan Levinson\",\n \"email\": \"jan.levinson@serenitybyjan.com\",\n \"phone\": \"+1 570 555 0143\"\n }\n },\n \"page\": {\n \"url\": \"https://shop.dundermifflin.com/pages/bulk-orders\",\n \"title\": \"Bulk paper orders\",\n \"description\": \"Volume pricing for offices of every size.\",\n \"image\": \"https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg\"\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"metadata": {
"fluid_shop": "dunder-mifflin.fluid.app",
"fluid_session": "fs_7kQx9mR2vWbT4nHcJ8pLz3",
"fluid_locale": "en_US",
"request_uuid": "a7d3f1b8-2c6e-4a95-8b04-1e9c5d7f3a26",
"timestamp": "2026-09-14T15:33:05Z"
}
}⌘I
Save a new lead capture
curl --request POST \
--url https://api.fluid.app/api/public/v2025-06/events/leads/capture \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"lead": {
"message": "Can Dunder Mifflin match our current paper supplier's price for 40 cases a month?",
"contact": {
"name": "Jan Levinson",
"email": "jan.levinson@serenitybyjan.com",
"phone": "+1 570 555 0143"
}
},
"page": {
"url": "https://shop.dundermifflin.com/pages/bulk-orders",
"title": "Bulk paper orders",
"description": "Volume pricing for offices of every size.",
"image": "https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg"
},
"metadata": {
"fluid_shop": "dunder-mifflin.fluid.app",
"fluid_session": "fs_7kQx9mR2vWbT4nHcJ8pLz3",
"fluid_locale": "en_US",
"attribution": {
"username": "dwight-schrute"
}
}
}
EOFimport requests
url = "https://api.fluid.app/api/public/v2025-06/events/leads/capture"
payload = {
"lead": {
"message": "Can Dunder Mifflin match our current paper supplier's price for 40 cases a month?",
"contact": {
"name": "Jan Levinson",
"email": "jan.levinson@serenitybyjan.com",
"phone": "+1 570 555 0143"
}
},
"page": {
"url": "https://shop.dundermifflin.com/pages/bulk-orders",
"title": "Bulk paper orders",
"description": "Volume pricing for offices of every size.",
"image": "https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg"
},
"metadata": {
"fluid_shop": "dunder-mifflin.fluid.app",
"fluid_session": "fs_7kQx9mR2vWbT4nHcJ8pLz3",
"fluid_locale": "en_US",
"attribution": { "username": "dwight-schrute" }
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
lead: {
message: 'Can Dunder Mifflin match our current paper supplier\'s price for 40 cases a month?',
contact: {
name: 'Jan Levinson',
email: 'jan.levinson@serenitybyjan.com',
phone: '+1 570 555 0143'
}
},
page: {
url: 'https://shop.dundermifflin.com/pages/bulk-orders',
title: 'Bulk paper orders',
description: 'Volume pricing for offices of every size.',
image: 'https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg'
},
metadata: {
fluid_shop: 'dunder-mifflin.fluid.app',
fluid_session: 'fs_7kQx9mR2vWbT4nHcJ8pLz3',
fluid_locale: 'en_US',
attribution: {username: 'dwight-schrute'}
}
})
};
fetch('https://api.fluid.app/api/public/v2025-06/events/leads/capture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/public/v2025-06/events/leads/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'lead' => [
'message' => 'Can Dunder Mifflin match our current paper supplier\'s price for 40 cases a month?',
'contact' => [
'name' => 'Jan Levinson',
'email' => 'jan.levinson@serenitybyjan.com',
'phone' => '+1 570 555 0143'
]
],
'page' => [
'url' => 'https://shop.dundermifflin.com/pages/bulk-orders',
'title' => 'Bulk paper orders',
'description' => 'Volume pricing for offices of every size.',
'image' => 'https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg'
],
'metadata' => [
'fluid_shop' => 'dunder-mifflin.fluid.app',
'fluid_session' => 'fs_7kQx9mR2vWbT4nHcJ8pLz3',
'fluid_locale' => 'en_US',
'attribution' => [
'username' => 'dwight-schrute'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/public/v2025-06/events/leads/capture"
payload := strings.NewReader("{\n \"lead\": {\n \"message\": \"Can Dunder Mifflin match our current paper supplier's price for 40 cases a month?\",\n \"contact\": {\n \"name\": \"Jan Levinson\",\n \"email\": \"jan.levinson@serenitybyjan.com\",\n \"phone\": \"+1 570 555 0143\"\n }\n },\n \"page\": {\n \"url\": \"https://shop.dundermifflin.com/pages/bulk-orders\",\n \"title\": \"Bulk paper orders\",\n \"description\": \"Volume pricing for offices of every size.\",\n \"image\": \"https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg\"\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/public/v2025-06/events/leads/capture")
.header("Content-Type", "application/json")
.body("{\n \"lead\": {\n \"message\": \"Can Dunder Mifflin match our current paper supplier's price for 40 cases a month?\",\n \"contact\": {\n \"name\": \"Jan Levinson\",\n \"email\": \"jan.levinson@serenitybyjan.com\",\n \"phone\": \"+1 570 555 0143\"\n }\n },\n \"page\": {\n \"url\": \"https://shop.dundermifflin.com/pages/bulk-orders\",\n \"title\": \"Bulk paper orders\",\n \"description\": \"Volume pricing for offices of every size.\",\n \"image\": \"https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg\"\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/public/v2025-06/events/leads/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"lead\": {\n \"message\": \"Can Dunder Mifflin match our current paper supplier's price for 40 cases a month?\",\n \"contact\": {\n \"name\": \"Jan Levinson\",\n \"email\": \"jan.levinson@serenitybyjan.com\",\n \"phone\": \"+1 570 555 0143\"\n }\n },\n \"page\": {\n \"url\": \"https://shop.dundermifflin.com/pages/bulk-orders\",\n \"title\": \"Bulk paper orders\",\n \"description\": \"Volume pricing for offices of every size.\",\n \"image\": \"https://cdn.fluid.app/uploads/dunder-mifflin/pages/bulk-orders/hero.jpg\"\n },\n \"metadata\": {\n \"fluid_shop\": \"dunder-mifflin.fluid.app\",\n \"fluid_session\": \"fs_7kQx9mR2vWbT4nHcJ8pLz3\",\n \"fluid_locale\": \"en_US\",\n \"attribution\": {\n \"username\": \"dwight-schrute\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"metadata": {
"fluid_shop": "dunder-mifflin.fluid.app",
"fluid_session": "fs_7kQx9mR2vWbT4nHcJ8pLz3",
"fluid_locale": "en_US",
"request_uuid": "a7d3f1b8-2c6e-4a95-8b04-1e9c5d7f3a26",
"timestamp": "2026-09-14T15:33:05Z"
}
}