---
title: "Replace LinkedIn campaign steps"
method: PATCH
path: "/linkedin/campaigns/{campaignId}/steps"
tags: ["LinkedIn campaigns (legacy)"]
deprecated: true
---

# Replace LinkedIn campaign steps

`PATCH /linkedin/campaigns/{campaignId}/steps`

## Request

- Base URL: `https://api.emelia.io`
- URL: `https://api.emelia.io/linkedin/campaigns/{campaignId}/steps`
- Auth: API key in header `Authorization`

> **Deprecated.**

Replaces the full ordered list of LinkedIn steps. The campaign must not be RUNNING or ARCHIVED. Steps after the first need delay.amount > 0; at most one disabled version per step. New integrations should use the multichannel /advanced campaign endpoints instead.

## Path parameters

- `campaignId` string, required

## Request body

- object
  - `steps` object[], required
    - `stepType` 'VISIT' | 'CONNECTION' | 'MESSAGE' | 'LIKE' | 'FOLLOW' | 'INMAIL', required: `FOLLOW` is accepted when saved, but nothing runs it: do not use it.
    - `delay` object, required
      - `amount` integer: Must be > 0 for steps after the first.
      - `unit` 'MINUTES' | 'HOURS' | 'DAYS', required
    - `versions` object[], required: At most one disabled version per step. VISIT/LIKE/FOLLOW steps can carry an empty versions array.
      - `disabled` boolean
      - `message` string
      - `attachments` object[]
        - `name` string
        - `url` string, uri
        - `mediaType` 'MEDIA' | 'ATTACHMENT' | 'AUDIO'
        - `duration` number

## Response `200`

Updated campaign.

- object
  - `success` true, required
  - `campaign` LegacyLinkedinCampaign, required: A full LinkedIn campaign document.
    - `_id` string
    - `userId` string
    - `name` string
    - `status` 'DRAFT' | 'RUNNING' | 'PAUSED' | 'FINISHED' | 'ARCHIVED'
    - `account` string, nullable: LinkedIn account (authe) id.
    - `schedule` LegacyLinkedinScheduleOut
      - `dailyContact` integer
      - `timeZone` string
      - `days` integer[]
      - `start` string
      - `end` string
      - `excludeAlreadyMessaged` boolean
      - `exclude1stConn` boolean
      - `excludeNoPictures` boolean
    - `steps` object[]
      - `_id` string
      - `stepType` 'VISIT' | 'CONNECTION' | 'MESSAGE' | 'LIKE' | 'FOLLOW' | 'INMAIL'
      - `delay` object
        - `amount` integer
        - `unit` string
      - `versions` object[]
        - `_id` string
        - `message` string
        - `disabled` boolean
        - `attachments` object[]
    - `recipients` object
      - `lists` object[]
      - `contacts` string[]
      - `processing` boolean
    - `createdAt` string, date-time
    - `startAt` string, date-time
    - `estimatedEnd` string, date-time
    - `plannedStart` string, date-time

## Other responses

- `400`: Business or validation error. 400 by default; Joi validation errors carry code INVALID_REQUEST.

---

[API](https://skmtc.dev/emelia/apis/emelia-api.md) · [All operations](https://skmtc.dev/emelia/apis/emelia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/emelia/apis/emelia-api/revisions/8c0cb435f2c4?raw)
