Skip to main content
POST
Send Message

Authorizations

X-API-Key
string
header
required

API key for programmatic access (format nl_live_* or nl_test_*)

Path Parameters

id
string
required

MongoDB ObjectId of the conversation.

Body

application/json
message
string
required

The message text to send.

Response

Message sent successfully. Returns the updated conversation.

_id
string
required

MongoDB ObjectId of the conversation.

Example:

"665f1a2b3c4d5e6f7a8b9c0d"

leadId
string
required

The ID of the associated lead.

accountId
string
required

MongoDB ObjectId of the account (tenant).

agentConfigId
string
required

MongoDB ObjectId of the agent configuration used.

channel
enum<string>
required

The messaging channel used for this conversation.

Available options:
whatsapp,
telegram,
email
leadPhone
string
required

The lead's phone number.

status
enum<string>
required

Current status of the conversation. archived sessions were superseded (lead reset or outreach retry) and are kept as history.

Available options:
active,
completed,
handed_off,
dropped,
archived
currentStageIndex
integer
required

Index of the current conversation stage.

messages
object[]
required

Ordered list of messages in the conversation.

messageCount
integer
required

Total number of messages in the conversation.

createdAt
string<date-time>
required

When the conversation was created.

updatedAt
string<date-time>
required

When the conversation was last updated. Filter list results with updatedAfter / updatedBefore for incremental sync.

leadEmail
string

The lead's email address.

outreachFailure
object

Present when the messaging provider rejected the opening message (for example an expired WhatsApp access token). The lead never received the outreach; use POST /api/conversations/bulk-retry.

currentStageName
string

Name of the current conversation stage.

summary
string

Reserved for an LLM-generated prose brief of the conversation. Not populated today. For structured key points (budget, timeline, etc.), use GET /api/preferences/{leadId} (Lead Insights) instead.

qualificationResult
object

Deprecated historical scorecard. New completes do not write this field; prefer currentStageName (terminal stage) as the journey outcome.