v1

latestOpenAPI 3.0.1Apache 2.02026-07-2473111182.6 KB
Lead

Create a new lead

Creates a new lead. Either contactableByEmail or contactableByMobile need to be provided.

post/api/business/{businessId}/branch/{branchId}/leads

Path parameters

businessIdstring required
branchIdstring required

Request body

businessIdstring required

The business ID

branchIdstring required

The branch ID

firstNamestring required

First name of the lead

lastNamestring required

Last name of the lead

mobilestring required

Mobile phone number

emailstring required

Email address

sourcestring

Source of the lead - defaults to THIRD_PARTY_API

contactableByEmailboolean

Whether the lead can be contacted by email

contactableByMobileboolean

Whether the lead can be contacted by mobile

marketingOptInboolean

Whether the lead has opted in for marketing

metaAdIdstring

Meta ad ID

notestring

Additional notes about the lead

Example request

{
  "businessId": "Xf7saoBpuqy2t0RRIkBpXg",
  "branchId": "hPfzdyamWjxp9GzYVUETRg",
  "firstName": "John",
  "lastName": "Doe",
  "mobile": "123456789",
  "email": "john.doe@example.com",
  "source": "website signup",
  "contactableByEmail": true,
  "contactableByMobile": true,
  "marketingOptIn": true,
  "metaAdId": "123",
  "note": "Some note up to 255 characters"
}

Response

Lead created successfully

successboolean

Whether the lead was successfully created

messagestring

Response message

Example response

{
  "success": true,
  "message": "Lead created successfully"
}