Create an Emelia campaign by API with an AI
One file to hand your assistant, and it builds your multichannel campaigns end to end: the contact list, the senders, the step tree with its conditions, the sending limits, the launch.
The Emelia API is not complicated, it is unusual. An assistant that discovers it by reading the online documentation gets two things wrong every time, and the second one destroys existing campaigns. The file below is the complete manual, written to be read by a machine.
The file to hand your assistant
Download it and attach it to your conversation, or paste its contents into a message. Then just say what you want: it knows the routes, the fields and the traps.
Everything you need to create and run advanced campaigns, from contact lists to statistics. Written to be handed as is to Claude, ChatGPT, Cursor or any assistant that can call an API.
- Authentication, the rate limits per plan, and the truncated key trap
- The list routes, including the two paths where the public documentation is wrong
- How Emelia guesses which field a column maps to, and why an undeclared variable ends up in the wrong field
- The structure of the step tree, the delays, the conditions and their two families
- The two meanings of the
versionsarray: A/B test on an email, successive messages on LinkedIn - The sending settings, the launch, the scheduling and how to read the results
- Three complete sequences in JSON, ready to adapt
The rule that matters more than all the others
No route in this API does a partial update. To change a single word in the third email of a six step sequence, you have to send back the whole tree, all six steps and everything in them. Anything you leave out is lost.
This is where assistants come unstuck. Ask a model to fix a typo and it will happily build an object containing only the step in question, send it, and delete the other five. The campaign is emptied, with no error message, and the file exists precisely to prevent that.
The only correct sequence, to remind your assistant of if it starts improvising : Read, modify, send back. Never build a block from scratch.
1. GET /advanced/campaigns/:id → récupérer l'objet complet
2. modifier en mémoire le bloc concerné
3. PATCH /advanced/campaigns/:id/steps → renvoyer le bloc ENTIER, modifiéThe second classic mistake is milder: a running campaign refuses any change. You have to pause it, make the change, then start it again. The file gives the three calls in the right order.
What your assistant can do once it has read it
The list is not theoretical: every one of these operations is documented with its route, its required fields and a sample request body.
- Create a contact list and load contacts into it in batches, with the custom variables declared up front so they do not get lost
- Create an advanced campaign and attach the mailboxes and LinkedIn accounts that will do the sending
- Build the step tree: emails, LinkedIn connection requests, messages and profile visits, manual tasks, with the delays between each one
- Set conditions: whether the contact replied, whether the connection request was accepted, whether the message was opened, and send what follows down one branch or the other
- Set the sending limits, the sending days and hours, the open and click tracking
- Launch, pause, schedule and read back the statistics step by step
The file only covers multichannel campaigns, the ones whose routes start with /advanced. The old email and LinkedIn campaigns from the previous version still work for existing integrations, but nobody creates them any more. If your assistant offers you a campaign route without /advanced, it has read the old documentation. Lists, on the other hand, live under /lists, and that is indeed the current path.
What to give it besides the file
The file explains the how. Three things remain that only you can supply.
- Your API key, generated in Emelia under Settings then API. It is exactly 48 characters long: a key missing a single character returns an authentication error with no explanation whatsoever.
- What you want to end up with, in plain English: “a sequence of four emails three days apart that stops on a reply”, or “a LinkedIn connection request, then a message if it is accepted, otherwise an email two days later”.
- The content of the messages, or the instruction to write them. On that point, give it the page of this guide that explains how a cold email is written: without it, it will produce email marketing.
In practice
The order that works.
- Make it read first. Ask it to summarize the PATCH rule before you let it touch anything. If it cannot state the rule correctly, it has not read the whole file.
- Start with an empty campaign. Create it as a draft, let the assistant assemble it, and look at the result in the Emelia interface before you attach any contact list.
- Do not hand it a campaign that is running. Until you trust it, work on a draft. A paused campaign edited badly can be fixed, a campaign that has gone out cannot.
- Check in the interface, not in its answer. An assistant that announces “the sequence has been updated” has seen a 200 go by, which says nothing about what it actually wrote.
That is true of the API as much as of the interface, but the API moves far faster. Always send a test from the last step before you launch, so you receive the whole thread and see how the variables really render. This is covered in testing your campaign before you send it.
Frequently asked questions
The questions we get asked on this topic, answered briefly.
Do you need to know how to code to use this file?
No, but you need an assistant that can call an API: Claude Code, Cursor, or an assistant connected to a tool that runs HTTP requests. A model in a plain chat can write the code for you, but someone will have to run it.
Why not let the assistant read the online documentation?
Because it does not tell you everything and it is wrong on two paths. Above all, nowhere does it say that the update routes replace the entire block: an assistant that learns the API from the documentation destroys an existing sequence on its first correction.
Does this use credits?
No. Creating a campaign, filling it and sending it costs no credits. Credits are for data (finding an address, verifying it, finding a phone number) and for AI actions run inside Emelia. This is detailed in understanding credits.
Is the file up to date?
It describes advanced campaigns as they work today, with the routes verified against the live API rather than copied from the documentation. If a route were to change, this file is the first thing that would be corrected.