Skip to main content
POST
/
tasks
Create Task
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"
}
'
{
  "_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"
}

Documentation Index

Fetch the complete documentation index at: https://developer.lemlist.com/llms.txt

Use this file to discover all available pages before exploring further.

Create a manual task (opportunity) associated with a contact/company or lead. The task must be assigned to a team member and have a due date. Optional fields let you set a title, message, and priority.

LinkedIn task attachments

When creating a task with type: "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.
ConstraintValue
Maximum items per task6 (combined across images + videos)
Maximum file size20 MB per file
Allowed image MIME typesimage/png, image/jpeg, image/gif
Allowed video MIME typesvideo/mp4, video/quicktime
The 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

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
type
enum<string>
required

The type of task.

Available options:
email,
manual,
phone,
linkedin
assignedTo
string
required

The ID of the team member assigned to the task (userId).

dueDate
string<date-time>
required

The due date in ISO 8601 format (e.g., 2025-02-12T00:00:00.000Z).

recordId
string

The ID of the contact company or lead associated with the task.

title
string
default:""

Optional title of the task. Defaults to an empty string if omitted.

message
string
default:""

Optional message/description of the task. Defaults to an empty string if omitted.

priority
enum<string>
default:""

Priority level of the task.

Available options:
,
0,
1,
2
images
string<uri>[]

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.

videos
string<uri>[]

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.

_id
string

Unique task identifier

type
string

Task type

leadId
string

Associated lead ID

campaignId
string

Campaign ID

userId
string

Assigned user ID

status
enum<string>

Task status

Available options:
pending,
completed,
ignored
dueDate
string<date-time>

Due date timestamp

createdAt
string<date-time>

Creation timestamp

completedAt
string<date-time>

Completion timestamp