acquisition. campaign. approve
Approve a campaign and start sending its emails.
Charged by the tools it calls. 5 per e-mail sent.
Example prompt
Send this to your AI app when Heelo is connected:
I checked the people and the e-mails that you showed me. Approve my campaign and start sending. I will tell you the lawful basis.
Input fields
| Field | Type | Description |
|---|---|---|
campaign_idRequired | string | The campaign's id, from acquisition.campaign.create or acquisition.campaign.list. |
review_digestRequired | string | review.review_digest from acquisition.campaign.status: it proves which review was approved. |
lawful_basisRequired | "express" | "implied" | "legitimate_interest" | The basis for mailing these people, as the user states it. Canada (CA) needs express or implied. Ask the user; never choose it yourself. |
consent_sourceRequired | string | Where the basis comes from, in the user's words, for example 'B2B: a public role at the company, and our product addresses the pain they posted about'. |
consent_evidence_urlRequired | string | Where the user keeps the record of that basis: a URL or a document reference. |
approved_byRequired | string | The name of the person who approves the send. |
exclude_contact_ids | array of string | Contacts from the review that must not be mailed. |
confirm | boolean | Leave it out first: the answer is the draft of what will be sent. Set it to true only after the user has seen the review and said yes; nothing is sent before. |
Code
The call with the input fields that the tool needs. Replace each word in capitals, such as CAMPAIGN_ID. Set HEELO_API_KEY to your API key.
import os
import requests
response = requests.post(
"https://toolsprimitives.uk/v1/tools/acquisition.campaign.approve/invoke",
headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
json={"input": {
"campaign_id": "CAMPAIGN_ID",
"review_digest": "REVIEW_DIGEST",
"lawful_basis": "express",
"consent_source": "CONSENT_SOURCE",
"consent_evidence_url": "https://example.com",
"approved_by": "APPROVED_BY",
}},
timeout=120,
)
response.raise_for_status()
print(response.json())// Node.js 18 or newer, in an ES module.
const response = await fetch("https://toolsprimitives.uk/v1/tools/acquisition.campaign.approve/invoke", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HEELO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
input: {
"campaign_id": "CAMPAIGN_ID",
"review_digest": "REVIEW_DIGEST",
"lawful_basis": "express",
"consent_source": "CONSENT_SOURCE",
"consent_evidence_url": "https://example.com",
"approved_by": "APPROVED_BY"
},
}),
signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());