Liên hệ (contacts) — Tạo

Tạo mới một liên hệ qua POST.

Xem Markdown

Endpoint POST /v1/contacts tạo mới một liên hệ.

Endpoint

MethodEndpointMô tả
POST/v1/contactsTạo mới liên hệ

Tham số thân yêu cầu (Body Parameters)

Tham sốKiểuBắt buộcMô tả
first_namestringCóTên
last_namestringKhôngHọ
emailstringKhôngEmail (dùng chống trùng)
phonestringKhôngSố điện thoại
company_idstringKhôngID công ty
lifecycle_stagestringKhôngGiai đoạn vòng đời

Kiểm thử tại chỗ

POSThttps://crm-gateways.hitechcloud.vn/v1/contacts

Gửi thử sẽ ghi dữ liệu thật trên môi trường được chọn. Nên thử trên Sandbox trước. Token không được lưu lại.

Body
cURL tạo mới
curl -X POST "https://crm-gateways.hitechcloud.vn/v1/contacts" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Nguyen",
    "last_name": "Van A",
    "email": "vana@example.com",
    "phone": "0901234567",
    "company_id": "co_4b7e2f10",
    "lifecycle_stage": "lead"
  }'
Phản hồi (201 Created)
{
  "status": "success",
  "data": {
    "id": "con_8f2a1c9d",
    "first_name": "Nguyen",
    "last_name": "Van A",
    "email": "vana@example.com",
    "phone": "0901234567",
    "company_id": "co_4b7e2f10",
    "lifecycle_stage": "customer",
    "lead_source": "website",
    "tags": [
      "vip"
    ],
    "owner_id": "usr_12",
    "created_at": "2026-09-01T08:00:00+07:00",
    "updated_at": "2026-10-31T09:40:00+07:00"
  }
}