Add Lead
POST
/api/lead
const url = 'http://localhost:8000/api/lead';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"city":"","company":"example","contact_person":"","email":"","linkedin_url":"","notes":"","phone":"","source":"manual","specialization":"","website":""}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/api/lead \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "city": "", "company": "example", "contact_person": "", "email": "", "linkedin_url": "", "notes": "", "phone": "", "source": "manual", "specialization": "", "website": "" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
AddLeadRequest
object
city
City
string
company
required
Company
string
contact_person
Contact Person
string
email
Email
string
linkedin_url
Linkedin Url
string
notes
Notes
string
phone
Phone
string
source
Source
string
specialization
Specialization
string
website
Website
string
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}