Cuộc gọi (calls) — Tạo

Tạo mới một cuộc gọi qua POST.

Xem Markdown

Endpoint POST /v1/calls tạo mới một cuộc gọi.

Endpoint

MethodEndpointMô tả
POST/v1/callsTạo mới cuộc gọi

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

Tham sốKiểuBắt buộcMô tả
directionstringCóinbound | outbound
contact_idstringCóLiên hệ của cuộc gọi
deal_idstringKhôngCơ hội liên quan
duration_secondsnumberKhôngThời lượng (giây)
outcomestringKhôngconnected | missed | voicemail
notesstringKhôngGhi chú cuộc gọi

Kiểm thử tại chỗ

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

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/calls" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "direction": "outbound",
    "contact_id": "con_8f2a1c9d",
    "duration_seconds": 320,
    "outcome": "connected"
  }'
Phản hồi (201 Created)
{
  "status": "success",
  "data": {
    "id": "call_9a8b7c6d",
    "direction": "outbound",
    "contact_id": "con_8f2a1c9d",
    "deal_id": "deal_a19c330e",
    "duration_seconds": 320,
    "outcome": "connected",
    "notes": "Khach dong y nhan bao gia",
    "called_at": "2026-10-31 11:00:00",
    "created_at": "2026-10-31T11:05:00+07:00"
  }
}