curl --request POST \
--url https://api.lemlist.com/api/tasks \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "phone",
"assignedTo": "usr_7YzNqVRMCfdeHEzMn",
"dueDate": "2025-02-10T09:58:57.169Z",
"leadId": "lea_zUwSUPSxozD9fLVGw"
}
'import requests
url = "https://api.lemlist.com/api/tasks"
payload = {
"type": "phone",
"assignedTo": "usr_7YzNqVRMCfdeHEzMn",
"dueDate": "2025-02-10T09:58:57.169Z",
"leadId": "lea_zUwSUPSxozD9fLVGw"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'phone',
assignedTo: 'usr_7YzNqVRMCfdeHEzMn',
dueDate: '2025-02-10T09:58:57.169Z',
leadId: 'lea_zUwSUPSxozD9fLVGw'
})
};
fetch('https://api.lemlist.com/api/tasks', 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/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"phone\",\n \"assignedTo\": \"usr_7YzNqVRMCfdeHEzMn\",\n \"dueDate\": \"2025-02-10T09:58:57.169Z\",\n \"leadId\": \"lea_zUwSUPSxozD9fLVGw\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'phone',
'assignedTo' => 'usr_7YzNqVRMCfdeHEzMn',
'dueDate' => '2025-02-10T09:58:57.169Z',
'leadId' => 'lea_zUwSUPSxozD9fLVGw'
]),
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;
}{
"_id": "opp_LyXDV8KHzctQdLFpG",
"type": "manual",
"title": "Keep an eye on him",
"priority": 1,
"leadId": "lea_fiDpiGV585wy3Oii2",
"campaignId": "cam_bSn8EORHQxbWPjHvu",
"contactId": "ctc_xW8Ou6C03Csv8vatp",
"dueDate": "2025-11-10T09:58:57.169Z",
"userId": "usr_ahfFktBBHUIxbVG5P",
"content": "does he have bandwidth to help us? would be grand"
}"Bad team""The authentication you supplied is incorrect"Create Task
Create a manual task (opportunity) associated with a contact/company or lead.
curl --request POST \
--url https://api.lemlist.com/api/tasks \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "phone",
"assignedTo": "usr_7YzNqVRMCfdeHEzMn",
"dueDate": "2025-02-10T09:58:57.169Z",
"leadId": "lea_zUwSUPSxozD9fLVGw"
}
'import requests
url = "https://api.lemlist.com/api/tasks"
payload = {
"type": "phone",
"assignedTo": "usr_7YzNqVRMCfdeHEzMn",
"dueDate": "2025-02-10T09:58:57.169Z",
"leadId": "lea_zUwSUPSxozD9fLVGw"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'phone',
assignedTo: 'usr_7YzNqVRMCfdeHEzMn',
dueDate: '2025-02-10T09:58:57.169Z',
leadId: 'lea_zUwSUPSxozD9fLVGw'
})
};
fetch('https://api.lemlist.com/api/tasks', 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/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"phone\",\n \"assignedTo\": \"usr_7YzNqVRMCfdeHEzMn\",\n \"dueDate\": \"2025-02-10T09:58:57.169Z\",\n \"leadId\": \"lea_zUwSUPSxozD9fLVGw\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'phone',
'assignedTo' => 'usr_7YzNqVRMCfdeHEzMn',
'dueDate' => '2025-02-10T09:58:57.169Z',
'leadId' => 'lea_zUwSUPSxozD9fLVGw'
]),
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;
}{
"_id": "opp_LyXDV8KHzctQdLFpG",
"type": "manual",
"title": "Keep an eye on him",
"priority": 1,
"leadId": "lea_fiDpiGV585wy3Oii2",
"campaignId": "cam_bSn8EORHQxbWPjHvu",
"contactId": "ctc_xW8Ou6C03Csv8vatp",
"dueDate": "2025-11-10T09:58:57.169Z",
"userId": "usr_ahfFktBBHUIxbVG5P",
"content": "does he have bandwidth to help us? would be grand"
}"Bad team""The authentication you supplied is incorrect"LinkedIn task attachments
When creating a task withtype: "linkedin", you can attach images and videos to the LinkedIn message by passing public HTTPS URLs in the images and videos arrays. lemlist downloads each file and re-hosts it before attaching it to the task.
| Constraint | Value |
|---|---|
| Maximum items per task | 6 (combined across images + videos) |
| Maximum file size | 20 MB per file |
| Allowed image MIME types | image/png, image/jpeg, image/gif |
| Allowed video MIME types | video/mp4, video/quicktime |
images and videos fields are ignored when type is not linkedin. Ingestion errors return the same LINKEDIN_MEDIA_* codes documented on Add Step to Sequence.Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
The type of task.
email, manual, phone, linkedin The ID of the team member assigned to the task (userId).
The due date in ISO 8601 format (e.g., 2025-02-12T00:00:00.000Z).
The ID of the contact company or lead associated with the task.
Optional title of the task. Defaults to an empty string if omitted.
Optional message/description of the task. Defaults to an empty string if omitted.
Priority level of the task.
, 0, 1, 2 Public HTTPS URLs of images to attach to a linkedin task. lemlist downloads each file and re-hosts it. Ignored when type is not linkedin. Allowed MIME types: image/png, image/jpeg, image/gif. Up to 20 MB per file, and up to 6 items total combined with videos.
Public HTTPS URLs of videos to attach to a linkedin task. lemlist downloads each file and re-hosts it. Ignored when type is not linkedin. Allowed MIME types: video/mp4, video/quicktime. Up to 20 MB per file, and up to 6 items total combined with images.
Response
Success
A manual action assigned to a user to complete.
Unique task identifier
Task type
Associated lead ID
Campaign ID
Assigned user ID
Task status
pending, completed, ignored Due date timestamp
Creation timestamp
Completion timestamp
Was this page helpful?