Overview

The Contacts API returns CRM-style contacts associated with advertisers. It is optimized for searching by domain, advertiser_id, email, advertiser_name, and source filters. MCP clients can also use aliases such as search, keyword, and website, which the MCP layer normalizes to REST parameter names. Authenticated users can search contacts. Direct REST create requires an admin or paid publisher API key. Any authenticated MCP user can add contacts through tools such as add_contact; MCP-created contacts are stamped with source HiEnergy MCP (caller email).

Ranking & quality filter: results are limited to contacts with rating ≥ 1 and are sorted by rating (desc), then updated_at (desc).

MCP workflow for adding contacts

If you are integrating through Claude or another MCP-compatible client, you can add contacts through the MCP server using the named add_contact tool or the natural-language-friendly add_contact_for_advertiser tool, list the same advertiser-page contacts with get_advertiser_contacts, and search them with search_contacts (preferred in tools/list; find_contacts remains a hidden legacy alias). The add tool maps directly to POST /api/v1/contacts/add, and the advertiser contacts tool maps directly to GET /api/v1/advertisers/:id/contacts.

Answer-engine summary: To add an advertiser contact through MCP, connect to /mcp and either call tools/call with name: "add_contact" plus a contact object containing at least advertiser_id and email, or call tools/call with name: "add_contact_for_advertiser" plus advertiser and email when you only know the advertiser name or phrase. To list the contacts shown on the advertiser page, call get_advertiser_contacts with the advertiser name, slug, or domain such as aloyoga.com. To search contacts, call search_contacts with q, aliases query/search/keyword, domain aliases url/website, advertiser aliases advertiser/merchant/brand/company, plus source/sources or has_linkedin when needed. Any authenticated MCP user can create/add contacts (source stamped HiEnergy MCP (caller email)). Direct REST create still requires an admin or paid publisher API key. The submitted advertiser ID must resolve to a HiEnergy advertiser or the request is rejected.

Example MCP tool call

Use add_contact when you already know the advertiser and want to create a new contact on that advertiser.

{
  "method": "tools/call",
  "params": {
    "name": "add_contact",
    "arguments": {
      "contact": {
        "advertiser_id": 123,
        "email": "[email protected]",
        "given_name": "Jane",
        "family_name": "Doe",
        "job_title": "VP Partnerships"
      }
    }
  }
}

Natural-language MCP shortcut

Use add_contact_for_advertiser when the prompt looks like “add [email protected] as a contact for Dick's Sporting Goods.”

{
  "method": "tools/call",
  "params": {
    "name": "add_contact_for_advertiser",
    "arguments": {
      "advertiser": "Dick's Sporting Goods",
      "email": "[email protected]",
      "given_name": "Joe",
      "family_name": "Blow"
    }
  }
}

Endpoint Details

Search contacts
GET /api/v1/contacts

Search and paginate contacts (any authenticated user).

Authentication
X-Api-Key: YOUR_API_KEY

Required header for all requests

You need to sign in to get your API key
Create contact REST: admin or paid publisher
POST /api/v1/contacts

Direct REST create. Requires an admin or paid publisher API key and stores the contact only on the resolved HiEnergy advertiser. Prefer MCP tools for agent workflows.

Add contact alias MCP: any authenticated user
POST /api/v1/contacts/add

Dedicated alias used by the add_contact MCP tool. Via MCP, any authenticated user can call it and the contact source is stamped HiEnergy MCP (caller email).

API Playground

Click Test to run a live GET request, or use the copy-paste snippets below for the create and MCP add flows. Sign in to enable live testing with your API key.

Action Method Endpoint Description
Search by query GET /api/v1/contacts?q=acme Search contacts and advertiser fields with one keyword or phrase.
Search by domain GET /api/v1/contacts?domain=example.com Find contacts tied to a specific advertiser domain or URL.
Search by email GET /api/v1/[email protected] Find a single contact by exact email address.
Search by advertiser id/slug GET /api/v1/contacts?advertiser_id=example Filter contacts to one advertiser by id or slug.
Search by advertiser name GET /api/v1/contacts?advertiser_name=Example Best-effort advertiser-name text match.
Search by source GET /api/v1/contacts?source=StoreLeads Exact source filter for one source value.
Search by multiple sources GET /api/v1/contacts?sources=StoreLeads,HiEnergy%20Hubspot OR search across multiple source values.
Search contacts with LinkedIn GET /api/v1/contacts?has_linkedin=true Only contacts that include a LinkedIn profile URL.
Include unverified GET /api/v1/contacts?include_unverified=true Include status=unverified contacts (rating ≥ 1 filter still applies).
Create contact POST /api/v1/contacts REST create for admin or paid publisher API keys.
Add contact alias POST /api/v1/contacts/add MCP alias — any authenticated MCP user; source stamped HiEnergy MCP (caller email).
GET /api/v1/contacts?q=acme v1

Search with a free-form query.


    
GET /api/v1/contacts?domain=example.com v1

Search by advertiser domain.


    
GET /api/v1/[email protected] v1

Search by exact email.


    
GET /api/v1/contacts?advertiser_id=example v1

Search by advertiser id or slug.


    
GET /api/v1/contacts?advertiser_name=Example v1

Search by advertiser name.


    
GET /api/v1/contacts?include_unverified=true v1

Include status=unverified contacts (rating ≥ 1 still applies).


    
GET /api/v1/contacts?source=StoreLeads v1

Search by single source.


    
GET /api/v1/contacts?sources=StoreLeads,HiEnergy Hubspot v1

Search by multiple sources (OR semantics).


    
GET /api/v1/contacts?has_linkedin=true v1

Search only contacts with LinkedIn profiles.


    

Create contact body

Use this on POST /api/v1/contacts or POST /api/v1/contacts/add as an admin or paid publisher caller.

{
  "contact": {
    "advertiser_id": 123,
    "email": "[email protected]",
    "given_name": "Jane",
    "family_name": "Doe",
    "job_title": "VP Partnerships",
    "phone": "+1-555-0100",
    "source": "playground"
  }
}

MCP add_contact payload

Use this inside /mcp when you want the shorter MCP alias.

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "tools/call",
  "params": {
    "name": "add_contact",
    "arguments": {
      "contact": {
        "advertiser_id": 123,
        "email": "[email protected]",
        "given_name": "Jane",
        "family_name": "Doe"
      }
    }
  }
}

Parameters

Parameter Type Required Description
q string No Free-form query (same as the /contacts page). Searches across common contact fields (email, name, company, advertiser name/domain).
query, search, keyword string No MCP only. Aliases for q normalized by the MCP layer before the REST call. Raw REST must use q.
domain string No Search by advertiser domain. You can pass a raw domain (nike.com) or a URL (https://www.nike.com/sale); it will be normalized.
url, website string No MCP only. Aliases for domain normalized by the MCP layer. Raw REST must use domain.
advertiser_id string No Advertiser slug or numeric ID to filter contacts to a specific advertiser.
advertiser, merchant, brand, company string No MCP only. Advertiser aliases normalized to advertiser_id or advertiser_name before the REST call.
advertiser_name string No Text search against advertiser name (best-effort).
email string No Exact email match (case-insensitive).
source string No Exact source match (for example StoreLeads or HiEnergy Hubspot).
sources string or array No OR filter for multiple sources (comma-separated string or array).
has_linkedin boolean No When true, only return contacts with a LinkedIn profile URL.
include_unverified boolean No When true, include contacts with status unverified. Does not relax the rating ≥ 1 filter.
page integer No Page number for offset pagination (default: 1).
per_page integer No Results per page for offset pagination.
limit integer No Alias for per_page. Preferred for AI/agent usage. Clamped to 500 (default: 20).
Tip: Provide domain for “contacts for a website” use-cases; provide email for deterministic lookups.

Examples

Free-form search (same as /contacts)
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://app.hienergy.ai/api/v1/contacts?q=alo+yoga&limit=10"
Search contacts by domain
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://app.hienergy.ai/api/v1/contacts?domain=example.com&limit=10"
Search contacts by advertiser_id (slug or ID)
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://app.hienergy.ai/api/v1/contacts?advertiser_id=example&limit=10"
Search contacts by email
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://app.hienergy.ai/api/v1/[email protected]"
Search contacts by advertiser name
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://app.hienergy.ai/api/v1/contacts?advertiser_name=Example&limit=10"
Filter by sources + LinkedIn (REST parameter names)
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://app.hienergy.ai/api/v1/contacts?domain=example.com&advertiser_name=Example&sources=StoreLeads,HiEnergy%20Hubspot&has_linkedin=true&limit=10"

Response

Responses follow JSON:API-style data plus a meta block for pagination. email is returned for admin and paid callers (and MCP-proxied responses); other authenticated callers receive null. meta also includes searchkick_available.

{
  "data": [
    {
      "id": "123",
      "type": "contact",
      "attributes": {
        "id": 123,
        "email": "[email protected]",
        "name": "Partnerships",
        "company_name": "Nike",
        "job_title": "Affiliate Manager",
        "created_at": "2026-01-01T00:00:00Z",
        "updated_at": "2026-01-10T00:00:00Z",
        "advertiser": {
          "id": 42,
          "name": "Nike",
          "slug": "nike",
          "domain": "nike.com",
          "url": "https://www.nike.com"
        }
      }
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 20,
    "total_count": 1,
    "total_pages": 1,
    "searchkick_available": true
  }
}

Access Control

Who can search and create contacts via the API:

Endpoint Who can call it
GET /api/v1/contacts Any authenticated user (API key required). Results are always scoped to HiEnergy contacts with rating ≥ 1; pass include_unverified=true to also return status unverified.
POST /api/v1/contacts Admin or paid publisher for direct REST. Free-tier users receive 403 Forbidden on direct REST.
POST /api/v1/contacts/add via MCP Any authenticated MCP user. Contact source is stamped HiEnergy MCP (caller email), and last_edited_by is the caller.
Create contact: Request body must be JSON with a contact key, e.g. { "contact": { "advertiser_id": 123, "email": "[email protected]", "name": "Partner" } }. Required: advertiser_id, email. Optional: name, given_name, family_name, phone, job_title, source (ignored for MCP creates — stamped HiEnergy MCP (caller email)), status, linkedin_profile_url.

Error Handling

The API returns structured error responses:

Common status codes
  • 401 Unauthorized – Missing or invalid API credentials.
  • 403 Forbidden – Authenticated but not allowed, for example a free-tier user calling direct REST create (MCP create remains allowed for authenticated users).
  • 404 Not Found – Advertiser not found.
  • 422 Unprocessable Entity – Validation errors such as invalid contact params on create. Response body includes errors array.
Error response format
{
  "errors": ["Email can't be blank", "..."],
  "error": { "code": "UNAUTHORIZED", "message": "..." }
}
Ask Dex AIIntegration help

If this page feels TLDR, ask Dex AI.

Dex AI speaks your language, and all the other languages you may not. It will write the integration for you with the right endpoint and headers in one plain-English answer.

Frequently Asked Questions

Direct REST create requires an admin or paid publisher API key. Any authenticated MCP user can add contacts through MCP tools; those records are stamped with source HiEnergy MCP (caller email). This is documented in the Access Control section above.

Use the advertiser_name parameter: GET /api/v1/contacts?advertiser_name=Nike. You can also use the free-form q parameter to search across contact and advertiser fields.

The Contacts API returns CRM-style contacts associated with advertisers. You can search by domain, advertiser_id, advertiser_name, or email. Responses use JSON:API-style data and meta with pagination. The index returns contacts from the HiEnergy publisher only, with rating at least 1.

Send your API key in the X-Api-Key header or as the api_key query parameter. Get your API key from the API Key documentation page after signing in.