Skip to content

Channel Approvals

Channel approvals give you control over which channel connections are allowed to run. When a channel is created or reconnected, it enters a pending state instead of starting immediately. An admin or agent owner must explicitly approve it before the channel becomes active.

This is useful for:

  • Security: Prevent unauthorised bots from connecting to your agent
  • Review workflow: Let ops teams review channel config before activation
  • Audit trail: Keep a log of who approved what and when
1. Channel Created → Status: pending
2. Approval Request Sent (SSE) → Notify admins
3. Approve via API or UI → Channel starts
└─ or Reject → Channel is deactivated

Pending approval records live in their own table so the approval queue is independent of the channel lifecycle.

ColumnTypeDescription
idTEXT PKUUID identifier
channel_idTEXT FKReferences channels.id
agent_idTEXT FKReferences agents.id
requested_byTEXTWho initiated the channel connection
statusTEXTpending, approved, rejected
approved_byTEXTAdmin/owner who approved (null if pending/rejected)
rejected_byTEXTAdmin/owner who rejected (null if pending/approved)
reasonTEXTOptional reason for rejection
created_atTIMESTAMPWhen the approval request was created
updated_atTIMESTAMPLast status update time

The status field drives the channel lifecycle:

  • pending — Channel is waiting for approval, not yet active
  • approved — Channel was approved and can start
  • rejected — Channel was rejected and won’t start

All approval endpoints are under /api/agents/<agent_id>/channels/approvals.

GET /api/agents/<agent_id>/channels/approvals

Returns all approval requests for a given agent, ordered newest first.

Response:

{
"approvals": [
{
"id": "a1b2c3d4-...",
"channel_id": "ch-001",
"channel_type": "telegram",
"channel_name": "Support Bot",
"requested_by": "admin@evonic.dev",
"status": "pending",
"created_at": "2026-05-09 10:00:00"
},
{
"id": "e5f6g7h8-...",
"channel_id": "ch-002",
"channel_type": "whatsapp",
"channel_name": "Sales Bot",
"requested_by": "ops@evonic.dev",
"status": "approved",
"approved_by": "admin@evonic.dev",
"created_at": "2026-05-08 14:30:00",
"updated_at": "2026-05-08 14:35:00"
}
]
}
GET /api/agents/channels/approvals/pending

Returns pending approvals across all agents. Useful for admin dashboards or ops views.

Response:

{
"approvals": [
{
"id": "a1b2c3d4-...",
"channel_id": "ch-001",
"agent_id": "bookstore_bot",
"agent_name": "Bookstore Assistant",
"channel_type": "telegram",
"channel_name": "Support Bot",
"requested_by": "admin@evonic.dev",
"created_at": "2026-05-09 10:00:00"
}
]
}
POST /api/agents/<agent_id>/channels/approvals/<approval_id>/approve

Approves a pending channel. Once approved, the channel automatically starts.

Response:

{
"success": true,
"message": "Channel approved and started",
"channel_id": "ch-001",
"status": "approved"
}
POST /api/agents/<agent_id>/channels/approvals/<approval_id>/reject

Rejects a pending channel with an optional reason.

Request:

{
"reason": "Bot token belongs to a deactivated account"
}

Response:

{
"success": true,
"message": "Channel rejected",
"channel_id": "ch-001",
"status": "rejected"
}
GET /api/agents/<agent_id>/channels/approvals/<approval_id>

Returns the full details of a single approval request.

MethodEndpointDescription
GET/api/agents/<agent_id>/channels/approvalsList approvals for an agent
GET/api/agents/channels/approvals/pendingList all pending approvals across agents
GET/api/agents/<agent_id>/channels/approvals/<id>Get single approval details
POST/api/agents/<agent_id>/channels/approvals/<id>/approveApprove a pending channel
POST/api/agents/<agent_id>/channels/approvals/<id>/rejectReject a pending channel

When a channel has a pending approval, it appears in the Channels tab on the agent detail page with a clear status indicator.

Steps:

  1. Navigate to the Agents page and select your agent.
  2. Go to the Channels tab.
  3. Channels with pending approvals show a “Pending Approval” badge and an orange status indicator.
  4. Click Review to open the approval dialog.
  5. Choose one of:
    • Approve — The channel starts immediately
    • Reject — Optionally provide a reason, and the channel stays inactive
  6. The channel status updates in real time via SSE — no page refresh needed.

On the main dashboard, a Pending Approvals widget shows a count of all approvals across agents. Clicking it opens a quick-review panel where you can approve or reject without navigating to each agent.


  1. Review channel config before approving — Check the bot token, channel type, and name to make sure it’s legitimate.

  2. Use the SSE endpoint for live dashboards — Instead of polling the API every few seconds, subscribe to GET /api/events?stream=approvals and react to events as they come in.

  3. Set up notification alerts — Forward approval.pending SSE events to your team’s Slack or Discord using a webhook bridge so nobody misses a pending request.

  4. Reject with a reason — Providing a rejection reason helps the requester understand what went wrong and fix the configuration.

  5. Periodic cleanup — Rejected approvals that are months old can be safely archived. The system does not auto-delete them, but they don’t affect performance.