Skip to main content
POST
/
v1
/
channels
/
send
Send Channel Message
curl --request POST \
  --url https://api.example.com/v1/channels/send \
  --header 'Content-Type: application/json' \
  --data '
{
  "channel": "<string>",
  "recipient": "<string>",
  "message": "<string>",
  "subject": "<string>",
  "contact_id": "<string>",
  "deal_id": "<string>",
  "attachments": [
    {}
  ]
}
'
{
  "data": {
    "id": "<string>",
    "channel": "<string>",
    "status": "<string>",
    "sent_at": "<string>"
  }
}

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.

Headers

Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Idempotency-Key
string
Optional UUID. Strongly recommended for outbound messages so that retries do not produce duplicates.

Body Parameters

channel
string
required
Provider to send through. One of: slack, teams, whatsapp, telegram, email.
recipient
string
required
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
string
required
Message body. Plain text for SMS-style channels; Slack and Teams also accept mrkdwn / Adaptive Card syntax. Maximum 4,096 characters.
subject
string
Subject line, required only for channel: "email".
contact_id
string
Optional contact UUID. When provided, the message is logged to the contact timeline.
deal_id
string
Optional deal UUID for association.
attachments
array
Optional attachments. Each entry accepts filename, mime_type, and either content_base64 or url.

Response

data
object
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

StatusCodeDescription
400validation_errorInvalid channel, missing recipient, or body too long
401invalid_keyInvalid or expired API key
403insufficient_permissionsMissing write:channels permission or channel not connected
404conversation_requiredTeams recipient has no existing conversation; user must initiate first
409idempotency_conflictSame Idempotency-Key reused with a different payload
429rate_limitedRate limit exceeded
502provider_errorUpstream provider returned an error