Set Step Sender
curl --request PUT \
--url https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/sender \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "usr_A1b2C3d4E5f6G7h8K"
}
'import requests
url = "https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/sender"
payload = { "userId": "usr_A1b2C3d4E5f6G7h8K" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: 'usr_A1b2C3d4E5f6G7h8K'})
};
fetch('https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/sender', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/sender")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"usr_A1b2C3d4E5f6G7h8K\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/sender",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'userId' => 'usr_A1b2C3d4E5f6G7h8K'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"step": {
"sequenceId": "seq_A1b2C3d4E5f6G7h8J",
"stepId": "stp_A1b2C3d4E5f6G7h8I",
"stepType": "email",
"sender": {
"userId": "usr_A1b2C3d4E5f6G7h8K",
"channel": {
"type": "email",
"id": "usm_A1b2C3d4E5f6G7h8L",
"alias": "john@example.com"
}
}
},
"senderPoolChange": {
"enabledChannelTypes": [],
"disabledChannelTypes": [
"email"
]
}
}
}{
"error": "The channel does not match the step: give a channel of the step type, or no channel on a call, manual, API or phone step",
"code": "SENDER_STEP_CHANNEL_MISMATCH"
}The authentication you supplied is incorrectroute is available starting emailPro plan{
"error": "Step not found",
"code": "SEQUENCE_STEP_NOT_FOUND"
}{
"error": "Route bad method",
"code": "ROUTE_BAD_METHOD"
}{
"error": "This step type has no sender",
"code": "SENDER_STEP_NOT_FORCEABLE"
}Sequences
Set Step Sender
Forces a team member, and one of their accounts, as the sender of a step.
PUT
/
sequences
/
{sequenceId}
/
steps
/
{stepId}
/
sender
Set Step Sender
curl --request PUT \
--url https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/sender \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "usr_A1b2C3d4E5f6G7h8K"
}
'import requests
url = "https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/sender"
payload = { "userId": "usr_A1b2C3d4E5f6G7h8K" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: 'usr_A1b2C3d4E5f6G7h8K'})
};
fetch('https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/sender', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/sender")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"usr_A1b2C3d4E5f6G7h8K\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/sequences/{sequenceId}/steps/{stepId}/sender",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'userId' => 'usr_A1b2C3d4E5f6G7h8K'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"step": {
"sequenceId": "seq_A1b2C3d4E5f6G7h8J",
"stepId": "stp_A1b2C3d4E5f6G7h8I",
"stepType": "email",
"sender": {
"userId": "usr_A1b2C3d4E5f6G7h8K",
"channel": {
"type": "email",
"id": "usm_A1b2C3d4E5f6G7h8L",
"alias": "john@example.com"
}
}
},
"senderPoolChange": {
"enabledChannelTypes": [],
"disabledChannelTypes": [
"email"
]
}
}
}{
"error": "The channel does not match the step: give a channel of the step type, or no channel on a call, manual, API or phone step",
"code": "SENDER_STEP_CHANNEL_MISMATCH"
}The authentication you supplied is incorrectroute is available starting emailPro plan{
"error": "Step not found",
"code": "SEQUENCE_STEP_NOT_FOUND"
}{
"error": "Route bad method",
"code": "ROUTE_BAD_METHOD"
}{
"error": "This step type has no sender",
"code": "SENDER_STEP_NOT_FORCEABLE"
}A forced sender requires at least the Email Pro plan.
Which steps accept a forced sender
| Step | channel |
|---|---|
Required, type: "email" | |
| LinkedIn steps, LinkedIn voice notes | Required, type: "linkedin" |
| WhatsApp message, WhatsApp voice note | Required, type: "whatsapp" |
| SMS | Required, type: "phone" |
| Call, manual, API and phone tasks | Forbidden: the step pins a user, not an account |
409.
Rules
userIdmust be a team member who owns the account.- Without
channel.id, the first healthy account of the type is used. An unhealthy account is accepted when you name it. Read its diagnostics with Get Campaign Senders. channel.aliaspicks an alias of an email account. It needschannel.id.- An InMail step needs a sender with LinkedIn Premium.
Effects
- The sender pool changes as in the campaign editor: a channel type that no
other step uses leaves the pool.
senderPoolChangelists the channel types that the change enables or disables in the pool. - On a running campaign, the pending tasks of the step move to the forced sender.
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The unique identifier of the sequence
The unique identifier of the step
Body
application/json
Response
Success
Show child attributes
Show child attributes
Was this page helpful?