Skip to content

Create a task

Request

Create a manual outreach task. Common types: linkedin_send_message, linkedin_send_connection_request, linkedin_send_inmail, linkedin_like_latest_post, linkedin_endorse_skills.

Security
bearerAuth
Bodyapplication/jsonrequired
lead_uuidstringrequired
sender_profile_uuidstringrequired
typestring
Default:"linkedin_send_message"
Example:"linkedin_send_message"
textstringrequired
Example:"Hi John, I'd love to connect!"
notestring
schedule_atstring, (date-time)required
Example:"2026-03-01T10:00:00.000000Z"
timezonestring
Default:"UTC"
POST
/flows/api/tasks
curl -i -X POST \
  https://leadgen.grinfi.io/flows/api/tasks \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "lead_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "sender_profile_uuid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "type": "linkedin_send_message",
    "text": "Hi John, I'\''d love to connect!",
    "schedule_at": "2026-03-01T10:00:00.000000Z"
  }'

Responses

Task created.

Bodyapplication/json
uuidstring
parent_task_pipeline_uuidstring or null

UUID of the parent task (for chained tasks).

team_idinteger
assigned_tointeger

User ID the task is assigned to.

user_idinteger
lead_uuidstring
company_uuidstring or null
sender_profile_uuidstring
mailbox_uuidstring or null
flow_uuidstring or null
flow_lead_uuidstring or null

UUID of the flow-lead record linking this contact to the automation.

flow_originstring

automation when created by a flow.

Example:"automation"
flow_node_idinteger or null

Node index within the automation that generated this task.

typestring

Task type. Known values: linkedin_send_message, linkedin_send_connection_request, email_send_message.

Example:"linkedin_send_message"
automationstring
Enum:"manual""auto"
automation_error_codestring or null
statusstring
Enum:"in_progress""closed""canceled""failed""skipped"
fork_resultinteger or null
payloadobject or null

Task-specific data. For message tasks includes template, rendered_text, attachments, stop_on_reply_level, last_message_at.

attemptsinteger

Number of execution attempts.

error_msgstring or null

Error or skip reason.

priorityinteger

Task priority (lower = higher priority).

number_in_lineinteger or null
notestring or null
timezonestring or null
schedule_atstring, (date-time)
executed_atstring or null, (date-time)
taken_to_execute_atstring or null, (date-time)
created_atstring, (date-time)
updated_atstring, (date-time)
Response
{ "uuid": "string", "parent_task_pipeline_uuid": "string", "team_id": 0, "assigned_to": 0, "user_id": 0, "lead_uuid": "string", "company_uuid": "string", "sender_profile_uuid": "string", "mailbox_uuid": "string", "flow_uuid": "string", "flow_lead_uuid": "string", "flow_origin": "automation", "flow_node_id": 0, "type": "linkedin_send_message", "automation": "manual", "automation_error_code": "string", "status": "in_progress", "fork_result": 0, "payload": { "template": "string", "rendered_text": "string", "attachments": [], "stop_on_reply_level": "always", "last_message_at": "2019-08-24T14:15:22Z" }, "attempts": 0, "error_msg": "string", "priority": 0, "number_in_line": 0, "note": "string", "timezone": "string", "schedule_at": "2019-08-24T14:15:22Z", "executed_at": "2019-08-24T14:15:22Z", "taken_to_execute_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }