validation. run. approve_ contacts
Record approval of the contacts and the lawful basis for outreach so sending can begin.
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 contacts of my validation run that you showed me. Approve them. I will tell you the lawful basis.
Input fields
| Field | Type | Description |
|---|---|---|
run_idRequired | string | |
versionRequired | string | data.review.version from validation.run.status, unchanged |
approved_byRequired | string | Your user's name: the person who said yes |
lawful_basisRequired | string | Your user's choice, one of data.review.content.lawful_bases.allowed (express, implied, legitimate_interest); never choose it for them |
sourceRequired | string | Where the lawful basis comes from, your user's words |
Code
The call with the input fields that the tool needs. Replace each word in capitals, such as RUN_ID. Set HEELO_API_KEY to your API key.
import os
import requests
response = requests.post(
"https://toolsprimitives.uk/v1/tools/validation.run.approve_contacts/invoke",
headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
json={"input": {
"run_id": "RUN_ID",
"version": "VERSION",
"approved_by": "APPROVED_BY",
"lawful_basis": "LAWFUL_BASIS",
"source": "SOURCE",
}},
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/validation.run.approve_contacts/invoke", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HEELO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
input: {
"run_id": "RUN_ID",
"version": "VERSION",
"approved_by": "APPROVED_BY",
"lawful_basis": "LAWFUL_BASIS",
"source": "SOURCE"
},
}),
signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());