PlatformDocs

Email campaigns

Add every matching lead to an email campaign automatically.

Authenticated with ?privateKey=YOUR_KEY (see Authentication).

POST/admin/automationsCreate a new automation
GET/admin/automationsGet all automations for a website
PATCH/admin/automations/{id}Enable or disable an automation
GET/admin/email-campaignsGet all email campaigns for a website
POST/admin/automations
Try:
Request body
NameName of the automation
Is ActiveWhether automation is active
WebsiteWebsite ID this automation belongs to
FilterFilter criteria for leads
Trigger
WhenEvent that triggers the automation
ThenAction to perform
Interval
Contact Persona
Roles
Excluded Roles
Email Verification
Allow Only Valid Emails
Allow Catch All Emails
Allow Guessed Emails
Allow Without Emails
Contact Selection Strategy
Max Contacts To SendMost contacts sent per company each time the automation runs.
ActionsAction-specific configurations
Sent To Slack
Send Messages ToSlack channel, e.g.
Message TemplateMessage with merge fields such as {{lead.company.name}} and {{lead.person.firstName}}; empty uses the saved template
How Many To Add
Sent To Webhook
Url
When To Push
Send To Clay
UrlThe webhook URL of your Clay table
When To Push
Sent To Email Campaign
Email CampaignCampaign ID from GET /admin/email-campaigns
Email Accounts
Sent To HubspotEach lead is pushed as a contact linked to its company (found by domain, or created), owned by assignContactsTo. With createDeal, a deal is also created in pipelineId at dealStageId, linked to the contact and company; a lead that already has an open deal in that pipeline is not given a second one.
ActionKept for older callers; every push creates the contact and its company. Deals are set with createDeal.
Assign Contacts ToOwner ID from GET /v3/crm/owners. Also owns the deal.
Create DealAlso create a deal named "<Company> — Website visitor". Needs pipelineId and dealStageId.
Pipeline IdDeal pipeline ID from GET /v3/crm/pipelines?crm=hubspot
Deal Stage IdStage ID of that pipeline (its stages[].id) the deal starts in
Deal AmountOptional amount set on every deal
Sent To Pipedrive
Assign Contacts To
Sent To Salesforce
Assign Contacts To
Sent To Zoho
Assign Contacts To
Sent To Go High Level
Assign Contacts To
Create Opportunity
Pipeline Id
Pipeline Stage Id
Opportunity Status
Tags
curl -X POST "https://rest-dash.revealid.xyz/admin/automations?privateKey=YOUR_KEY" \  -H "Content-Type: application/json" \  -d '{  "name": "Docs example: send-to-emailCampaign",  "isActive": true,  "website": "64b7f0a1c2d3e4f5a6b7c8d9",  "when": "new-lead-is-identified",  "then": "send-to-emailCampaign",  "interval": "immediately",  "actions": {    "sentToEmailCampaign": {      "emailCampaign": "6a3f00000000000000000004"    }  }}'
Response
Press Send request to try it with sample data.

What each field accepts

FieldTypeLimits and formatAccepted values
name*string—any
isActive*boolean—any
website*string—any
filterobject—any
triggerstringdefault "only-on-first-visit"only-on-first-visiton-every-visitnone
when*string—
Show all 7 valuesnew-lead-is-identifiednew-intent-data-triggerednew-prospector-leadnew-web-scraping-signalnew-scout-leadnew-linkedin-engagementnew-tag-added-to-lead
then*string—
Show all 16 valuessend-to-slacksend-to-hubspotsend-to-pipedrivesend-to-salesforcesend-to-zohosend-to-gohighleveltrigger-webhooksend-to-zapiersend-to-claysend-to-emailCampaignsend-to-linkedinCampaignsend-email-alertsend-csv-on-emailsend-to-googleAdsCampaignsend-to-linkedinAdsAudiencesend-to-metaAdsAudience
intervalstringdefault "daily"immediatelyafter-sessiondailyweeklymonthly
contactPersonaobject—any
contactPersona.rolesstring[]—any
contactPersona.excludedRolesstring[]—any
emailVerificationobject—any
emailVerification.allowOnlyValidEmailsbooleandefault falseany
emailVerification.allowCatchAllEmailsbooleandefault falseany
emailVerification.allowGuessedEmailsbooleandefault trueany
emailVerification.allowWithoutEmailsbooleandefault falseany
contactSelectionStrategystringdefault "exact-job-titles"exact-job-titlesflexible-job-titlesflexible-find-at-least-one-job-titles
maxContactsToSendintegermin 1 · whole number · default 5any
actionsobject—any
actions.sentToSlackobject—any
actions.sentToSlack.sendMessagesTostring—any
actions.sentToSlack.messageTemplatestring—any
actions.sentToSlack.howManyToAddintegerwhole numberany
actions.sentToWebhookobject—any
actions.sentToWebhook.urlstring—any
actions.sentToWebhook.whenToPushstring—every-timeonly-with-suggested-contacts
actions.sendToClayobject—any
actions.sendToClay.urlstring—any
actions.sendToClay.whenToPushstring—every-timeonly-with-suggested-contacts
actions.sentToEmailCampaignobject—any
actions.sentToEmailCampaign.emailCampaignstring—any
actions.sentToEmailCampaign.emailAccountsstring[]—any
actions.sentToHubspotobject—any
actions.sentToHubspot.actionstring—create-a-contact
actions.sentToHubspot.assignContactsTostring—any
actions.sentToHubspot.createDealboolean—any
actions.sentToHubspot.pipelineIdstring—any
actions.sentToHubspot.dealStageIdstring—any
actions.sentToHubspot.dealAmountnumber—any
actions.sentToPipedriveobject—any
actions.sentToPipedrive.assignContactsTostring—any
actions.sentToSalesforceobject—any
actions.sentToSalesforce.assignContactsTostring—any
actions.sentToZohoobject—any
actions.sentToZoho.assignContactsTostring—any
actions.sentToGoHighLevelobject—any
actions.sentToGoHighLevel.assignContactsTostring—any
actions.sentToGoHighLevel.createOpportunityboolean—any
actions.sentToGoHighLevel.pipelineIdstring—any
actions.sentToGoHighLevel.pipelineStageIdstring—any
actions.sentToGoHighLevel.opportunityStatusstring—openwonlostabandoned
actions.sentToGoHighLevel.tagsstring[]—any

Use case: Find the campaign

GET /admin/email-campaigns?websiteId=… lists the website's campaigns (newest first, paged); use one's _id as emailCampaign. A missing or invalid campaign id answers 405.

Use case: Choose the mailboxes

Add emailAccounts to sentToEmailCampaign, a list of mailbox ids, to send only from those mailboxes; leave it out to use the campaign's mailboxes.

Use case: Only leads with a verified email

Add emailVerification next to actions: { "allowOnlyValidEmails": true, "allowCatchAllEmails": false, "allowGuessedEmails": false, "allowWithoutEmails": false }. By default guessed emails are allowed and leads without an email are skipped.

On this page