> ## 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: Put Campaigns Campaignid Leads Leadidoremail Steps Stepid Personalization

> Personalize Step for Lead. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Personalize Step for Lead.

<Info>
  Tool ID: `lemlist_put_campaigns_campaignid_leads_leadidoremail_steps_stepid_personalization`
</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_put_campaigns_campaignid_leads_leadidoremail_steps_stepid_personalization',
  {
    "campaignId": "campaign_123",
    "leadIdOrEmail": "jane.doe@example.com",
    "stepId": "step_123"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute lemlist_put_campaigns_campaignid_leads_leadidoremail_steps_stepid_personalization --input '{
  "campaignId": "campaign_123",
  "leadIdOrEmail": "jane.doe@example.com",
  "stepId": "step_123"
}' --json
```

## Example response

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

```json theme={null}
{
  "data": {
    "leadId": "lead_123",
    "stepId": "step_123",
    "variant": "A"
  }
}
```

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

## Input reference

Personalize the message of one campaign step for a single lead. The lead receives this version instead of the step's shared content, and is no longer A/B tested on this step.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.campaignId` | `string` | Yes | — | The unique identifier of the campaign |
| `payload.leadIdOrEmail` | `string` | Yes | — | The unique identifier or email of the lead |
| `payload.stepId` | `string` | Yes | — | The unique identifier of the step, from GET /campaigns/\{campaignId}/sequences |
| `payload.variant` | `"A" \| "B"` | No | — | A/B variant to write on. Defaults to the variant the lead is already on: the winner once one is picked, else the variant already personalized, else the variant of the lead's scheduled task, else A. Allowed: `A`, `B`. |
| `payload.subject` | `string` | No | — | Email steps only. On a follow-up email, a non-empty subject starts a new thread; omit it to stay in the thread. |
| `payload.message` | `string` | No | — | The message body. HTML on email steps; plain text on LinkedIn, SMS and WhatsApp steps (HTML is converted to text). Cannot be blank, except on a LinkedIn invitation. |
| `payload.cc` | `array` | No | — | Email steps only. An empty array removes the cc for this lead. |
| `payload.plainText` | `boolean` | No | — | Email steps only. Send this lead a plain-text email. |
| `payload.altMessage` | `string` | No | — | LinkedIn invitation and LinkedIn message steps only. The connection-request note, 300 characters at most on an invitation. Minimum length: 1. |
| `payload.altMessagePremium` | `string` | No | — | LinkedIn message steps only. The note sent from a premium account. Minimum length: 1. Maximum length: 300. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Personalize the message of one campaign step for a single lead. The lead receives this version instead of the step's shared content, and is no longer A/B tested on this step.",
    "properties": {
      "campaignId": {
        "type": "string",
        "description": "The unique identifier of the campaign"
      },
      "leadIdOrEmail": {
        "type": "string",
        "description": "The unique identifier or email of the lead"
      },
      "stepId": {
        "type": "string",
        "description": "The unique identifier of the step, from GET /campaigns/{campaignId}/sequences"
      },
      "variant": {
        "type": "string",
        "description": "A/B variant to write on. Defaults to the variant the lead is already on: the winner once one is picked, else the variant already personalized, else the variant of the lead's scheduled task, else A.",
        "enum": [
          "A",
          "B"
        ]
      },
      "subject": {
        "type": "string",
        "description": "Email steps only. On a follow-up email, a non-empty subject starts a new thread; omit it to stay in the thread."
      },
      "message": {
        "type": "string",
        "description": "The message body. HTML on email steps; plain text on LinkedIn, SMS and WhatsApp steps (HTML is converted to text). Cannot be blank, except on a LinkedIn invitation."
      },
      "cc": {
        "type": "array",
        "description": "Email steps only. An empty array removes the cc for this lead.",
        "items": {
          "type": "string"
        }
      },
      "plainText": {
        "type": "boolean",
        "description": "Email steps only. Send this lead a plain-text email."
      },
      "altMessage": {
        "type": "string",
        "description": "LinkedIn invitation and LinkedIn message steps only. The connection-request note, 300 characters at most on an invitation.",
        "minLength": 1
      },
      "altMessagePremium": {
        "type": "string",
        "description": "LinkedIn message steps only. The note sent from a premium account.",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "required": [
      "campaignId",
      "leadIdOrEmail",
      "stepId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | A lead's personalized version of one campaign step. It pins the lead to the A/B variant it is written on. |
| `result.data.leadId` | `string` | No | — | The lead the step is personalized for |
| `result.data.stepId` | `string` | No | — | The personalized step |
| `result.data.variant` | `"A" \| "B"` | No | — | The A/B variant the lead is pinned to Allowed: `A`, `B`. |
| `result.data.emailTemplateId` | `string` | No | — | The step content the personalization overrides (variant A or B of the step) |
| `result.data.content` | `object` | No | — | The full personalized content. Only the fields of the step type are present. |
| `result.data.content.subject` | `string` | No | — | Email steps. An empty subject keeps a follow-up in its thread. |
| `result.data.content.message` | `string` | No | — | — |
| `result.data.content.cc` | `array` | No | — | — |
| `result.data.content.plainText` | `boolean` | No | — | — |
| `result.data.content.altMessage` | `string` | No | — | LinkedIn invitation and message steps: the connection-request note |
| `result.data.content.altMessagePremium` | `string` | No | — | LinkedIn message steps: the note sent from a premium account |
| `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": "A lead's personalized version of one campaign step. It pins the lead to the A/B variant it is written on.",
        "properties": {
          "leadId": {
            "type": "string",
            "description": "The lead the step is personalized for"
          },
          "stepId": {
            "type": "string",
            "description": "The personalized step"
          },
          "variant": {
            "type": "string",
            "description": "The A/B variant the lead is pinned to",
            "enum": [
              "A",
              "B"
            ]
          },
          "emailTemplateId": {
            "type": "string",
            "description": "The step content the personalization overrides (variant A or B of the step)"
          },
          "content": {
            "type": "object",
            "description": "The full personalized content. Only the fields of the step type are present.",
            "properties": {
              "subject": {
                "type": "string",
                "description": "Email steps. An empty subject keeps a follow-up in its thread."
              },
              "message": {
                "type": "string"
              },
              "cc": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "plainText": {
                "type": "boolean"
              },
              "altMessage": {
                "type": "string",
                "description": "LinkedIn invitation and message steps: the connection-request note"
              },
              "altMessagePremium": {
                "type": "string",
                "description": "LinkedIn message steps: the note sent from a premium account"
              }
            },
            "additionalProperties": false
          }
        },
        "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.