Skip to content
DutiesBook API
Open app

Channels

Retrieve information about your connected messaging channels. Channels represent your WhatsApp Business accounts and other messaging integrations.

GET /channels

Get all channels accessible with your API key.

curl \
https://app.dutiesbook.com/api/external/v1/channels \
-H "X-Account-Id: acc_xxxxxxxx" \
-H "X-Api-Key: pk_xxxxxxxxxxxxxxxx" \
-H "X-Secret-Key: sk_xxxxxxxxxxxxxxxx"
200 OK
{
"success": true,
"data": {
"channels": [
{
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "Channel Name",
"type": "whatsapp",
"status": "connected",
"phoneNumber": "+xxxxxxxxxxx",
"businessName": "Business Name",
"workingHours": {
"enabled": false,
"timezone": "UTC"
},
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z"
}
],
"total": 1
}
}
GET /channels/{channelId}

Get details for a specific channel including business information and working hours.

channelId string Required
Channel UUID
curl \
https://app.dutiesbook.com/api/external/v1/channels/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
-H "X-Account-Id: acc_xxxxxxxx" \
-H "X-Api-Key: pk_xxxxxxxxxxxxxxxx" \
-H "X-Secret-Key: sk_xxxxxxxxxxxxxxxx"
200 OK
{
"success": true,
"data": {
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "Channel Name",
"type": "whatsapp",
"status": "connected",
"phoneNumber": "+xxxxxxxxxxx",
"businessName": "Business Name",
"workingHours": {
"enabled": false,
"timezone": "UTC"
},
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z"
}
}
RES_001 404
CHANNEL_NOT_FOUND

The specified channel was not found or you don't have access to it.

AUTH_008 403
CHANNEL_ACCESS_DENIED

This API key is restricted to specific channels and does not have access to this channel.

BIZ_001 422
CHANNEL_NOT_CONNECTED

The channel exists but is not currently connected. Check the channel status in your dashboard.