1. Pick the senders
sender_id of each LinkedIn account or inbox the campaign should send from. If the one you need is not on the first page, pass next_cursor as cursor to read the next: see Pagination. A campaign needs a sender for every channel its steps use.
2. Create the draft
status set to draft. A draft sends nothing.
How a sequence works:
- Steps run in the order you list them. A sequence holds 1 to 10 steps.
typeisconnection_request,message(a LinkedIn message),email,profile_visitorlike_post.wait_daysis how long to wait after the previous step. The first step takes 0.- A LinkedIn message after a connection request waits until the lead accepts.
- The first email needs a
subject. A later email without one is sent as a reply in the same thread. bodyis the message text, or the optional note on a connection request. A message or an email needs one. Profile visits and post likes take none.- Write
{{first_name}}and other variables in double braces. Each lead’scustom_variablesfill your own. - When a lead replies, the sequence stops for that lead.
Idempotency-Key header is optional here. With it, a retry returns the campaign the first call created. Without it, a retry creates a second draft.
3. Change the sequence
409 conflict.
4. Add leads
Add leads withPOST /campaigns/{id}/leads, as in Push leads into a campaign. A draft keeps them on its list until it launches.
5. Launch
{"send_window_mode": "start_now"} as the body.
- The
Idempotency-Keyheader is required. Sending the same key again returns the campaign as it is now and launches nothing. 409 conflictmeans the campaign was already launched, or is paused, completed or archived. Read itsstatus.400 bad_requestmeans something is missing, such as a sender for a channel the steps use, or leads. The message says what.- Check the returned
status. A launch can be paused straight away, for example when some leads cannot be reached, with the reason inpaused_reason.
POST /campaigns/{id}/pause and /resume.