const options = {
method: "POST",
headers: {
"x-api-key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
leadId: "a9d0a790-201b-47e9-84ed-cc7eed1270c5",
eventType: "sales_call",
title: "Intro call – SBA loan interest",
description:
"Successful intro call. Borrower runs Pacific Coast Container Haulers (drayage at Port of Long Beach). In business 4 years, ~8 employees, ~$1.2M revenue. Interested in SBA 7(a) to refinance equipment and add a truck (~$180–220K). Next step: collect last two years of tax returns.",
metadata: {
durationMinutes: 25,
outcome: "positive",
loanType: "SBA",
nextStep: "Request last 2 years of tax returns",
followUpDays: 2,
},
}),
};
fetch("https://api-v2.getomni.ai/api/v1/activity", options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));