Skip to main content
GET
/
v1
/
channels
/
messages
List Channel Messages
curl --request GET \
  --url https://api.example.com/v1/channels/messages
{
  "data": {
    "messages": [
      {
        "id": "<string>",
        "channel": "<string>",
        "direction": "<string>",
        "sender": "<string>",
        "recipient": "<string>",
        "body": "<string>",
        "attachments": [
          {}
        ],
        "contact_id": "<string>",
        "deal_id": "<string>",
        "sent_at": "<string>"
      }
    ]
  },
  "meta": {}
}

Request

Query Parameters

channel
string
Filter to a single channel: slack, teams, whatsapp, telegram, or email.
contact_id
string
Filter to messages linked to the given contact.
deal_id
string
Filter to messages linked to the given deal.
direction
string
inbound or outbound.
after
string
ISO 8601 lower bound on sent_at.
page
integer
default:"1"
Page number.
per_page
integer
default:"25"
Results per page. Maximum 100.

Headers

Authorization: Bearer wbk_your_api_key_here

Response

data
object
meta
object
Pagination metadata: page, per_page, total.
Responses include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID.
curl "https://data.leadlex.com/functions/v1/api-gateway/v1/channels/messages?channel=slack&per_page=50" \
  -H "Authorization: Bearer wbk_your_api_key_here"

Example Response

{
  "data": {
    "messages": [
      {
        "id": "1713351031.001200",
        "channel": "slack",
        "direction": "outbound",
        "sender": "U01234567",
        "recipient": "C01234567",
        "body": "New deal just closed - congrats team!",
        "attachments": [],
        "contact_id": null,
        "deal_id": "deal_01HY1",
        "sent_at": "2026-04-17T10:30:31Z"
      }
    ]
  },
  "meta": { "page": 1, "per_page": 50, "total": 214 }
}

Errors

StatusCodeDescription
401invalid_keyInvalid or expired API key
403insufficient_permissionsMissing read:channels permission
429rate_limitedRate limit exceeded