curl --request POST \
--url https://app.leonar.app/api/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"channel": "email",
"subject": "Exciting opportunity at Doctolib",
"content": "Hi Sophie, I came across your profile and thought you might be interested..."
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": "<string>",
"content": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"channel": "<string>",
"contact": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"first_name": "Sophie",
"last_name": "Martin",
"title": "Senior Software Engineer",
"current_company": "Doctolib",
"location": "Paris, France",
"linkedin_profile": "https://www.linkedin.com/in/sophie-martin",
"emails": [
{
"email": "sophie@doctolib.com",
"type": "work"
}
],
"phones": [
{
"phone": "+33612345678",
"type": "personal"
}
],
"tags": [
"frontend",
"senior"
],
"global_status": "new",
"source": "linkedin",
"summary": null,
"skills": [
"React",
"TypeScript",
"Node.js"
],
"languages": [
"French",
"English"
],
"years_experience": 8,
"do_not_contact": false,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-20T14:00:00Z",
"last_contacted_at": null,
"archived_at": null
}
}
}Sends a message to a contact. Creates a conversation if one doesn’t exist.
curl --request POST \
--url https://app.leonar.app/api/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"channel": "email",
"subject": "Exciting opportunity at Doctolib",
"content": "Hi Sophie, I came across your profile and thought you might be interested..."
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": "<string>",
"content": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"channel": "<string>",
"contact": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"first_name": "Sophie",
"last_name": "Martin",
"title": "Senior Software Engineer",
"current_company": "Doctolib",
"location": "Paris, France",
"linkedin_profile": "https://www.linkedin.com/in/sophie-martin",
"emails": [
{
"email": "sophie@doctolib.com",
"type": "work"
}
],
"phones": [
{
"phone": "+33612345678",
"type": "personal"
}
],
"tags": [
"frontend",
"senior"
],
"global_status": "new",
"source": "linkedin",
"summary": null,
"skills": [
"React",
"TypeScript",
"Node.js"
],
"languages": [
"French",
"English"
],
"years_experience": 8,
"do_not_contact": false,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-20T14:00:00Z",
"last_contacted_at": null,
"archived_at": null
}
}
}API key starting with leo_
email, linkedin, whatsapp Required for email
Connected account to send from. Auto-selected if omitted.
LinkedIn message type (default message)
message, inmail, invitation Message sent
Show child attributes