Skip to content

Docs / All tools / Loop II: Acquisition

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

FieldTypeDescription
emailRequiredstringThe person's email address. It is verified when added: an address that a verifier calls undeliverable cannot be enrolled.
authorisation_sourceRequiredstringHow the person agreed to be contacted, for example 'signup form on example.com'.
authorisation_evidenceRequiredstringWhere that agreement is recorded, for example the form submission's URL or id.
full_namestringThe person's full name. It replaces {{full_name}} in a sequence's templates.
rolestringThe person's job title.
company_domainstringThe domain of the person's company, for example example.com. It replaces {{company_domain}} in a sequence's templates.
jurisdictionstringThe 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_patternstringThe 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())