Share AUI Widget via SMS or Email
aui_share_widgetSends an existing AUI widget link via SMS or email when out-of-band delivery is explicitly requested; use embed URLs instead for in-chat or web-app display.
Instructions
Send an existing AUI widget link (cache_id from aui_generate_ui) to a recipient via Twilio A2P SMS (method='sms') or Mailgun email (method='email'). Call only when out-of-band phone/inbox delivery is explicitly requested; to show a widget inside chat or a web app, return embed_url from aui_generate_ui or aui_get_status instead. Non-idempotent external side effect: immediately dispatches a live SMS or email that cannot be unsent, deducts 1 credit from aui_api_key (trial-... or svsrva-key-... required; keyless sandbox is rejected), and enforces 120 req/15m per-IP rate limits. Custom message text requires a paid svsrva-key-... (trial-... keys omit message and append a trial footer). Returns { success, method, to, cache_id, embed_url } or { success: false, error } on invalid key, zero credits, or carrier/provider failure.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"aui_api_key": "<aui_api_key>",
"cache_id": "<cache_id>",
"method": "<method>",
"to": "<to>"
},
"name": "aui_share_widget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Destination E.164/10-digit US phone number (e.g. `+18045550199`) when `method='sms'`, or email address (`user@domain.com`) when `method='email'`. | |
| method | Yes | Outbound channel: `'sms'` (Twilio A2P text message) or `'email'` (Mailgun transactional email). | |
| message | No | Optional custom note prepended above the widget link (honored on paid `svsrva-key-...` keys only; ignored on `trial-...` keys). | |
| cache_id | Yes | Existing `chk_...` widget ID returned by `aui_generate_ui`. | |
| aui_api_key | Yes | Active `trial-...` or paid `svsrva-key-...` (costs 1 credit per send; keyless sandbox is not permitted). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Normalized recipient phone number or email address. | |
| error | No | Error reason when `success` is false (missing credits, invalid key, or provider error). | |
| method | No | Channel used for delivery. | |
| success | Yes | True when Twilio or Mailgun accepted the outbound message. | |
| cache_id | No | Shared `chk_...` widget ID. | |
| embed_url | No | Public HTTPS widget URL delivered to the recipient. |