For the complete documentation index, see llms.txt. This page is also available as Markdown.

Leads

This page provides API documentation for creating a lead in Saleschat.pro, including the required parameters and sample responses for successful lead creation.

Create a new lead for the specified organization

post

Creates a new lead with the provided details. The request must include either a valid bearer token or an x-org-api-key for authentication. The response will contain the details of the created lead.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
orgIdstringRequired
Body
crm_idstringRequired
first_namestringRequired
last_namestringOptional
phone_numberstringRequired
opt_in_dateinteger · int64Optional
Responses
200

Successfully created lead

application/json
lead_idstringOptional
crm_idstringOptional
first_namestringOptional
last_namestringOptional
phone_numberstringOptional
opt_in_dateinteger · int64Optional
post/v4/orgs/{orgId}/leads

Assign a lead to a user

put

Assigns the specified lead to a user. The request must include either a valid bearer token or an x-org-api-key for authentication. The request body should contain either the ID or the email of the user to assign the lead to.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
orgIdstringRequired
leadIdstringRequired

Saleschat-generated lead ID (UUID) or the lead's CRM ID — both are resolved.

Body
user_idstringOptional
user_emailstringOptional
Responses
202

Successfully assigned lead

No content

put/v4/orgs/{orgId}/leads/{leadId}/assign

No content

Add an event for a lead

put

Records a custom event for the specified lead. If the event type matches a known automation trigger it will be enqueued for processing. Uses distinct_id for idempotency — duplicate requests with the same distinct_id are silently accepted.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
orgIdstringRequired
leadIdstringRequired

Saleschat-generated lead ID (UUID) or the lead's CRM ID — both are resolved.

Body
distinct_idstring · max: 36Optional
eventstring · max: 256Required
Responses
202

Event accepted

No content

put/v4/orgs/{orgId}/leads/{leadId}/events

No content

Last updated