Skip to main content
This guide walks you through setting up API access and making your first requests.

1. Get your API key

1

Open settings

Go to Settings > API in your Leonar dashboard.
2

Create a key

Click Create API key, give it a name, and select the scopes you need. For this quickstart, select the read_only bundle.
3

Copy the key

Copy the key starting with leo_. You won’t be able to see it again.

2. Make your first request

curl -X GET "https://app.leonar.app/api/v1/contacts?limit=5" \
  -H "Authorization: Bearer leo_your_api_key"

3. Create a contact

curl -X POST "https://app.leonar.app/api/v1/contacts" \
  -H "Authorization: Bearer leo_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Sophie",
    "last_name": "Martin",
    "title": "Senior Developer",
    "current_company": "Doctolib",
    "emails": [{"email": "sophie@example.com", "type": "work"}]
  }'

4. Search contacts

Use the search endpoint for full-text search across contacts:
curl -X POST "https://app.leonar.app/api/v1/contacts/search" \
  -H "Authorization: Bearer leo_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "developer python",
    "location": "Paris",
    "limit": 20
  }'

Next steps