cURL
curl --request POST \ --url https://api.kakiyo.com/v1/prospects \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "campaignId": "campaign_12345abcde", "name": "John Smith", "url": "https://linkedin.com/in/johnsmith", "additionalFields": [ { "fieldName": "company", "fieldValue": "Acme Inc" } ] } '
{ "message": "Prospect added successfully" }
Adds a single prospect to a campaign
curl -X POST "https://api.kakiyo.com/v1/prospects" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "campaignId": "campaign_12345abcde", "name": "John Smith", "url": "https://linkedin.com/in/johnsmith", "additionalFields": [ { "fieldName": "company", "fieldValue": "TechCorp Inc" }, { "fieldName": "title", "fieldValue": "VP of Sales" } ] }'
// JavaScript/Node.js const addProspect = async (prospectData) => { const response = await fetch('https://api.kakiyo.com/v1/prospects', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify(prospectData) }); return await response.json(); }; // Usage example const newProspect = await addProspect({ campaignId: 'campaign_12345abcde', name: 'John Smith', url: 'https://linkedin.com/in/johnsmith', additionalFields: [ { fieldName: 'company', fieldValue: 'TechCorp Inc' }, { fieldName: 'title', fieldValue: 'VP of Sales' } ] }); console.log('Prospect Added:', newProspect);
# Python import requests def add_prospect(prospect_data): """Add a single prospect to a campaign""" response = requests.post( 'https://api.kakiyo.com/v1/prospects', json=prospect_data, headers={ 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } ) return response.json() # Usage example prospect_data = { 'campaignId': 'campaign_12345abcde', 'name': 'John Smith', 'url': 'https://linkedin.com/in/johnsmith', 'additionalFields': [ { 'fieldName': 'company', 'fieldValue': 'TechCorp Inc' }, { 'fieldName': 'title', 'fieldValue': 'VP of Sales' } ] } result = add_prospect(prospect_data) print('Prospect Added:', result)
// Example: Sync from CRM to Kakiyo const syncProspectFromCRM = async (crmProspect, campaignId) => { const kakiyoProspect = { campaignId: campaignId, name: `${crmProspect.firstName} ${crmProspect.lastName}`, url: crmProspect.linkedinUrl, additionalFields: [ { fieldName: 'company', fieldValue: crmProspect.company }, { fieldName: 'title', fieldValue: crmProspect.jobTitle }, { fieldName: 'crmId', fieldValue: crmProspect.id } ] }; return await addProspect(kakiyoProspect); };
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Prospect to add
"campaign_12345abcde"
"John Smith"
"https://linkedin.com/in/johnsmith"
Show child attributes
Prospect added successfully
"Prospect added successfully"