Skip to content

Docs / All tools / Loop II: Acquisition

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

FieldTypeDescription
campaign_idRequiredstringThe campaign's id, from acquisition.campaign.create or acquisition.campaign.list.
review_digestRequiredstringreview.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_sourceRequiredstringWhere 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_urlRequiredstringWhere the user keeps the record of that basis: a URL or a document reference.
approved_byRequiredstringThe name of the person who approves the send.
exclude_contact_idsarray of stringContacts from the review that must not be mailed.
confirmbooleanLeave 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())