LetsBot Menu
Bắt đầu Tiếng Việt Ngôn ngữ

Đối tác kinh doanh của Meta Công ty đăng ký tại Vương quốc Anh

Ngôn ngữ

CRM · Endpoint API

POST /api/v1/crm/tasks Mới

Create a task

Creates a task. Scope: crm.

Creates a task. Scope: crm.

Required: title. Optional: description, status (todo, in_progress, done), priority (low, normal, high, urgent), due_at, remind_at (ISO 8601), assignee_user_id, contact_id, deal_id, recurrence (daily, weekly, monthly; needs due_at).

Nội dung JSON

{
  "title": "Call back about the quote",
  "description": "Confirm delivery date.",
  "priority": "high",
  "due_at": "2026-10-10T11:00:00+03:00",
  "remind_at": "2026-10-10T10:30:00+03:00",
  "assignee_user_id": 3,
  "contact_id": 42,
  "deal_id": 15
}

Ví dụ yêu cầu

curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/tasks" \
  -H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Call back about the quote",
  "description": "Confirm delivery date.",
  "priority": "high",
  "due_at": "2026-10-10T11:00:00+03:00",
  "remind_at": "2026-10-10T10:30:00+03:00",
  "assignee_user_id": 3,
  "contact_id": 42,
  "deal_id": 15
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/tasks", {
  method: "POST",
  headers: {
    "X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "title": "Call back about the quote",
    "description": "Confirm delivery date.",
    "priority": "high",
    "due_at": "2026-10-10T11:00:00+03:00",
    "remind_at": "2026-10-10T10:30:00+03:00",
    "assignee_user_id": 3,
    "contact_id": 42,
    "deal_id": 15
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/tasks');

curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
        'Accept: application/json',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => <<<'JSON'
    {
        "title": "Call back about the quote",
        "description": "Confirm delivery date.",
        "priority": "high",
        "due_at": "2026-10-10T11:00:00+03:00",
        "remind_at": "2026-10-10T10:30:00+03:00",
        "assignee_user_id": 3,
        "contact_id": 42,
        "deal_id": 15
    }
    JSON,
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://your-workspace.letsbot.net/api/v1/crm/tasks",
    headers={
        "X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    json={
        "title": "Call back about the quote",
        "description": "Confirm delivery date.",
        "priority": "high",
        "due_at": "2026-10-10T11:00:00+03:00",
        "remind_at": "2026-10-10T10:30:00+03:00",
        "assignee_user_id": 3,
        "contact_id": 42,
        "deal_id": 15,
    },
)

print(response.json())

Phản hồi

Created201
{
  "success": true,
  "data": {
    "id": 31,
    "title": "Call back about the quote",
    "description": "Confirm delivery date.",
    "status": "todo",
    "priority": "high",
    "due_at": "2026-10-10T11:00:00+03:00",
    "remind_at": "2026-10-10T10:30:00+03:00",
    "overdue": false,
    "assignee": {
      "id": 3,
      "name": "Sara Ahmed"
    },
    "contact": {
      "id": 42,
      "name": "Ahmed Ali",
      "phone": "966500000000"
    },
    "deal": {
      "id": 15,
      "title": "Epoxy kit order — 40 units"
    },
    "recurrence": null,
    "completed_at": null,
    "created_at": "2026-10-08T09:30:00+03:00",
    "updated_at": "2026-10-08T09:30:00+03:00",
    "url": "https://your-workspace.letsbot.net/panel/v2/tasks?task=31"
  }
}

Sẵn sàng khi bạn sẵn sàng

Dùng thử endpoint này với số của bạn

API hoạt động trong thời gian dùng thử miễn phí. Tạo tài khoản, kết nối số WhatsApp và sao chép khóa của bạn tại API → Dữ liệu xác thực.