curl --request GET \
--url https://api.chatlevel.io/v1/devices \
--header 'Authorization: Bearer <token>'{
"devices": [
{
"id": 12345,
"name": "My Device",
"status": "connected",
"qr": null,
"webhookUrl": "https://example.com/webhook",
"webhookEvents": [
"message.received",
"message.sent"
],
"messagesSent": 150,
"subscription_status": "active",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"status": {
"code": 200,
"message": "Success"
}
}Retrieve a list of your devices.
curl --request GET \
--url https://api.chatlevel.io/v1/devices \
--header 'Authorization: Bearer <token>'{
"devices": [
{
"id": 12345,
"name": "My Device",
"status": "connected",
"qr": null,
"webhookUrl": "https://example.com/webhook",
"webhookEvents": [
"message.received",
"message.sent"
],
"messagesSent": 150,
"subscription_status": "active",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"status": {
"code": 200,
"message": "Success"
}
}API key authentication. Provide your API key as: Authorization: Bearer <api_key>
A JSON array of devices
Show child attributes
Unique identifier for the device
Name of the device
Current connection status: 'qr' when waiting for QR scan, 'connected' when paired, 'timeout' when QR expired
connected, qr, timeout Base64 encoded QR code data URL (available when status is 'qr')
Webhook URL for receiving events
Events to send to webhook. See webhook documentation for event payloads.
connection.open, connection.closed, connection.auth, connection.timeout, connection.logout, message.received, message.sent, message.updated, message.deleted, call Total number of messages sent
Subscription status of the device. Inactive devices have their WhatsApp sessions stopped.
active, inactive When the device was created