Skip to main content
POST
/
messages
Send a message to a contact
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
    }
  }
}

Authorizations

Authorization
string
header
required

API key starting with leo_

Body

application/json
contact_id
string<uuid>
required
channel
enum<string>
required
Available options:
email,
linkedin,
whatsapp
content
string
required
subject
string

Required for email

sender_account_id
string<uuid>

Connected account to send from. Auto-selected if omitted.

linkedin_message_type
enum<string>

LinkedIn message type (default message)

Available options:
message,
inmail,
invitation

Response

Message sent

data
object