Sales

This is the Sales demo. Every visitor shares this company, and it resets every night.

What you change here, everyone sees until the next reset. Email is switched off, and the demo accepts no sign-ups.

Start your own trial
Assistant allowance Start your own trial
SV
Sam de Vries
sam.devries@tidewell-it.example

REST API, Prospects

API & Agent Access

Prospects

The calls of this guide follow the rules of the REST guide: sign-in, lists, and errors. Another way in is the MCP server at https://demo.mvdm.io/sales/mcp.

A Prospect is one person in one Campaign, with a Status of that Campaign. An email address is unique among all the Prospects of the Account, in any Campaign and letter case. A Status is a Campaign's own: read its Status ids with campaigns.get. A Prospect in a final Status is not contacted again: its email and Campaign stay, and a Status change skips it.

A final Status speaks for the whole organisation: a Prospect not in a final Status is Blocked when a Prospect in a final Status, in any Campaign of the Account, has the same email domain (a subdomain is another domain; a free-mail domain such as Gmail never matches) or the same organisation (letter case and extra spaces ignored; empty matches nothing). A Blocked Prospect is never followUpDue: do not contact it. blockedBy names the domain match first, then the first added.

  • prospects.list: the Campaign page's table, latest statusChangedAt first, then the highest id. Filter terms, joined with and, each at most once except tags/any: campaignId eq <number>, statusId eq <number>, followUpDue eq true, blocked eq true (the Blocked Prospects), lastEmailAt ge <time> and lastEmailAt lt <time> (the range of the Prospect's lastEmailAt: inclusive lower and exclusive upper bound; a time is ISO 8601, taken as given with Z or an offset and read in your User's time zone without one; a value that is not a time answers 422 on $filter), search('<text>') (email, name, or organisation contains the text, any case), tags/any(t: t eq '<tag>'), and timeZone eq '<zone>'. tags/any may repeat, and the Prospect must carry every Tag named; a Tag is matched ignoring letter case and surrounding spaces, and a quote inside it is written twice (''). timeZone eq keeps one time zone, read as a write reads it (europe/amsterdam finds Europe/Amsterdam); a value that is not a time zone matches nothing. A Prospect is Follow-up due when its Status has a follow-up of N working days (Monday to Friday) and N have passed since its last Status change, counted on today's date in the Prospect's time zone, or in the time zone of your User (UTC when it has none) for a Prospect with an Unknown one, and weekends and public holidays where the Prospect is do not count. Sort keys are statusChangedAt, email, createdAt, lastEmailAt (Prospects without a Last email come last, ascending and descending), and id. Each row holds what prospects.get holds without history and leadIds.
  • prospects.get: one Prospect, or 404 not-found. It holds id, url, campaignId, campaignName, statusId, statusName, statusIsFinal, email, name, role, organisation, emailSource, whyItFits, notes, tags (the Tag names, alphabetical ignoring letter case), timeZone (an IANA name such as Europe/Amsterdam, or null for Unknown), statusChangedAt, createdAt, lastEmailAt (the UTC time of the newest Sent email, null when it has none), followUpDue, blockedBy (null, or the blocking Prospect: id, email, statusName, campaignName, and match, domain or organisation), leadIds (the ids of the Leads of the Account with the Prospect's email address, first sign-up first), and history, newest first. A history entry holds id, kind (status, move, note, email_sent, or bounce), at, and the statusName, fromCampaignName, toCampaignName, note, subject, messageId, sentTo, sentEmailId, and bounceId that apply to it, with the names as they read when the entry was written. An email_sent entry holds subject, messageId, sentTo (the Prospect's address then), and bounceId (its bounce entry, or null); a bounce entry holds sentEmailId, the id of the email_sent entry that bounced.
  • prospects.create: send the fields below to POST /api/v1/prospects. It answers 201 with the new Prospect and its address in Location. The Prospect starts in the Campaign's first Status, and its history has one status entry:
{
  "campaignId": 12,
  "email": "jane@example.com",
  "emailSource": "https://example.com/team: \"Jane Doe, Head of IT\"",
  "name": "Jane Doe"
}

campaignId, email (at most 254 characters, a valid address), and emailSource (at most 1000: the public page, and the words on it, that show the address) are required. name, role, and organisation take at most 200 characters, whyItFits 2000, and notes 4000, the Prospect's own text, changeable later. A dated note goes through prospects.add-note. tags (an array of strings) and timeZone are optional. A Tag is a short label of the Account, such as Tier 1: at most 50 characters after trimming, no comma, and any number per Prospect. Empty Tags are dropped, and Tags that differ only in letter case or surrounding spaces are one Tag. A Tag the Account already has keeps its stored spelling (tier 1 is saved as Tier 1 when that exists), also when the Prospect already carries it. A Tag no Prospect carries any more is gone. timeZone is an IANA name from the list in a member's user settings, such as America/New_York, matched ignoring letter case and stored as the list spells it; empty or absent means Unknown (null). A Tag over 50 characters or with a comma answers 422 on tags, and anything else, such as EST or a Windows zone name, answers 422 on timeZone. A Campaign of another Account answers 404 not-found. An email another Prospect has answers 422 on email, naming the Campaign that holds it. A Prospect that would be Blocked is refused the same way: 422 on email (domain) or organisation, naming the blocking Prospect, whose object is in blockedBy. A Prospect created in a final Status is never refused by this.

  • prospects.update: send only the fields to change to PATCH /api/v1/prospects/{id}. The others keep their value, and it answers the changed Prospect. email, emailSource, and campaignId cannot be cleared: null answers 422. Another campaignId moves the Prospect: it gets the Status with the same name there, else its first Status, and history gets one move entry. tags replaces the Prospect's Tags: absent keeps them, and [] or null clears them. timeZone absent keeps it, and null or an empty value sets Unknown. A refused Tag or time zone answers 422 as in prospects.create. Moving a Prospect keeps its Tags and time zone, and changing either writes no history entry. A Prospect in a final Status answers 422 on email or campaignId when either changes. A change of email or organisation that would make it Blocked answers 422 on that field with blockedBy, as prospects.create does; other changes, such as notes or a move, and any change to a Prospect in a final Status are never refused by this.
  • prospects.set-status: send { "prospectIds": [1, 2], "statusId": 7, "note": "Sent from HEY" } to POST /api/v1/prospects/set-status. note is optional, at most 2000 characters. Every Prospect must be in the Campaign the Status belongs to, or nothing changes and it answers 422 on statusId. An unknown Prospect answers 404. It answers { "changed": 2, "skippedFinal": 0 }: a Prospect that has the Status already is in neither number, and a Prospect in a final Status keeps its Status and counts in skippedFinal. Each change writes a status entry with the note in the Prospect's history.
  • prospects.add-note: send { "note": "address corrected" } to POST /api/v1/prospects/{id}/add-note. note is required, at most 2000 characters. It answers the Prospect with the new note entry in history.
  • prospects.record-email-sent: send { "subject": "Intro", "sentAt": "2026-11-02T10:00:00Z", "messageId": "<e0@example.com>", "note": "Sent from HEY", "statusId": 7 } to POST /api/v1/prospects/{id}/record-email-sent. subject is required, at most 500 characters. sentAt is an ISO 8601 time: with Z or an offset it is that instant, without one it is read in the time zone of your Sales account member (UTC when it has none), and it is now when left out; a time in the future, or one that is not ISO 8601, answers 422 on sentAt. messageId (at most 500) and note (at most 2000) are optional. It writes an email_sent entry in history with sentTo, the Prospect's address, and answers the Prospect. Recording the same email again changes nothing: the same messageId, or, without one, the same subject in the same minute. statusId gives the Prospect that Status in the same call, as a status entry dated sentAt that also sets statusChangedAt; without it the Status stays. It must be a Status of the Prospect's Campaign, or the answer is 422 on statusId, and a Prospect in a final Status refuses it the same way with nothing stored. A Prospect in a final Status, or a Blocked one, can still record an email without statusId. An unknown Prospect answers 404.
  • prospects.record-bounce: send { "sentEmailId": 41, "bouncedAt": "2026-11-02T10:05:00Z", "note": "550 mailbox unknown", "statusId": 8 } to POST /api/v1/prospects/{id}/record-bounce. sentEmailId is the id of an email_sent entry in history; without it the Prospect's newest Sent email bounced. bouncedAt reads like sentAt and cannot be in the future or before the email was sent: 422 on bouncedAt. note is the reason, at most 2000 characters. It writes a bounce entry and answers the Prospect, where the email_sent entry now holds bounceId. An email has one bounce: recording it again in the same minute changes nothing, another time answers 422 on sentEmailId, as does a Prospect without a Sent email or a sentEmailId that is not one of its Sent emails. statusId works as in prospects.record-email-sent, dated bouncedAt.
  • campaigns.import-prospects: send a CSV or Excel file to POST /api/v1/campaigns/{id}/import-prospects, and the Prospects in it join the Campaign, all or none. Its columns, History notes, Blocked rows, and answers are in REST API: import Prospects.
  • prospects.delete: answers 204 and deletes the Prospect and its history with no confirm step; show your person the Prospect first.

Removing a Status that a Prospect has, with campaigns.update, answers 422 on statuses with the number of Prospects that hold it: move them first.

Are you sure?

This action cannot be reverted.

Leave this page?

Your changes on this form are not saved. If you leave, they are lost.