Channels
Connect the rails
A channel goes live in three calls: create a provider account with your credentials, validate it against the live provider, then register the inbound webhook. Credentials are encrypted at rest and never come back out.
Supported channels
| Channel | Inbound endpoint | Self-serve webhook register |
|---|---|---|
/inbound/whatsapp | Yes — subscribes your Meta app + WABA via the Graph API | |
| Telegram | /inbound/telegram | Yes |
| Discord | /inbound/discord | Yes |
| Slack | /inbound/slack | Yes |
| SMS (Twilio) | /inbound/sms | Yes |
| RCS | /inbound/rcs | Yes |
| Email (Gmail) | /inbound/mail + OAuth (/oauth/gmail/start) and a polling worker | No — connect via Gmail OAuth; inbound arrives by poll |
| Microsoft Teams | /inbound/teams | No — configure the webhook in your Teams app manually |
GET /health reports which channels are live on your deployment: { "channels": ["whatsapp", "telegram", …] }. Channels can be configured globally via environment (single-tenant style) or per workspace via provider accounts — a workspace's own provider accounts take precedence over environment providers.
Provider accounts
A provider_account binds one channel provider (with its credentials) to your workspace. Lifecycle: draft → ready (after validation) or error. Editing credentials resets it to draft.
1. Create
/provider-accountsrequires full scopecurl -X POST "$AGENTPUSH_URL/provider-accounts" \
-H "Authorization: Bearer apk_…" \
-H "Content-Type: application/json" \
-d '{
"provider": "whatsapp",
"label": "Support line FR",
"credentials": {
"token": "EAAG…",
"phoneNumberId": "1065…",
"businessAccountId": "1122…",
"appId": "8433…",
"appSecret": "f0e1…",
"webhookVerifyToken": "a-random-string-you-choose"
}
}'
// → 201 { "account": { "id": "…", "provider": "whatsapp", "status": "draft", … } }2. Validate
/provider-accounts/:id/validatecurl -X POST "$AGENTPUSH_URL/provider-accounts/$ACCOUNT_ID/validate" \
-H "Authorization: Bearer apk_…"
// → { "status": "ready" } credentials work against the live provider
// → { "status": "error", … } credentials rejected — fix and PATCHValidation resolves the channel driver with your decrypted credentials and exercises them against the live provider. Success flips the account to ready; failure records error. For Slack it also captures the teamId used to route inbound events.
3. Register the webhook
/provider-accounts/:id/webhook/registercurl -X POST "$AGENTPUSH_URL/provider-accounts/$ACCOUNT_ID/webhook/register" \
-H "Authorization: Bearer apk_…"
// WhatsApp example response:
// → { "callbackUrl": "https://…/inbound/whatsapp", "tunnel": false, "subscribedWaba": true }Available for whatsapp, telegram, discord, sms, rcs and slack. agentpush resolves its own public base URL (falling back to a dev tunnel locally — the response's tunnel flag tells you which), then registers the correct callback with the provider:
- WhatsApp — subscribes your Meta app to
messagesevents (Graph API/subscriptions) and, whenbusinessAccountIdis set, subscribes the WABA (/subscribed_apps). Requirestoken,phoneNumberId,appId,appSecretandwebhookVerifyToken. - Telegram — registers the bot webhook (requires the bot
token; awebhookSecretis used to authenticate deliveries when set). - Other providers — analogous per-provider flows; a provider without self-serve registration returns
400.
Manage
/provider-accountslist (credentials stripped)/provider-accounts/:idupdate label / credentials → back to draft/provider-accounts/:idrevokes the stored secret, then deletesOnce an account is ready and its webhook registered, outbound sends pick it up automatically and inbound messages start flowing into the routing engine — continue with Inbound & BYO inference.