Quickstart
Get started with LivChat.ai in just a few steps.
Step 1: Get Your API Key
- Go to livchat.ai
- Scan the QR code with your WhatsApp
- Sign up or log in to your account
- Navigate to Settings > API Keys
- Click Create API Key
Your API key starts with lc_live_ for production or lc_test_ for testing.
Step 2: Connect Your WhatsApp
Before sending messages, you need to connect a WhatsApp session:
# Check session status
curl https://api.livchat.ai/v1/session/status \
-H "Authorization: Bearer YOUR_API_KEY"
If not connected, get a QR code to scan:
# Get QR code
curl https://api.livchat.ai/v1/session/qr \
-H "Authorization: Bearer YOUR_API_KEY"
Step 3: Send Your First Message
Once connected, send a message:
curl -X POST https://api.livchat.ai/v1/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "5511999999999",
"body": "Hello from LivChat!"
}'
Step 4: Verify Number Has WhatsApp
Before sending, you can check if a number has WhatsApp:
curl -X POST https://api.livchat.ai/v1/contacts/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phones": ["5511999999999", "5511888888888"]
}'
Response:
{
"success": true,
"code": 200,
"data": [
{
"phone": "5511999999999",
"isInWhatsapp": true,
"jid": "5511999999999@s.whatsapp.net"
},
{
"phone": "5511888888888",
"isInWhatsapp": false,
"jid": null
}
]
}
What’s Next?