curl --request POST \
--url https://v2.flabs.in/client/crm/lead/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branchID": "6530a4a6f1d2c8b7e9a12345",
"integratorID": "EXT-LEAD-10231",
"phase": "lead",
"first_name": "Rahul",
"last_name": "Sharma",
"contact": "9876543210",
"country_code": "91",
"email": "rahul@example.com",
"age": 32,
"age_type": "year",
"gender": "male",
"address": "42 Park Street",
"pincode": "560001",
"source": "facebook_ads",
"priority": "high",
"tests": [
{
"test": "6530a4a6f1d2c8b7e9aabcde",
"cost": 350
}
],
"packages": [
{
"package": "6530a4a6f1d2c8b7e9afedcb",
"price": 1499
}
],
"unmappedTests": [
{
"name": "Vitamin D3 (custom name)",
"cost": 800
}
],
"unmappedPackages": [
{
"name": "Bridal Glow Panel",
"price": 2500
}
],
"discountAmount": 100,
"totalAmount": 4549
}
'{
"success": true,
"leadId": "6530a4a6f1d2c8b7e9a54321",
"phase": "lead",
"message": "Lead created successfully"
}{
"success": false,
"status": 400,
"message": "Bad Request",
"error": {
"details": "first_name is required"
}
}{
"success": false,
"status": 403,
"message": "Forbidden",
"error": {
"details": "branchID does not belong to your account"
}
}{
"success": false,
"status": 409,
"message": "Conflict",
"error": {
"details": "Lead with contact 9876543210 already exists today"
}
}{
"success": false,
"status": 500,
"message": "Internal Server Error",
"error": {
"details": "An unexpected error occurred"
}
}CRM
Create Lead or Booking
Creates a CRM entry for the patient. Set phase: "lead" (default) to drop the entry into the lead funnel — it will be auto-assigned to a telecaller and trigger a NEW_LEAD notification. Set phase: "booking" to skip the lead stage and create a confirmed booking directly — it will trigger a BOOKING_CONFIRMED notification.
POST
/
client
/
crm
/
lead
/
create
curl --request POST \
--url https://v2.flabs.in/client/crm/lead/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branchID": "6530a4a6f1d2c8b7e9a12345",
"integratorID": "EXT-LEAD-10231",
"phase": "lead",
"first_name": "Rahul",
"last_name": "Sharma",
"contact": "9876543210",
"country_code": "91",
"email": "rahul@example.com",
"age": 32,
"age_type": "year",
"gender": "male",
"address": "42 Park Street",
"pincode": "560001",
"source": "facebook_ads",
"priority": "high",
"tests": [
{
"test": "6530a4a6f1d2c8b7e9aabcde",
"cost": 350
}
],
"packages": [
{
"package": "6530a4a6f1d2c8b7e9afedcb",
"price": 1499
}
],
"unmappedTests": [
{
"name": "Vitamin D3 (custom name)",
"cost": 800
}
],
"unmappedPackages": [
{
"name": "Bridal Glow Panel",
"price": 2500
}
],
"discountAmount": 100,
"totalAmount": 4549
}
'{
"success": true,
"leadId": "6530a4a6f1d2c8b7e9a54321",
"phase": "lead",
"message": "Lead created successfully"
}{
"success": false,
"status": 400,
"message": "Bad Request",
"error": {
"details": "first_name is required"
}
}{
"success": false,
"status": 403,
"message": "Forbidden",
"error": {
"details": "branchID does not belong to your account"
}
}{
"success": false,
"status": 409,
"message": "Conflict",
"error": {
"details": "Lead with contact 9876543210 already exists today"
}
}{
"success": false,
"status": 500,
"message": "Internal Server Error",
"error": {
"details": "An unexpected error occurred"
}
}Body
application/json
Was this page helpful?