curl --request POST \
--url https://api.vacademy.ai/catalog/v1/leads \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"full_name": "Asha Rao",
"email": "[email protected]"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({full_name: 'Asha Rao', email: '[email protected]'})
};
fetch('https://api.vacademy.ai/catalog/v1/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vacademy.ai/catalog/v1/leads"
payload = {
"full_name": "Asha Rao",
"email": "[email protected]"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "duplicate"
}Send an enquiry
Saves an enquiry into the institute’s CRM, exactly like the hosted catalogue’s enquiry form. Call it from your server and pass the visitor’s IP in X-Client-IP.
Scope: leads:write. Limits: 30 per minute per key, and 5 per minute per visitor IP. Never cached.
curl --request POST \
--url https://api.vacademy.ai/catalog/v1/leads \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"full_name": "Asha Rao",
"email": "[email protected]"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({full_name: 'Asha Rao', email: '[email protected]'})
};
fetch('https://api.vacademy.ai/catalog/v1/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vacademy.ai/catalog/v1/leads"
payload = {
"full_name": "Asha Rao",
"email": "[email protected]"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "duplicate"
}Authorizations
Your publishable Catalogue API key (vak_pub_…).
Headers
The visitor's IP, for the per-visitor limit. Server-side calls only; ignored on browser calls (the network address is used).
Body
1-200 characters.
200A valid email address, at most 254 characters.
254Digits with optional +, spaces, (), -, .; 6-24 characters, at least 6 digits. E.g. +91 98765 43210.
At most 2,000 characters.
2000A course id from this API. Must be a published course of the institute.
CRM campaign to file the enquiry under. An unknown or inactive id silently falls back to the default "Course Catalogue Leads" list.
Where on your site the form is, e.g. homepage-hero. At most 100 characters.
100Up to 30 extra fields. Keys: 1-64 letters, digits, spaces, _, -, .. Values: text, number or boolean, at most 1,000 characters. Reserved keys (any case, 400 if used): full_name, fullname, name, email, phone, mobile, mobile_number, message, source, course_id.
Show child attributes
Show child attributes
Response
Duplicate: already in this campaign. Nothing new was saved.
received: a new enquiry was saved (HTTP 201). duplicate: this person already enquired in this campaign, or the institute's duplicate rules matched (HTTP 200). Treat both as success.
received, duplicate