- Widget leads — contacts captured through an agent’s embedded chat widget lead form (
name+phone). Stored against a specific agent. No authentication required to submit. - Account leads — contacts you manage directly in your BotSmith account (
name+contact+notes+status). Used for your own CRM-style tracking. Requires authentication.
Public: Capture a Widget Lead
POST /api/public/lead/{chatbot_id}
Submits a lead captured through an agent’s widget lead form. No authentication required — this endpoint is called by the embedded widget on your visitors’ behalf.
BotSmith deduplicates rapid submissions: if the same name and phone number are submitted for the same agent within 15 seconds, the existing lead record is returned instead of creating a duplicate.
string
required
The unique ID of the agent whose widget the lead was captured through.
string
required
The contact’s full name.
string
required
The contact’s phone number in any format (e.g.,
"+1-555-0100", "07911 123456").200 OK):
string
Unique identifier for the captured lead.
string
The agent ID the lead was captured through.
string
The contact’s name as submitted.
string
The contact’s phone number as submitted.
string
ISO 8601 timestamp of when the lead was captured.
List Widget Leads for an Agent
GET /api/chatbot-leads/{chatbot_id}
Returns all leads captured through a specific agent’s widget, sorted by most recent first. Requires authentication — you can only access leads for agents that belong to your account.
string
required
The unique ID of the agent whose widget leads you want to list.
200 OK):
List Account Leads
GET /api/leads
Returns all account-level leads belonging to the authenticated user.
200 OK):
string
Unique identifier for the lead.
string
The ID of the account that owns this lead.
string
The contact’s name.
string
Contact information — typically an email address or phone number.
string
Lead status:
"New", "Contacted", or "Closed".string | null
Optional free-text notes about the lead.
string
ISO 8601 timestamp of when the lead was created.
string
ISO 8601 timestamp of the last update to the lead.
Create an Account Lead
POST /api/leads
Manually creates a new account-level lead. Your plan determines how many leads you can store — a 403 response means you have reached your limit.
string
required
The contact’s full name.
string
required
Contact information for the lead — typically an email address or phone number.
string
Optional free-text notes about the lead (e.g., source, interest, context).
string
Initial status for the lead. One of:
"New" (default), "Contacted", "Closed".200 OK):
Update an Account Lead
PUT /api/leads/{lead_id}
Updates one or more fields on an existing account-level lead. Only include the fields you want to change.
string
required
The unique ID of the lead to update.
string
Updated contact name.
string
Updated contact information.
string
Updated lead status:
"New", "Contacted", or "Closed".string
Updated notes.
200 OK): The updated lead object (same structure as List Account Leads).
Delete an Account Lead
DELETE /api/leads/{lead_id}
Permanently deletes an account-level lead. Returns a confirmation object on success. You can only delete leads that belong to your account.
string
required
The unique ID of the lead to delete.
200 OK):
boolean
true when the lead was successfully deleted.string
Human-readable confirmation message.
string
The ID of the lead that was deleted.