Request
LeadLex can send messages through any connected messaging provider. Slack, WhatsApp, and Telegram are fully supported with direct recipient addressing; Microsoft Teams requires an existing conversation context because Teams does not allow unsolicited 1:1 bot messages.
Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Optional UUID. Strongly recommended for outbound messages so that retries do not produce duplicates.
Body Parameters
Provider to send through. One of: slack, teams, whatsapp, telegram, email.
Provider-specific recipient identifier:
slack — channel ID (e.g. C01234567) or user ID (U01234567)
teams — conversation ID (Teams does not allow unsolicited user DMs; the conversation must already exist)
whatsapp — E.164 phone number (e.g. +14155550100)
telegram — numeric chat ID
email — email address
Message body. Plain text for SMS-style channels; Slack and Teams also accept mrkdwn / Adaptive Card syntax. Maximum 4,096 characters.
Subject line, required only for channel: "email".
Optional contact UUID. When provided, the message is logged to the contact timeline.
Optional deal UUID for association.
Optional attachments. Each entry accepts filename, mime_type, and either content_base64 or url.
Response
Responses include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID.
curl -X POST \
https://data.leadlex.com/functions/v1/api-gateway/v1/channels/send \
-H "Authorization: Bearer wbk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"channel": "slack",
"recipient": "C01234567",
"message": "New deal just closed - congrats team!"
}'
Example Response
{
"data": {
"id": "1713351031.001200",
"channel": "slack",
"status": "sent",
"sent_at": "2026-04-17T10:30:31Z"
}
}
Errors
| Status | Code | Description |
|---|
| 400 | validation_error | Invalid channel, missing recipient, or body too long |
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing write:channels permission or channel not connected |
| 404 | conversation_required | Teams recipient has no existing conversation; user must initiate first |
| 409 | idempotency_conflict | Same Idempotency-Key reused with a different payload |
| 429 | rate_limited | Rate limit exceeded |
| 502 | provider_error | Upstream provider returned an error |