API: Add New Lead
POST
api/leads
Headers
Field | Type | Description |
---|---|---|
Authtoken |
String |
Required: Basic Access Authentication token. |
Parameters
Mandatory Fields
Field | Type | Description |
---|---|---|
source |
String |
Required: Lead source. |
status |
String |
Required: Lead status. |
name |
String |
Required: Lead name. |
Optional Fields
Field | Type | Description |
---|---|---|
assigned optional |
String |
Optional: Lead assigned to a specific user. |
client_id optional |
String |
Optional: Lead from an existing customer. |
tags optional |
String |
Optional: Tags associated with the lead. |
contact optional |
String |
Optional: Lead contact person. |
title optional |
String |
Optional: Lead position/title. |
email optional |
String |
Optional: Lead email address. |
website optional |
String |
Optional: Lead website. |
phonenumber optional |
String |
Optional: Lead phone number. |
company optional |
String |
Optional: Lead company name. |
address optional |
String |
Optional: Lead physical address. |
city optional |
String |
Optional: Lead city. |
state optional |
String |
Optional: Lead state/province. |
country optional |
String |
Optional: Lead country. |
default_language optional |
String |
Optional: Lead default language. |
description optional |
String |
Optional: Lead description. |
custom_contact_date optional |
String |
Optional: Custom contact date for the lead. |
contacted_today optional |
String |
Optional: Mark if the lead was contacted today. |
is_public optional |
String |
Optional: Google sheet ID for public access. |
Example Request Payload
{
"status": "2",
"source": "6",
"assigned": "1",
"client_id": "5",
"tags": "",
"name": "Lead Name",
"contact": "Contact A",
"title": "Position A",
"email": "AAA@gmail.com",
"website": "",
"phonenumber": "123456789",
"company": "Gap Trade",
"address": "710-712 Cách Mạng Tháng Tám, P. 5, Q. Tân Bình",
"city": "London",
"state": "",
"default_language": "english",
"description": "Description",
"custom_contact_date": "",
"is_public": "on",
"contacted_today": "on"
}
Success Response (200 OK)
Field | Type | Description |
---|---|---|
status |
Boolean |
Indicates the success of the request. |
message |
String |
Message indicating successful addition of the lead. |
HTTP/1.1 200 OK
{
"status": true,
"message": "Lead add successful."
}
Error Response (4xx)
Field | Type | Description |
---|---|---|
status |
Boolean |
Indicates the failure of the request. |
message |
String |
Error message indicating the failure to add the lead. |
HTTP/1.1 404 Not Found
{
"status": false,
"message": "Lead add fail."
}