Skip to main content
POST
/
v1
/
tasks
Create Task
curl --request POST \
  --url https://api.example.com/v1/tasks \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "status": "<string>",
  "priority": "<string>",
  "task_type": "<string>",
  "due_date": "<string>",
  "assignee_id": "<string>",
  "contact_id": "<string>",
  "contact_name": "<string>",
  "company_name": "<string>",
  "deal_id": "<string>",
  "event_id": "<string>",
  "created_date": "<string>"
}
'
{
  "data": {}
}

Request

At least one parent link is required. A task must reference contact_id, deal_id, or event_id. Orphan tasks are rejected with 400.

Body Parameters

title
string
required
Task title
description
string
Task description
status
string
default:"open"
Status (open, in_progress, completed)
priority
string
Priority level (low, medium, high)
task_type
string
Task type
due_date
string
Due date (ISO 8601 or YYYY-MM-DD)
assignee_id
string
Assignee user ID
contact_id
string
UUID of linked contact. Must belong to your workspace.
contact_name
string
Human name — fuzzy-matched within your workspace and resolved to contact_id. On ambiguous matches, returns 400 ambiguous_reference with candidate UUIDs.
company_name
string
Human name — fuzzy Company match.
deal_id
string
UUID of linked deal.
event_id
string
UUID of linked event.
created_date
string
Optional ISO 8601 timestamp. Honored verbatim if within the last 5 years and not more than 24 h in the future; otherwise the server now() is used. Never null.

Headers

Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json

Response

data
object
Created task with id, title, status, priority, due_date, assigned_to_user_id, contact_id, deal_id, event_id, created_date.
curl -X POST https://data.leadlex.com/functions/v1/api-gateway/v1/tasks \
  -H "Authorization: Bearer wbk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Follow up with Hans Müller",
    "due_date": "2026-03-10",
    "priority": "high",
    "contact_id": "789e0123-e45b-67c8-a901-234567890abc"
  }'

Errors

StatusCodeDescription
400validation_errorMissing title — or no parent link (contact_id / deal_id / event_id)
403insufficient_permissionsMissing activities:write permission

Orphan-task rejection example

{
  "error": {
    "code": "validation_error",
    "message": "At least one parent link (contact_id, company_id, deal_id, or event_id) is required"
  }
}