Personalized messages per lead (beta)
A campaign step has one shared message, filled with variables for each lead. With lead messages, you, or the AI assistant you connect (Claude, ChatGPT, Grok…), write a whole message for one lead on one step. When that step runs for the lead, this version is sent instead of the shared message; every other lead keeps the shared message.
It works on email steps (body and subject), LinkedIn message steps and LinkedIn invitations that carry a note.
Write versions
Section titled “Write versions”- Find the step: Get Campaign Steps (
GET /campaigns/{campaignId}/steps) returns each step’sstepId. - Find the lead: it must be in the campaign’s audience (
GET /audiences/{audienceId}/leadsorGET /leads/search). - Write its version:
POST /campaigns/{campaignId}/steps/{stepId}/lead-messages/{leadId}.
curl -X POST "https://apiv2.lagrowthmachine.com/flow/campaigns/65a1b2c3d4e5f60718293a4b/steps/node-4/lead-messages/65a1b2c3d4e5f60718293a02" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "newHtml": "<p>Hi <var name=\"firstname\"/>, congrats on the Series A! With 12 new sales hires planned, how are you ramping them up?</p>", "subjectNewHtml": "<p>Ramping up 12 new reps at Acme</p>" }'The body uses the same newHtml format as the edit message endpoint. Its variables are filled for the lead when the
step runs. Write the same lead again to replace the version.
Many versions in one call
Section titled “Many versions in one call”To write the versions of a whole audience, send them in batches of up to 100 to
POST /campaigns/{campaignId}/lead-messages, any mix of leads and steps of the campaign:
curl -X POST "https://apiv2.lagrowthmachine.com/flow/campaigns/65a1b2c3d4e5f60718293a4b/lead-messages" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "stepId": "node-4", "leadId": "65a1b2c3d4e5f60718293a02", "newHtml": "<p>Hi <var name=\"firstname\"/>, congrats on the Series A!</p>" }, { "stepId": "node-4", "leadId": "65a1b2c3d4e5f60718293a03", "newHtml": "<p>Hi <var name=\"firstname\"/>, saw the new office in Lyon.</p>" } ] }'Each version is decided as if it were written alone, with the same rules and refusal texts. The response has one
row per version, in the order of the call: written, or refused with its reason. A call can answer 200 with refused
rows, so check refused and each row’s error. The whole call is refused, with nothing written, only when the
campaign is stopped, the workspace does not have the feature, or the body is invalid (more than 100 versions, the
same lead twice on a step, a malformed row).
What happens to a version
Section titled “What happens to a version”| State | Meaning |
|---|---|
TO_SEND |
It will be sent instead of the shared message when the step runs for the lead. |
SENT |
It has been handed over: sent by the step, or used to pre-fill the lead’s task when the step waits for a manual validation. sentMessage holds the text handed over. |
UNUSED |
The step passed for the lead without it: the step became an A/B test, the invitation lost its note, the workspace lost the feature, the step type changed, or the step ended without sending. |
- Manual validation. Nothing is sent automatically: the lead’s task in the inbox is pre-filled with the version, and what the member validates is what leaves.
- Until when. A version can be rewritten or deleted until it is handed over. Once the step has passed for the lead, or while a task waits for the lead on this step, writing is refused with the reason.
- Retention. While the lead is still in the campaign,
SENTandUNUSEDversions stay readable 10 days after they end, then they disappear. All the lead’s versions in a campaign, whatever their state, are deleted at once when the campaign ends for the lead (last step reached, reply that stops it, lead stopped or converted, for example withPOST /leads/status) or when the lead is removed from the campaign’s audience (POST /leads/removefromaudience). - In the app. Each step shows how many leads have their own version, and the preview shows each lead’s version, exactly as it will be sent.
Read, list and delete
Section titled “Read, list and delete”GET /campaigns/{campaignId}/steps/{stepId}/lead-messages/{leadId}: one version, with its state and the text handed over.GET /campaigns/{campaignId}/steps/{stepId}/lead-messages: the leads that have a version on the step, paginated withcursor, without the text.DELETE /campaigns/{campaignId}/steps/{stepId}/lead-messages/{leadId}: deletes a version still to send; the lead gets the shared message again.
With an AI assistant
Section titled “With an AI assistant”The MCP server exposes the same operations as tools: write_lead_message, write_lead_messages
(up to 100 versions at once), get_lead_message, list_lead_messages and delete_lead_message. Ask your assistant,
for example, to “write a personalized invitation note for each lead of step 1 from their LinkedIn profile”: it writes
one version per lead, and asks you to confirm the text before saving it.
Like the rest of the API, each account can make 120 calls per minute to each endpoint (see rate limits): one batch call counts as one call, whatever the number of versions it carries.