> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Lemlist: Patch Sequences Sequenceid Steps Stepid Ab Test

> Update A/B Test Variant. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Update A/B Test Variant.

<Info>
  Tool ID: `lemlist_patch_sequences_sequenceid_steps_stepid_ab_test`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'lemlist_patch_sequences_sequenceid_steps_stepid_ab_test',
  {
    "sequenceId": "sequence_123",
    "stepId": "step_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute lemlist_patch_sequences_sequenceid_steps_stepid_ab_test --input '{
  "sequenceId": "sequence_123",
  "stepId": "step_123"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "stepId": "step_123",
    "abTest": true,
    "emailTemplateBId": "jane.doe@example.com"
  }
}
```

Use `deepline tools get lemlist_patch_sequences_sequenceid_steps_stepid_ab_test --json` for the latest machine-readable contract.

## Input reference

Edits variant B content/config of the A/B test on a step. Only the provided fields are updated; unknown fields are rejected. Allowed while the campaign is running. Requires the Email Pro plan.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.sequenceId` | `string` | Yes | — | The unique identifier of the sequence |
| `payload.stepId` | `string` | Yes | — | The unique identifier of the step |
| `payload.subject` | `string` | No | — | Variant B subject. An empty string removes it: variant B then replies in the thread of the previous email sent to the lead in this campaign, like variant A would. |
| `payload.message` | `string` | No | — | Variant B body (HTML). An empty string is rejected, except on LinkedIn invite steps where it means "invite without a note" |
| `payload.altMessage` | `string` | No | — | Variant B's LinkedIn note, same meaning as the step-level `altMessage`: the premium invitation note on a `linkedinInvite` step, the out-of-network note on a `linkedinSend` one. On a `linkedinInvite` step, over 300 characters is rejected with `400` |
| `payload.altMessagePremium` | `string` | No | — | Variant B's premium variant of the out-of-network note, on `linkedinSend` steps only: any other step type is rejected with `400`. Over 300 characters is rejected with `400` too |
| `payload.cc` | `array` | No | — | — |
| `payload.plainText` | `boolean` | No | — | — |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Edits variant B content/config of the A/B test on a step. Only the provided fields are updated; unknown fields are rejected. Allowed while the campaign is running. Requires the Email Pro plan.",
    "properties": {
      "sequenceId": {
        "type": "string",
        "description": "The unique identifier of the sequence"
      },
      "stepId": {
        "type": "string",
        "description": "The unique identifier of the step"
      },
      "subject": {
        "type": "string",
        "description": "Variant B subject. An empty string removes it: variant B then replies in the thread of the previous email sent to the lead in this campaign, like variant A would."
      },
      "message": {
        "type": "string",
        "description": "Variant B body (HTML). An empty string is rejected, except on LinkedIn invite steps where it means \"invite without a note\""
      },
      "altMessage": {
        "type": "string",
        "description": "Variant B's LinkedIn note, same meaning as the step-level `altMessage`: the premium invitation note on a `linkedinInvite` step, the out-of-network note on a `linkedinSend` one. On a `linkedinInvite` step, over 300 characters is rejected with `400`"
      },
      "altMessagePremium": {
        "type": "string",
        "description": "Variant B's premium variant of the out-of-network note, on `linkedinSend` steps only: any other step type is rejected with `400`. Over 300 characters is rejected with `400` too"
      },
      "cc": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "plainText": {
        "type": "boolean"
      }
    },
    "required": [
      "sequenceId",
      "stepId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.stepId` | `string` | No | — | — |
| `result.data.abTest` | `boolean \| "A" \| "B"` | No | — | — |
| `result.data.emailTemplateBId` | `string` | No | — | Email template ID of variant B |
| `result.data.subject` | `string` | No | — | Variant B subject |
| `result.data.message` | `string` | No | — | Variant B body (HTML) |
| `result.data.altMessage` | `string` | No | — | Variant B's LinkedIn note, same meaning as the step-level `altMessage`: the premium invitation note on a `linkedinInvite` step, the out-of-network note on a `linkedinSend` one |
| `result.data.altMessagePremium` | `string` | No | — | Variant B's premium variant of the out-of-network note, on `linkedinSend` steps only |
| `result.data.cc` | `array` | No | — | — |
| `result.data.plainText` | `boolean` | No | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "stepId": {
            "type": "string"
          },
          "abTest": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string",
                "enum": [
                  "A",
                  "B"
                ]
              }
            ]
          },
          "emailTemplateBId": {
            "type": "string",
            "description": "Email template ID of variant B"
          },
          "subject": {
            "type": "string",
            "description": "Variant B subject"
          },
          "message": {
            "type": "string",
            "description": "Variant B body (HTML)"
          },
          "altMessage": {
            "type": "string",
            "description": "Variant B's LinkedIn note, same meaning as the step-level `altMessage`: the premium invitation note on a `linkedinInvite` step, the out-of-network note on a `linkedinSend` one"
          },
          "altMessagePremium": {
            "type": "string",
            "description": "Variant B's premium variant of the out-of-network note, on `linkedinSend` steps only"
          },
          "cc": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "plainText": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Lemlist provider guide](/docs/providers/lemlist/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.