Skip to content
Try Free →

Channels API

Last updated: · 3 min read

Endpoints

GET /v1/channels # List channels
GET /v1/channels/{type} # Get specific channel
PATCH /v1/channels/{type} # Update channel config
GET /v1/channels/{type}/health # Check health
POST /v1/channels/{type}/test # Test connection

List channels

Terminal window
curl https://api.askvault.co/v1/channels \
-H "Authorization: Bearer ak_xxx"

Returns:

[
{"type":"widget","enabled":true,"status":"healthy"},
{"type":"whatsapp","enabled":true,"status":"healthy"},
{"type":"slack","enabled":false,"status":"not_configured"}
]

Get channel config

Terminal window
curl https://api.askvault.co/v1/channels/widget \
-H "Authorization: Bearer ak_xxx"

Returns full config including welcome message, accent color, allowed origins.

Update config

Terminal window
curl -X PATCH https://api.askvault.co/v1/channels/widget \
-H "Authorization: Bearer ak_xxx" \
-d '{"welcome_message":"Hi! How can I help?","accent_color":"#0EA5E9"}'

Changes propagate within 30 seconds.

Check health

Terminal window
curl https://api.askvault.co/v1/channels/whatsapp/health \
-H "Authorization: Bearer ak_xxx"

Returns:

{
"status": "healthy",
"last_success": "2026-05-15T10:30:00Z",
"error_rate_24h": 0.001,
"throughput_per_minute": 42
}

Useful for monitoring dashboards.

Test connection

Terminal window
curl -X POST https://api.askvault.co/v1/channels/slack/test \
-H "Authorization: Bearer ak_xxx"

Sends a test ping; returns success/failure with detailed error if any.

Enable / disable

Terminal window
curl -X PATCH https://api.askvault.co/v1/channels/voice \
-H "Authorization: Bearer ak_xxx" \
-d '{"enabled":false}'

Disabling stops new conversations; in-flight complete normally.

Use cases

Infrastructure-as-code. Manage channel config in git; deploy via CI.

Multi-workspace fleet. Apply consistent config across 50+ workspaces.

Monitoring integration. Pull health metrics into your own dashboards.

Disaster recovery. Restore channel config from backup.

Limits

  • API rate. 60 requests per minute per key.
  • Concurrent PATCH operations. Up to 10 per workspace.
  • Config history. 90 days retained.
  • Test endpoint. Under 5 seconds typical latency.

Common pitfalls

Config drift. Manual dashboard edits diverge from IaC. Lock dashboard edits or audit regularly.

Webhook secrets rotated. API returns hash only, not value. Use rotate endpoint to regenerate.

Test endpoint costs. Each test sends a real message; budget accordingly for WhatsApp / SMS.

FAQ

Can I provision a brand-new channel via API?

Yes via POST /v1/channels/{type} with full config.

Will channel changes affect in-flight conversations?

In-flight continue with old config. New conversations use new.

Can I bulk-configure across workspaces?

Yes via account-scoped key on Enterprise.

Was this page helpful?