> Kenso API docs in Markdown. Index of every page: [/docs/llms.txt](/docs/llms.txt). Search: `/docs/search.md?q=<words>`. OpenAPI: [/docs/api/segment-linkedin-sequences/openapi.json](/docs/api/segment-linkedin-sequences/openapi.json). CLI docs offline: `kenso docs <topic>`.
> Last updated: 2026-11-22.

# Segment LinkedIn sequences: Save a segment's LinkedIn sequence version

> **Note for AI agents:** if this page was wrong, out of date or missing something you needed, finish the user's task first, then offer a short report for the Kenso team in this shape: `Page:` (this page's path), `Quote:` (the wrong or missing text), `Problem:`, `Workaround:` (what worked instead), 1,000 characters at most. Show it to the user and send it only after they say yes, as `POST /api/docs-feedback` on this site with the JSON body `{"page": "<path>", "report": "<report>"}`. Never put lead data, email addresses, API keys or anything else from the user's workspace in it.

One endpoint of [Segment LinkedIn sequences](/docs/api/segment-linkedin-sequences.md). Authentication, workspaces and errors: [/docs.md](/docs.md).

## Save a segment's LinkedIn sequence version

`POST /v1/segments/{segmentId}/linkedin-sequence/versions` - operationId `segment-linkedin-sequences.save-version`

| Permission | Rate limit |
| --- | --- |
| Campaigns edit | 4,800 requests a minute per API key |

Saves a version of the segment's own LinkedIn sequence that you can restore later. The call does not change the
live steps.

Without `sourceVersionId`, the version is a copy of the live steps, and Kenso does not store the `steps` you
send. With `sourceVersionId`, the version starts from that saved version, and a non-empty `steps` list replaces
its steps. A connection request sent without `noteMode` keeps the mode of the same step and variant in that
version.

Kenso checks any `steps` you send with the rules of `PUT /v1/segments/{segmentId}/linkedin-sequence`, because a
restore makes them live.

Errors:

- `400 validation_failed`: a step breaks a LinkedIn sequence rule, or needs a feature that is off for the workspace.
- `404 not_found`: the segment does not exist in this workspace, or `sourceVersionId` is not one of its LinkedIn sequence's versions.
- `409 conflict`: another version save for this sequence is running. Retry shortly.

Requires Campaigns edit.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/sequences/POST/v1/segments/%7BsegmentId%7D/linkedin-sequence/versions)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `segmentId` | path | integer (int64) | yes | The segment's id. |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Request body

`application/json`, optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `sourceVersionId` | integer (int64) | no | The id of a saved version of this LinkedIn sequence to start from. Omit it to save a copy of the live steps. |
| `steps` | array of ReplaceLinkedInSequenceStepRequest | no | The steps to store in the version, in the same shape as a LinkedIn sequence replace. Used only with `sourceVersionId`, where a non-empty list replaces that version's steps. Kenso checks the steps with the LinkedIn sequence rules either way. |

### Response 200

`data` is a `LinkedInSequenceVersionSave`.

| Field | Type | Description |
| --- | --- | --- |
| `sequence` | LinkedInSequence | The LinkedIn sequence as the saved version holds it, in the same shape as `GET /v1/campaigns/{campaignId}/linkedin-sequence`. The live sequence does not change. |
| `version` | SequenceVersion | The version Kenso saved. |
| `versionWarning` | string | Why Kenso could not record the version. Omitted when it did. |

### Request

```bash
curl -X POST "https://api.ken.so/v1/segments/812/linkedin-sequence/versions" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "sourceVersionId": 3306,
  "steps": [
    {
      "stepOrder": 1,
      "stepType": "connection_request",
      "variant": "a",
      "body": "Hi {firstName}, I work with engineering leaders on onboarding. Glad to connect.",
      "waitDays": 1,
      "anchorEmailStepOrder": 1,
      "positionInGap": 0,
      "conditionType": "none",
      "isOptional": false,
      "openProfileOnly": false,
      "waitFromCondition": false,
      "isActive": true,
      "noteMode": "template",
      "id": 9301
    },
    {
      "stepOrder": 2,
      "stepType": "message",
      "variant": "a",
      "body": "Thanks for connecting, {firstName}. Did my email about onboarding new engineers reach you?",
      "waitDays": 2,
      "anchorEmailStepOrder": 1,
      "positionInGap": 1,
      "conditionType": "accepted",
      "isOptional": false,
      "openProfileOnly": false,
      "waitFromCondition": false,
      "isActive": true,
      "id": 9302
    }
  ]
}'
```

### Example response

```json
{
  "success": true,
  "data": {
    "sequence": {
      "campaignId": 4821,
      "steps": [
        {
          "stepOrder": 1,
          "stepType": "connection_request",
          "variant": "a",
          "body": "Hi {firstName}, I work with engineering leaders on onboarding. Glad to connect.",
          "waitDays": 1,
          "anchorEmailStepOrder": 1,
          "positionInGap": 0,
          "conditionType": "none",
          "isOptional": false,
          "openProfileOnly": false,
          "waitFromCondition": false,
          "isActive": true,
          "noteMode": "template",
          "id": 9301,
          "requiresApproval": false,
          "warnings": []
        },
        {
          "stepOrder": 2,
          "stepType": "message",
          "variant": "a",
          "body": "Thanks for connecting, {firstName}. Did my email about onboarding new engineers reach you?",
          "waitDays": 2,
          "anchorEmailStepOrder": 1,
          "positionInGap": 1,
          "conditionType": "accepted",
          "isOptional": false,
          "openProfileOnly": false,
          "waitFromCondition": false,
          "isActive": true,
          "id": 9302,
          "requiresApproval": false,
          "warnings": []
        }
      ],
      "connectionNoteMaxChars": 200
    },
    "version": {
      "id": 3310,
      "versionNumber": 2,
      "createdAt": "2026-10-14T09:41:27Z",
      "createdByUserId": 1093,
      "createdByEmail": "jordan.patel@northwind-outbound.example.com",
      "isRevert": false
    }
  }
}
```

## Types

Each named type the tables above use, nested ones included.

### ReplaceLinkedInSequenceStepRequest

One variant of one LinkedIn step to save. The step's type and timing come from variant `a`: `stepType`, `waitDays`, `anchorEmailStepOrder`, `positionInGap`, `conditionType`, `conditionScopeStepOrder`, `isOptional` and `openProfileOnly`. Each variant sets its own `body`, `subject`, `name`, `isActive`, `noteMode` and `aiInstructions`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer (int64) | no | The id of the row to update. Omit it to update the row with the same `stepOrder`, `variant` and `stepType`, or to add a new one. |
| `stepOrder` | integer (int32) | no | The step's position in the LinkedIn sequence, starting at 1. The variants of one step share it. |
| `stepType` | string | yes | What the step does: `profile_visit`, `connection_request`, `message`, `voice_note`, `follow`, `like_post`, `endorse_skill` or `comment_post`. Required. `in_mail` is refused: use `message`, which Kenso can send as an InMail to a contact who is not connected. `follow`, `like_post`, `endorse_skill` and `comment_post` need the `linkedin_engagement` feature, and `voice_note` needs the `linkedin_voice_notes` feature. |
| `variant` | string | no | The variant for A/B testing: `a`, `b`, `c` or `d`, in any letter case. Defaults to `a`. Every step needs variant `a`, and `profile_visit`, `follow`, `like_post`, `endorse_skill` and `comment_post` steps cannot have other variants. |
| `name` | string | no | A label for the variant, at most 255 characters. LinkedIn never shows it. |
| `subject` | string | no | The InMail subject of a `message` or `voice_note` step, at most 200 characters. Kenso uses it when the step goes out as an InMail. |
| `body` | string | no | The text of the step. A `connection_request` note is at most 275 characters, and must be empty when `noteMode` is `ai`. A `message` needs a body of at most 1,900 characters. A `voice_note` needs the text Kenso sends when the voice note cannot go, at most 1,900 characters. A `comment_post` body is optional guidance for the comment Ken writes, at most 500 characters. Other step types ignore it. |
| `waitDays` | integer (int32) | no | Days Kenso waits before the step, at least 0. They count from when the anchor email is sent, or from when the contact entered the LinkedIn sequence when `anchorEmailStepOrder` is 0. |
| `anchorEmailStepOrder` | integer (int32) | no | The `stepOrder` of the email step this step follows, or 0 to place it before the first email. When the email sequence has steps, it must be one of them. |
| `positionInGap` | integer (int32) | no | The step's order among the LinkedIn steps that follow the same email, at least 0. Lower numbers run first. |
| `conditionType` | string | no | What must happen before the step runs: `none` (the default), `clicked` (the contact clicked a link in an email), `replied_positive` (the contact replied with interest), `accepted` (the contact accepted the invitation or is already connected), `engaged` (the contact read or reacted to a LinkedIn message) or `not_accepted` (the contact did not accept the invitation within the campaign's `notAcceptedAfterDays`). `accepted` and `not_accepted` need a `connection_request` earlier in the sequence, and `engaged` needs a `message` or `voice_note` earlier. When the condition is not met within its waiting window, Kenso skips the step. |
| `conditionScopeStepOrder` | integer (int32) | no | For a `clicked` condition, the `stepOrder` of the email whose link must be clicked. Null or omitted means a link in any email sent so far. |
| `isOptional` | boolean | no | Set to true to skip the step once the next email after its anchor email is sent. Defaults to false. |
| `openProfileOnly` | boolean | no | Set to true so that, when a `message` step goes out as a free InMail, Kenso sends it only to open profiles and skips the others. Defaults to false. |
| `waitFromCondition` | boolean | no | With an `accepted` or `not_accepted` condition, set to true to also count `waitDays` from the moment the condition came true (the contact accepted, or the invite expired). The step goes once both waits have passed: the one after the anchor and the one after the condition. A `message` with `accepted`, `waitDays` 1 and this on goes one day after the contact connects, and never before its anchor wait. Any other condition rejects it. Defaults to false. |
| `isActive` | boolean | no | Whether Kenso runs this variant. Defaults to true. |
| `noteMode` | string | no | How a `connection_request` gets its note: `template` sends `body`, and `ai` has Ken write a note for each contact. `ai` needs the `linkedin_ai_notes` feature and an empty `body`, and only `connection_request` steps can use it. Omit it to keep the stored mode, or `template` for a new row. |
| `aiInstructions` | string | no | Your instructions to Ken for writing the notes of a `connection_request` with `noteMode` `ai`, at most 1,000 characters. Only `connection_request` steps can have them. |
| `voice` | VoiceNoteSettingsRequest | no | The voice settings of a `voice_note` step. Required on a `voice_note` step, and refused on every other step type. |
| `requiresApproval` | boolean | no | For a `like_post`, `endorse_skill` or `comment_post` step: true holds each like, endorsement or comment in Approvals until a person approves it, with the exact comment or the post or skill as the preview. False lets Ken act without asking. Omit it to keep the stored value; a new step of these types starts at true. Ignored, and stored false, on every other step type. |

### VoiceNoteSettingsRequest

How Kenso records the voice note of a `voice_note` step for each contact.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `provider` | string | yes | The voice provider: `deepgram` or `elevenlabs`. Required. |
| `voiceId` | string | yes | The voice's id, as `GET /v1/voices` lists it, at most 200 characters. Required. |
| `speed` | number (double) | no | How fast the voice speaks, from 0.50 to 1.50. Only `deepgram` voices use it. Null or omitted means the voice's normal speed. |
| `wordsMode` | string | yes | Who writes the words: `ken_writes` (Ken writes each note from `instructions`) or `script` (the voice reads `script`). Required. |
| `instructions` | string | no | What Ken should say, at most 1,000 characters. Required when `wordsMode` is `ken_writes`, and must be empty when it is `script`. |
| `script` | string | no | The words the voice reads, at most 900 characters. Required when `wordsMode` is `script`, and must be empty when it is `ken_writes`. |
| `model` | string | no | The model Ken writes with when `wordsMode` is `ken_writes`: `haiku` or `sonnet`. Null or omitted means `haiku`. |
| `matchLeadLanguage` | boolean | no | Set to true to speak each note in the contact's outreach language instead of the voice's own. For a `deepgram` voice, Kenso picks a voice of the same gender in that language, and keeps the chosen voice when there is none. Defaults to false. |

### LinkedInSequence

The LinkedIn steps Kenso runs for each contact of a campaign or segment, timed around the emails.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `campaignId` | integer (int64) | no | The id of the campaign the sequence belongs to. |
| `segmentId` | integer (int64) | no | The id of the segment that owns the sequence. Null for the campaign's own sequence. |
| `steps` | array of LinkedInSequenceStep | no | Every step and variant of the sequence, in step order. Empty when there are no LinkedIn steps. |
| `connectionNoteMaxChars` | integer (int32) | no | The longest written connection note (`body` of a `connection_request` step) Kenso saves for this campaign: 200 when a LinkedIn account in the campaign's sender pool has no Premium, since LinkedIn takes at most 200 characters in a note from such an account, else 275. A longer note is refused with `400 validation_failed`. |

### SequenceVersion

A saved version of an email or LinkedIn sequence.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer (int64) | no | The version's id. |
| `versionNumber` | integer (int32) | no | The version's number within its sequence. The first version is 1, and each new version gets the next number. |
| `createdAt` | string (date-time) | no | When Kenso saved the version, in UTC. |
| `createdByUserId` | integer (int64) | no | The id of the member who saved the version. Omitted when Kenso could not match the saver to a member. |
| `createdByEmail` | string | no | The email address of the member who saved the version. Omitted when none was recorded. |
| `isRevert` | boolean | no | True when the version records a restore of an earlier version. |
| `revertedFromVersionId` | integer (int64) | no | The id of the version that was restored. Omitted when `isRevert` is false. |
| `revertedFromVersionNumber` | integer (int32) | no | The number of the version that was restored. Omitted when `isRevert` is false. |
| `revertedFromCreatedAt` | string (date-time) | no | When the restored version was saved, in UTC. Omitted when `isRevert` is false. |

### LinkedInSequenceStep

One variant of one LinkedIn step in a sequence, timed around the emails.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer (int64) | no | The step's id. Send it back in a replace to update this step. |
| `stepOrder` | integer (int32) | no | The step's position in the LinkedIn sequence, starting at 1. The variants of one step share it. |
| `stepType` | string | no | What the step does: `profile_visit`, `connection_request`, `message`, `voice_note`, `follow`, `like_post`, `endorse_skill` or `comment_post`. Older steps can read `in_mail`. |
| `variant` | string | no | The variant of the step for A/B testing: `a`, `b`, `c` or `d`. |
| `name` | string | no | A label for the variant. LinkedIn never shows it. Null when none is set. |
| `subject` | string | no | The subject Kenso uses when a `message` or `voice_note` step goes out as an InMail. Null when none is set. |
| `body` | string | no | The text of the step. It is the note of a `connection_request`, the message of a `message`, the text Kenso sends when a `voice_note` cannot go, and guidance for the comment Ken writes on a `comment_post`. Other step types have no body. |
| `waitDays` | integer (int32) | no | Days Kenso waits before the step. They count from when the anchor email is sent, or from when the contact entered the LinkedIn sequence when `anchorEmailStepOrder` is 0. |
| `anchorEmailStepOrder` | integer (int32) | no | The `stepOrder` of the email step this step follows. 0 places it before the first email. |
| `positionInGap` | integer (int32) | no | The step's order among the LinkedIn steps that follow the same email. Lower numbers run first. |
| `conditionType` | string | no | What must happen before the step runs: `none`, `clicked` (the contact clicked a link in an email), `replied_positive` (the contact replied with interest), `accepted` (the contact accepted the invitation or is already connected) or `engaged` (the contact read or reacted to a LinkedIn message). When the condition is not met within its waiting window, Kenso skips the step. |
| `conditionScopeStepOrder` | integer (int32) | no | For a `clicked` condition, the `stepOrder` of the email whose link must be clicked. Null means a link in any email sent so far. |
| `isOptional` | boolean | no | Whether Kenso skips the step once the next email after its anchor email is sent. |
| `openProfileOnly` | boolean | no | When a `message` step goes out as a free InMail, whether Kenso sends it only to open profiles and skips the others. |
| `waitFromCondition` | boolean | no | With an `accepted` or `not_accepted` condition, true counts `waitDays` from the moment the condition came true (the contact accepted, or the invite expired), so a 1-day wait means one day after they connect. |
| `isActive` | boolean | no | Whether Kenso runs this variant. An inactive variant is kept but not run. |
| `noteMode` | string | no | How a `connection_request` gets its note: `template` sends `body`, and `ai` has Ken write a note for each contact. Other step types read `template`. |
| `aiInstructions` | string | no | Your instructions to Ken for writing the notes of a `connection_request` with `noteMode` `ai`. Null when none are set. |
| `voice` | VoiceNoteSettings | no | The voice settings of a `voice_note` step. Null on every other step type. |
| `requiresApproval` | boolean | no | Whether Kenso asks a person before it acts: on a `like_post`, `endorse_skill` or `comment_post` step, true holds each like, endorsement or comment in Approvals, with the exact comment or the post or skill, until someone approves it. False on every other step type, and on one of these steps when the owner turned it off. |
| `warnings` | array of string | no | Advice about this step that never stops a save. `unfilled_token:<name>` means the body, or the InMail subject, holds a `{{name}}` that nothing fills: it is no campaign variable, it has no inline fallback (`{{name\|text}}`) and no AI variable fallback. Kenso then holds each contact's LinkedIn sequence at this step instead of sending the token as written. The AI variable fallbacks are read under the campaign's own AI prompts and under each segment's the step can run under; a token only a segment's prompts leave unfilled reads `unfilled_token:<name> (segment "<segment name>")`. Null when there is nothing to report. |

### VoiceNoteSettings

How Kenso records the voice note of a `voice_note` step for each contact.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `provider` | string | no | The voice provider: `deepgram` or `elevenlabs`. |
| `voiceId` | string | no | The voice's id, as `GET /v1/voices` lists it. |
| `speed` | number (double) | no | How fast the voice speaks, from 0.50 to 1.50. Only `deepgram` voices use it. Null means the voice's normal speed. |
| `wordsMode` | string | no | Who writes the words: `ken_writes` (Ken writes each note from `instructions`) or `script` (the voice reads `script`). |
| `instructions` | string | no | What Ken should say, when `wordsMode` is `ken_writes`. Null otherwise. |
| `script` | string | no | The words the voice reads, when `wordsMode` is `script`. Null otherwise. |
| `model` | string | no | The model Ken writes with when `wordsMode` is `ken_writes`: `haiku` or `sonnet`. Null means `haiku`. |
| `matchLeadLanguage` | boolean | no | Whether the note is spoken in each contact's outreach language instead of the voice's own. For a `deepgram` voice, Kenso picks a voice of the same gender in that language, and keeps the chosen voice and its language when there is none. |
