get
List channels
The channels sales go out through
GET /api/v1/channels
A live key lists your business's own lines, oldest first; a test key lists the built-in mock, which serves every network. success_rate is a fraction from 0 to 1 over your attempts in the last 24 hours, and balance the line's last read airtime, null when it was never read. Nothing is called to answer it. See sold as and channel.
Authenticate with a bearer API key: rg_test_ in test mode, rg_live_ in live.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cursor | query | string | no | page.next_cursor from the previous page. See pagination. |
limit | query | integer | no | Items per page, 1 to 100. Default 25. |
Request
curl -X GET "https://api.useroutegate.com/api/v1/channels?limit=25" \
-H "Authorization: Bearer $ROUTEGATE_API_KEY"Response
200
{
"success": true,
"code": "OK",
"message": "OK",
"data": {
"items": [
{
"id": "mock",
"kind": "provider",
"network": null,
"status": "active",
"balance": null,
"success_rate": 1
}
],
"page": {
"next_cursor": null,
"has_more": false
}
}
}Error
401 AUTH_REQUIRED: The key is missing, unknown, revoked or expired. Every code is in errors.
{
"success": false,
"data": null,
"message": "Invalid API key",
"code": "AUTH_REQUIRED"
}Give this to your coding agent
Read https://useroutegate.com/docs/api/public/listChannels.md and implement this call. Follow page.next_cursor while page.has_more is true. Amounts are naira: a number with two decimals, like 1500.50.