Leads
Retrieve all leads associated with a specific chatflow
Authorizations
Path parameters
idstringRequired
Chatflow ID
Responses
200
Successful operation
application/json
400
Invalid ID provided
404
Leads not found
500
Internal server error
get
GET /leads/{id} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
[
{
"id": "cfd531e0-82fc-11e9-bc42-526af7764f64",
"name": "John Doe",
"email": "[email protected]",
"phone": "+1234567890",
"chatflowid": "7c4e8b7a-7b9a-4b4d-9f3e-2d28f1ebea02",
"chatId": "d7b0b5d8-85e6-4f2a-9c1f-9d9a0e2ebf6b",
"createdDate": "2024-08-24T14:15:22Z"
}
]
Create a new lead associated with a specific chatflow
Authorizations
Body
idstring · uuidOptionalExample:
Unique identifier for the lead
cfd531e0-82fc-11e9-bc42-526af7764f64
namestringOptionalExample:
Name of the lead
John Doe
phonestringOptionalExample:
Phone number of the lead
+1234567890
chatflowidstringOptionalExample:
ID of the chatflow the lead is associated with
7c4e8b7a-7b9a-4b4d-9f3e-2d28f1ebea02
chatIdstringOptionalExample:
ID of the chat session the lead is associated with
d7b0b5d8-85e6-4f2a-9c1f-9d9a0e2ebf6b
createdDatestring · date-timeOptionalExample:
Date and time when the lead was created
2024-08-24T14:15:22Z
Responses
200
Lead created successfully
application/json
400
Invalid request body
422
Validation error
500
Internal server error
post
POST /leads HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 253
{
"id": "cfd531e0-82fc-11e9-bc42-526af7764f64",
"name": "John Doe",
"email": "[email protected]",
"phone": "+1234567890",
"chatflowid": "7c4e8b7a-7b9a-4b4d-9f3e-2d28f1ebea02",
"chatId": "d7b0b5d8-85e6-4f2a-9c1f-9d9a0e2ebf6b",
"createdDate": "2024-08-24T14:15:22Z"
}
{
"id": "cfd531e0-82fc-11e9-bc42-526af7764f64",
"name": "John Doe",
"email": "[email protected]",
"phone": "+1234567890",
"chatflowid": "7c4e8b7a-7b9a-4b4d-9f3e-2d28f1ebea02",
"chatId": "d7b0b5d8-85e6-4f2a-9c1f-9d9a0e2ebf6b",
"createdDate": "2024-08-24T14:15:22Z"
}
Last updated