Any tool that can send an HTTP request can put leads and contacts into GuardenerAI. This is a connection you build with the public API, not a native integration: create a key with Read and write scope, search for the person by email, then create a new lead or update the one you found.
Not a native integration. Your tool sends JSON to your workspace’s API. Records land in GuardenerAI. Nothing is sent back automatically.
https://YOUR-ORG.guardenerai.com. The API lives under /api/ on it.In GuardenerAI open Settings, API keys. Under Create key, give it a name you will recognise later, set Role to Member (read and write records) and Scope to Read and write, then choose Create key. The key is shown once, so copy it into your tool’s secret store straight away.
There is no upsert, so ask before you write. Filter leads by exact email. The match is case-sensitive, so lower-case emails before you send them. The answer is a page of results: if totalElements is above zero, content[0].id is the lead to update.
curl "https://YOUR-ORG.guardenerai.com/api/leads?filter=email:equals:dana%40fernhill.example" --header "X-Api-Key: $GUARDENERAI_KEY"const email = 'dana@fernhill.example';
const res = await fetch(
'https://YOUR-ORG.guardenerai.com/api/leads?filter=email:equals:' + encodeURIComponent(email),
{ headers: { 'X-Api-Key': process.env.GUARDENERAI_KEY } },
);
const page = await res.json();
const match = page.totalElements > 0 ? page.content[0] : null; firstName, lastName and email are required. Put free text such as a form message in message, and record where the lead came from in sourceMedium and sourceCampaign. The source field only accepts codes from your workspace’s lead source list, so leave it out unless an admin has set one up. A new lead starts at status New.
curl -X POST "https://YOUR-ORG.guardenerai.com/api/leads" --header "X-Api-Key: $GUARDENERAI_KEY" --header "Content-Type: application/json" --data '{
"firstName": "Dana",
"lastName": "Whitlock",
"email": "dana@fernhill.example",
"phone": "+1 555 0142",
"company": "Fernhill Dental",
"message": "Asked about moving off spreadsheets.",
"sourceMedium": "web form",
"sourceCampaign": "pricing page"
}'const res = await fetch('https://YOUR-ORG.guardenerai.com/api/leads', {
method: 'POST',
headers: {
'X-Api-Key': process.env.GUARDENERAI_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
firstName: 'Dana',
lastName: 'Whitlock',
email: 'dana@fernhill.example',
phone: '+1 555 0142',
company: 'Fernhill Dental',
message: 'Asked about moving off spreadsheets.',
sourceMedium: 'web form',
sourceCampaign: 'pricing page',
}),
}); An update is a PUT to /api/leads/{id}, and it replaces the whole record. Read the lead, change the fields you need, and send all of it back. Fields you leave out are cleared.
201 means created and 200 means updated. 409 duplicate_blocked means one of your duplicate rules matched, and the body lists the matches: update one of them instead. 429 means you went over the rate limit: wait the one second in Retry-After and try again. 403 api_key_read_only means the key cannot write.
message field instead.Retry-After: 1, so wait a second and retry.PUT replaces the whole record. Send every field you want to keep, not only the one that changed.duplicate_blocked with the matching records. Update the match instead of forcing a second copy.We use analytics cookies to see which pages help and which don't. No advertising cookies. How we use them