Channels
A messaging channel read + disconnect — connecting one stays a browser flow.
Download the full API pública projection: openapi.json.
Check and disconnect channels explains this resource in prose, with runnable examples.
| Method | Path | What it does |
|---|---|---|
GET | /messaging-accounts | List channels |
DELETE | /messaging-accounts/{id} | Disconnect a channel |
GET | /messaging-accounts/{id} | Fetch one channel |
GET | /messaging-accounts/{id}/health | Live channel identity & health |
GET | /messaging-accounts/stats | Per-account traffic stats |
GET /messaging-accounts
List channels
Every messaging account in the workspace, secrets redacted. Connecting a new one is a browser flow (OAuth/Atribu/IMAP) — see the MessagingAccounts reference — but everything already connected is readable here.
curl https://api.vitrinadev.com/api/v1/messaging-accounts \
-H "Authorization: Bearer $VITRINA_KEY"Example response (200)
{
"data": [
{
"id": "e4e4e4e4-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"name": "WhatsApp Providencia",
"kind": "whatsapp_cloud",
"channels": [
"whatsapp"
],
"config": {
"connected_via": "atribu_partner"
},
"secrets": {
"atribu_access_token": "<redacted>"
},
"enabled": true,
"default_team_id": "cccccccc-0000-4000-8000-000000000001",
"assignment_mode": "auto_round_robin",
"assignee_user_ids": [],
"assignee_ai_agent_id": null,
"help_center_id": null,
"public_number_id": null,
"voice_attachable": false,
"voice_attach_source": null,
"created_at": "2026-01-10T13:00:00.000Z",
"updated_at": "2026-09-10T13:00:00.000Z"
}
],
"meta": {
"total": 1
}
}Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429
DELETE /messaging-accounts/{id}
Disconnect a channel
Tears down the provider-side connection first (best-effort, a no-op for a non-partner kind — so a fan-out subscription never keeps delivering to a connection the workspace already deleted locally), then removes the account row. Every conversation, message and lead the channel already produced is untouched: this ends the CONNECTION, not the history.
| Parameter | In | Type | Required | Constraints |
|---|---|---|---|---|
id | path | uuid | yes |
curl -X DELETE https://api.vitrinadev.com/api/v1/messaging-accounts/<id> \
-H "Authorization: Bearer $VITRINA_KEY"Answers: 204 · 400 · 401 · 403 · 404 · 409 · 429
GET /messaging-accounts/{id}
Fetch one channel
The account row, secrets redacted.
| Parameter | In | Type | Required | Constraints |
|---|---|---|---|---|
id | path | uuid | yes |
curl https://api.vitrinadev.com/api/v1/messaging-accounts/<id> \
-H "Authorization: Bearer $VITRINA_KEY"Example response (200)
{
"data": {
"id": "e4e4e4e4-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"name": "WhatsApp Providencia",
"kind": "whatsapp_cloud",
"channels": [
"whatsapp"
],
"config": {
"connected_via": "atribu_partner"
},
"secrets": {
"atribu_access_token": "<redacted>"
},
"enabled": true,
"default_team_id": "cccccccc-0000-4000-8000-000000000001",
"assignment_mode": "auto_round_robin",
"assignee_user_ids": [],
"assignee_ai_agent_id": null,
"help_center_id": null,
"public_number_id": null,
"voice_attachable": false,
"voice_attach_source": null,
"created_at": "2026-01-10T13:00:00.000Z",
"updated_at": "2026-09-10T13:00:00.000Z"
}
}Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429
GET /messaging-accounts/{id}/health
Live channel identity & health
Dials the provider (or Atribu, for a partner-connected account) right now — the connected phone/IG account/mailbox identity, webhook delivery state, and WhatsApp account health (quality rating, messaging limit) where applicable. stored rides along: the last health snapshot the periodic checker wrote, for comparing a live read against what was already known. ?refresh=true forces a fresh probe instead of the provider’s own cache. A live check that itself fails (provider down, expired token) still answers 200, with a fallback identity/webhook reporting the failure — this call never breaks a health dashboard by 500ing.
| Parameter | In | Type | Required | Constraints |
|---|---|---|---|---|
id | path | uuid | yes | |
refresh | query | true \ | false | no |
curl https://api.vitrinadev.com/api/v1/messaging-accounts/<id>/health \
-H "Authorization: Bearer $VITRINA_KEY"Example response (200)
{
"data": {
"channel": "whatsapp",
"kind": "whatsapp",
"connected_via": "atribu_partner",
"identity": {
"phone_number": "+56912345000",
"display_name": "Autos del Valle"
},
"webhook": {
"status": "delivering",
"last_event_at": "2026-09-15T18:20:00.000Z"
},
"whatsapp": {
"quality_rating": "GREEN",
"messaging_limit": "TIER_10K"
},
"stored": {
"status": "ok",
"checked_at": "2026-09-15T18:00:00.000Z",
"since": "2026-09-01T00:00:00.000Z"
}
}
}Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429
GET /messaging-accounts/stats
Per-account traffic stats
One row per account that has traffic in the last 30 days — an idle account is absent rather than present with zeros, so join against GET /messaging-accounts for a complete list. Registered before /\{id\} on the router so stats is never read as an account id.
curl https://api.vitrinadev.com/api/v1/messaging-accounts/stats \
-H "Authorization: Bearer $VITRINA_KEY"Example response (200)
{
"data": [
{
"messaging_account_id": "e4e4e4e4-0000-4000-8000-000000000001",
"conversations_total": 128,
"messages_30d": 640,
"inbound_30d": 410,
"outbound_30d": 230,
"last_message_at": "2026-09-15T18:20:00.000Z"
}
]
}Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429
Payment method
The workspace's payment provider and its mandate status — what unlocks self-serve add-on activation — and the write that connects it through Fintoc or Mercado Pago.
Clinic agenda
A clinic's day: read the agenda, find free slots, book and move an appointment, with the same ids whichever system runs it. A connected app reads it with patient pseudonyms.