How Can We Help?
< All Topics
Print

Create Lead Webhook Documentation

Kenyt.AI - Create Lead Webhook Documentation

Note: Use the POST method to pass request parameters.

authToken: It can found in dashboard in the “CRM Settings” page as “Authorization Token” 
organizationId: Id of the organization.

Request:
Content-Type: application/json
Accept: application/json

*At least one of first name,last name, mobile number,email number,company are
mandatory.

FirstName
String
optional
First Name of lead
LastName
String
optional
Last Name of lead
BotId
String
required
Id of the Bot lead is to be added to
MobileNumber
String
optional
Mobile Number of the lead
EmailAddress
String
optional
Email Address of the lead
Source
String
optional
Source of the lead
Company
String
optional
Company Name of the lead
City
String
optional
City of the lead
State
String
optional
State of the lead
Country
String
optional
Country of the lead
Owner
String
optional
Email of the Owner of the lead
CreatedBy
String
optional
Name of the lead’s creator
PipelineName
String
optional
Pipeline Name to used for the lead
PipelineStage
String
optional
Stage of the lead in the selected pipeline
CustomProperties
List of custom properties
optional
Custom fields as per the requirement

Sample Curl Request:

				
					curl --location --request POST 'https://www.kenyt.ai/dashboardapi/api/crm/createlead?authToken=79e81917-bf4c-42f1-abc5-c760e2bbaa2c&organizationId=4422112' \
--header 'Content-Type: application/json' \
--data-raw '{
"FirstName":"Test Lead",
"LastName":"Last Name",
"BotId": 100,
"EmailAddress":"test220422@kenyt.com",
"MobileNumber":"7777220422",
"Source":"<Source Name>",
"Company":"<Company name>",
"City":"<City Name>",
"State":"<State Name>",
"Country":"<Country Name>",
"Owner":"<Owner'\''s Email>",
"CreatedBy":"<Creator'\''s Email/Name>",
"PipelineName":"<Lead Pipeline Name>",
"PipelineStage":"<Leas Stage>",
"CustomProperties": [
{
"Name": "<Field Name>",
"Value": "<Field Value for string type properties>",
"IValue": "<Integer Value for integer type properties>",
"DValue": "<Date Value for date type properties>"
}
]
}'

				
			

Sample Responses:

Success Response: 200 OK

				
					{
"Id": "c077f298-2f2a-445c-bf68-69960e7d1cd2",
"Success": true,
"Message": "New Lead added succesfully"
}
{
"Id": "c077f298-2f2a-445c-bf68-69960e7d1cd2",
"Success": true,
"Message": "Lead Updated Successfully"
}

				
			
Error Responses
Error Code
Description
401
Authorization Failed
400
Bad Request (Bot Id is invalid or all of First Name, Last Name, Email Address, Mobile Number, Company fields are empty)

401:

				
					{
 "Id": "null",
 "Success": false,
 "Message": "Authorization failed"
}
				
			

400:

				
					{
 "Message": " | "
}
				
			
Table of Contents
logo-finwh

Ready to See Kenyt.AI Agents in Action?

Book a personalised demo today