Channels API
All endpoints require Bearer JWT.
GET /v1/channels/accounts
List all connected channel accounts.
Response 200 — array of account objects:
[
{
"id": "acc_01j...",
"tenantId": "ten_01j...",
"providerId": "whatsapp",
"name": "Main WhatsApp",
"status": "connected",
"meta": {},
"connectedAt": "ISO8601",
"lastUsedAt": "ISO8601",
"createdAt": "ISO8601"
}
]
DELETE /v1/channels/accounts/:id
Disconnect and delete a channel account.
Response: 204 No Content
POST /v1/channels/whatsapp/session
Create a WhatsApp session (initiates QR pairing).
Request (optional)
{ "name": "My WhatsApp" }
Response 201
{ "sessionId": "sess_01j...", "status": "pending" }
GET /v1/channels/whatsapp/session/:sessionId/qr
Get the QR code for scanning. Poll until status is ready.
Response 200
{ "qr": "data:image/png;base64,...", "status": "ready" }
GET /v1/channels/accounts/:id/status
Get the current status of a channel account.
Response 200
{
"id": "acc_01j...",
"status": "connected",
"connectedAt": "ISO8601"
}
Account statuses: pending, connected, disconnected, error
POST /v1/channels/accounts/:id/test
Send a test message through a specific channel account.
Request
{ "to": "+905551234567", "text": "Test message (max 500 chars)" }
Response 200 — message delivery confirmation.