outbound. mail. contact_ add
Add a contact who has agreed to be contacted and check their email address.
0 credits. Free: setup.
Example prompt
Send this to your AI app when Heelo is connected:
Add [email protected] as a contact. She signed up through the form on our website.
Input fields
| Field | Type | Description |
|---|---|---|
emailRequired | string | The person's email address. It is verified when added: an address that a verifier calls undeliverable cannot be enrolled. |
authorisation_sourceRequired | string | How the person agreed to be contacted, for example 'signup form on example.com'. |
authorisation_evidenceRequired | string | Where that agreement is recorded, for example the form submission's URL or id. |
full_name | string | The person's full name. It replaces {{full_name}} in a sequence's templates. |
role | string | The person's job title. |
company_domain | string | The domain of the person's company, for example example.com. It replaces {{company_domain}} in a sequence's templates. |
jurisdiction | string | The person's country, as a two-letter code. Mail goes only to US, CA and GB (or UK) contacts; a new contact without one is UNKNOWN and is not mailed. |
subscriber_type | "individual" | "corporate" | "unknown" | individual or corporate. A GB contact is mailed only when corporate, or individual with express consent. A new contact without one is unknown. |
email_pattern | string | The company's address pattern, for example first.last. Give it only when it is the real one. |
Code
The call with the input fields that the tool needs. Replace each word in capitals, such as AUTHORISATION_SOURCE. Set HEELO_API_KEY to your API key.
import os
import requests
response = requests.post(
"https://toolsprimitives.uk/v1/tools/outbound.mail.contact_add/invoke",
headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
json={"input": {
"email": "[email protected]",
"authorisation_source": "AUTHORISATION_SOURCE",
"authorisation_evidence": "AUTHORISATION_EVIDENCE",
}},
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/outbound.mail.contact_add/invoke", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HEELO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
input: {
"email": "[email protected]",
"authorisation_source": "AUTHORISATION_SOURCE",
"authorisation_evidence": "AUTHORISATION_EVIDENCE"
},
}),
signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());