AurionAI Docs

Channels

Configure email, WhatsApp, and voice channels for omnichannel support.

⚠️ Preview — not yet in the public API

The endpoints on this page are part of the AurionAI helpdesk and are currently accessible only through an authenticated dashboard session. They are not yet exposed through public API keys — a request authenticated with X-API-Key returns 403. Public API-key access is planned. The reference below documents the intended contract.

Channels

Aurion supports multiple communication channels for receiving and responding to support requests. Each channel type has its own configuration API.


Email Channels

Email channels connect mailboxes to your helpdesk. Incoming emails automatically create conversations.

List Email Channels

cURL
curl "https://apps.aurionai.net/api/v2/email/channels?limit=50&offset=0" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Query parameters:

ParameterTypeDescription
limitintegerPage size, 1100 (default 50)
offsetintegerNumber of records to skip (default 0)
statusstringFilter by status (active, paused, error, disconnected)
providerstringFilter by provider (aurion, microsoft, google, smtp)

Response:

{
  "items": [
    {
      "id": "ec_abc123",
      "address": "support@example.com",
      "display_name": "IT Support",
      "provider": "microsoft",
      "is_default": false,
      "is_verified": true,
      "status": "active",
      "mail_server_type": "managed",
      "email_system": "incoming_outgoing",
      "created_at": "2026-02-01T10:00:00Z",
      "updated_at": "2026-02-01T10:00:00Z"
    }
  ],
  "total": 1,
  "limit": 50,
  "offset": 0
}

Create Email Channel

curl -X POST "https://apps.aurionai.net/api/v2/email/channels" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "support@example.com",
    "display_name": "Support Inbox",
    "provider": "microsoft",
    "provider_config": {
      "client_id": "azure_app_client_id",
      "tenant_id": "azure_tenant_id"
    }
  }'

Returns 201 Created with the new EmailChannelV2 object. address is required (validated email, 3–255 chars); display_name, provider (default aurion), and provider_config are optional.

Supported Email Providers:

ProviderValueDescription
AurionaurionBuilt-in email handling
Microsoft 365microsoftOffice 365 / Outlook
GooglegoogleGmail / Google Workspace
Custom SMTPsmtpAny SMTP server

Update Email Channel

curl -X PATCH "https://apps.aurionai.net/api/v2/email/channels/ec_abc123" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "display_name": "Updated Support Inbox"
  }'

Delete Email Channel

Delete an email channel. The primary (default) mailbox cannot be deleted.

curl -X DELETE "https://apps.aurionai.net/api/v2/email/channels/ec_abc123" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Returns 204 No Content on success. Returns 409 Conflict ({"detail": "Cannot delete the primary mailbox."}) if the channel is the primary mailbox.

Other Email Channel Endpoints

Method & PathPurpose
GET /api/v2/email/channels/{channel_id}Get a single email channel
GET /api/v2/email/channels/healthHealth summary (counts of active / disconnected / error channels)
POST /api/v2/email/channels/{channel_id}/set-primaryMark a channel as the primary (default) mailbox
POST /api/v2/email/channels/{channel_id}/test-connectionTest IMAP/SMTP connectivity
POST /api/v2/email/channels/{channel_id}/disconnectDisconnect a channel
GET /api/v2/email/channels/oauth/microsoft/configMicrosoft 365 OAuth configuration
POST /api/v2/email/channels/oauth/microsoft/exchangeExchange a Microsoft OAuth code
GET /api/v2/email/channels/oauth/google/configGoogle OAuth configuration
POST /api/v2/email/channels/oauth/google/exchangeExchange a Google OAuth code

WhatsApp Channels

WhatsApp channels enable support conversations via WhatsApp Business API.

List WhatsApp Channels

curl "https://apps.aurionai.net/api/v2/whatsapp/channels?limit=50&offset=0" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Query parameters:

ParameterTypeDescription
limitintegerPage size, 1100 (default 50)
offsetintegerNumber of records to skip (default 0)
is_activebooleanFilter by active status

The response is paginated: { "items": [ … ], "total": N, "limit": L, "offset": O }.

Create WhatsApp Channel

curl -X POST "https://apps.aurionai.net/api/v2/whatsapp/channels" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number_id": "123456789",
    "waba_id": "987654321",
    "display_number": "+33612345678",
    "display_name": "Support WhatsApp",
    "access_token": "<meta_access_token>"
  }'

Required fields are phone_number_id, waba_id, display_number, and access_token (min 8 chars). Optional: display_name, webhook_secret (auto-generated server-side when blank), quality_rating (default GREEN), messaging_tier (default TIER_1), is_active (default true).

Response: Returns 201 Created. The create response is the only one that includes a one-time webhook_secret so you can copy it into Meta Business Suite — it is not returned on subsequent GET / PATCH calls.

{
  "id": "wac_abc123",
  "phone_number_id": "123456789",
  "waba_id": "987654321",
  "display_number": "+33612345678",
  "display_name": "Support WhatsApp",
  "quality_rating": "GREEN",
  "messaging_tier": "TIER_1",
  "last_customer_message_at": null,
  "is_active": true,
  "webhook_secret": "whsec_one_time_value",
  "created_at": "2026-02-01T10:00:00Z",
  "updated_at": "2026-02-01T10:00:00Z"
}

Get WhatsApp Channel

curl "https://apps.aurionai.net/api/v2/whatsapp/channels/wac_abc123" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Response:

{
  "id": "wac_abc123",
  "phone_number_id": "123456789",
  "waba_id": "987654321",
  "display_number": "+33612345678",
  "display_name": "Support WhatsApp",
  "quality_rating": "GREEN",
  "messaging_tier": "TIER_1",
  "last_customer_message_at": "2026-02-01T11:30:00Z",
  "is_active": true,
  "created_at": "2026-02-01T10:00:00Z",
  "updated_at": "2026-02-01T10:00:00Z"
}

Update WhatsApp Channel

curl -X PATCH "https://apps.aurionai.net/api/v2/whatsapp/channels/wac_abc123" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "display_name": "Updated WhatsApp",
    "is_active": false
  }'

All fields are optional on update: phone_number_id, waba_id, display_number, display_name, access_token, webhook_secret, quality_rating, messaging_tier, is_active.

Delete WhatsApp Channel

curl -X DELETE "https://apps.aurionai.net/api/v2/whatsapp/channels/wac_abc123" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Returns 204 No Content on success.

Message Templates

WhatsApp requires pre-approved message templates for outbound messages.

List templates
curl "https://apps.aurionai.net/api/v2/whatsapp/templates?channel_id=wac_abc123&limit=100&offset=0" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Query parameters (GET /api/v2/whatsapp/templates):

ParameterTypeDescription
channel_idstringFilter templates by channel
statusstringFilter by approval status (e.g. APPROVED, PENDING, REJECTED)
limitintegerPage size, 1200 (default 100)
offsetintegerNumber of records to skip (default 0)

Templates are also available per channel via GET /api/v2/whatsapp/channels/{channel_id}/templates (same query parameters). The response is the paginated envelope { "items": [ … ], "total": N, "limit": L, "offset": O }.

Create template
curl -X POST "https://apps.aurionai.net/api/v2/whatsapp/channels/wac_abc123/templates" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "template_name": "ticket_update",
    "language": "en",
    "category": "UTILITY",
    "components": [
      {
        "type": "BODY",
        "text": "Hi {{1}}, your ticket #{{2}} has been updated. Status: {{3}}"
      }
    ]
  }'

Templates are created per channel at POST /api/v2/whatsapp/channels/{channel_id}/templates. template_name is required (1–128 chars); language defaults to en, status to PENDING, category to UTILITY. components is a list of Meta template component objects; meta_template_id is optional. Returns 201 Created. Templates require WhatsApp approval before they can be used.

Edit template
curl -X PATCH "https://apps.aurionai.net/api/v2/whatsapp/channels/wac_abc123/templates/wat_abc123" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "MARKETING"
  }'

Only components and category are editable (Meta requires delete + recreate to change template_name or language). At least one of components (non-empty) or category must be supplied, otherwise the request is rejected with 422.

Delete template
curl -X DELETE "https://apps.aurionai.net/api/v2/whatsapp/channels/wac_abc123/templates/wat_abc123" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Returns 204 No Content on success.

Sync Templates

Sync message templates from Meta for a specific channel. This fetches the latest template statuses and content from the WhatsApp Business API:

curl -X POST "https://apps.aurionai.net/api/v2/whatsapp/channels/wac_abc123/templates/sync" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Response:

{
  "ok": true,
  "synced": 12,
  "channel_id": "wac_abc123",
  "status": "ok"
}

Send Test Message

Send a test message through a WhatsApp channel to verify connectivity:

curl -X POST "https://apps.aurionai.net/api/v2/whatsapp/channels/wac_abc123/send-test" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "to_wa_id": "33612345678",
    "body": "Hello! This is a test message from Aurion."
  }'

Response (success):

{
  "ok": true,
  "status": "sent",
  "provider_message_id": "wamid.xxxx",
  "payload": { "messages": [{ "id": "wamid.xxxx" }] }
}

If Meta rejects the message, the endpoint still returns 200 OK with "status": "failed", "provider_message_id": null, and Meta's error in payload:

{
  "ok": true,
  "status": "failed",
  "provider_message_id": null,
  "payload": { "error": { "message": "..." } }
}

Other WhatsApp Endpoints

Method & PathPurpose
GET /api/v2/whatsapp/oauth/configEmbedded Signup (OAuth) configuration
POST /api/v2/whatsapp/oauth/exchangeExchange a WhatsApp Embedded Signup code
GET /api/v2/whatsapp/starter-template-namesReserved starter template names

Voice Channels

Voice calls are handled via Twilio (PSTN), the mobile app, or the web widget. See the Calls & Recordings and Voice Widget guides for details.


Saved Replies

Pre-written response templates that agents can use across all channels.

List Saved Replies

curl "https://apps.aurionai.net/api/v2/saved-replies?search=password&limit=50&offset=0" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Query parameters:

ParameterTypeDescription
limitintegerPage size, 1100 (default 50)
offsetintegerNumber of records to skip (default 0)
searchstringFilter by title/body text
categorystringFilter by category
localestringResolve title/body/body_html for this locale (falls back to en, then the legacy fields)

The response is paginated: { "items": [ … ], "total": N, "limit": L, "offset": O }. Each SavedReplyV2 item has id, title, body, body_html, shortcut, category, usage_count, created_at, and a translations map of per-locale variants.

Create Saved Reply

curl -X POST "https://apps.aurionai.net/api/v2/saved-replies" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Password Reset Instructions",
    "category": "Account Access",
    "shortcut": "pwreset",
    "body": "Hi there,\n\nTo reset your password:\n1. Go to https://login.example.com/reset\n2. Enter your email address\n3. Click the reset link in your email\n\nLet me know if you need further help!"
  }'

Required fields are title (1–200 chars) and body (1–8000 chars). Optional: body_html, shortcut, category, and a translations map. The body is stored as opaque text — any {{variable}} placeholders are rendered downstream by the dashboard, not substituted by this API.

Get / Update / Delete Saved Reply

Get
curl "https://apps.aurionai.net/api/v2/saved-replies/sr_abc123" \
  -H "X-API-Key: itsm_sk_live_xxxx"
Update
curl -X PATCH "https://apps.aurionai.net/api/v2/saved-replies/sr_abc123" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "Updated reply content..."
  }'
Delete
curl -X DELETE "https://apps.aurionai.net/api/v2/saved-replies/sr_abc123" \
  -H "X-API-Key: itsm_sk_live_xxxx"

DELETE returns 204 No Content on success.

Record Saved Reply Usage

Increment the usage counter when an agent applies a saved reply:

curl -X POST "https://apps.aurionai.net/api/v2/saved-replies/sr_abc123/use" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Returns the updated SavedReplyV2 with an incremented usage_count.

Access Model

These endpoints are part of the AurionAI dashboard helpdesk and are gated by tenant dashboard roles (tenant_owner, tenant_admin, agent, supervisor, tenant_user, tenant_readonly) via an authenticated dashboard session — not by API-key scopes. A request authenticated with X-API-Key returns 403 ({"detail": "API keys are not permitted for this endpoint"}). There is no channels:read / channels:write API-key scope; public API-key access is planned but not yet available.

On this page