cURL
JavaScript
Python
Copy
curl -X POST "https://helstify.com/api/v1/businesses/60/marketing/contacts" \
-H "Authorization: Bearer $HELSTIFY_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"sam@example.com","first_name":"Sam","lists":[4],"fields":{"city":"Pune"},"consent":true,"consent_source":"Checkout opt-in, 9 Nov 2026"}'
const res = await fetch("https://helstify.com/api/v1/businesses/60/marketing/contacts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HELSTIFY_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"email": "sam@example.com",
"first_name": "Sam",
"lists": [
4
],
"fields": {
"city": "Pune"
},
"consent": true,
"consent_source": "Checkout opt-in, 9 Nov 2026"
}),
});
const data = await res.json();
import os, requests
res = requests.post(
"https://helstify.com/api/v1/businesses/60/marketing/contacts",
headers={"Authorization": f"Bearer {os.environ['HELSTIFY_KEY']}"},
json={
"email": "sam@example.com",
"first_name": "Sam",
"lists": [
4
],
"fields": {
"city": "Pune"
},
"consent": True,
"consent_source": "Checkout opt-in, 9 Nov 2026"
},
)
print(res.json())
Response 201
{
"id" : 2210 ,
"email" : "sam@example.com" ,
"first_name" : "Sam" ,
"last_name" : null ,
"status" : "subscribed" ,
"source" : "api" ,
"fields" : {
"city" : "Pune"
}
}