feat(api): migrate send_email to v3 action endpoint

This commit is contained in:
Scott Idem
2026-05-01 15:53:05 -04:00
parent 7cef6be54c
commit 878ff91c30
2 changed files with 42 additions and 10 deletions

View File

@@ -316,7 +316,42 @@ Frontend guidance:
---
## Axonius Zoom CSV Upload (Temporary — Apr 2026)
## 8. Email Send Action
Send a transactional email via the Aether API.
- **Method:** `POST`
- **Path:** `/v3/action/email/send`
- **Auth:** `x-aether-api-key` + `x-account-id` (or `x-no-account-id` / `?jwt=`)
**Request body:**
```json
{
"from_email": "noreply@example.com",
"from_name": "Example App",
"to_email": "user@example.com",
"to_name": "Alice Smith",
"subject": "Your login link",
"body_html": "<p>Click <a href=\"...\">here</a> to log in.</p>",
"body_text": "Visit ... to log in.",
"cc_email": null,
"bcc_email": null
}
```
**Query params:**
| Parameter | Type | Default | Description |
|---|---|---|---|
| `test` | bool | `false` | Simulate send without delivering |
**Response:** `data` contains `{ from_email, to_email, subject }` (first 40 chars of subject). `400` if delivery failed.
> **Replaces:** `POST /util/email/send` (disabled as of May 2026).
---
## Axonius Zoom CSV Upload (Temporary — Apr 2026, EXPIRED)
Purpose: Staff-only quick upload to upsert Event Person + Event Badge records from a Zoom Events registrant CSV.
@@ -535,7 +570,7 @@ Results are automatically scoped to the `x-account-id` provided in the request.
---
## 9. Event Exhibit Tracking Export (Leads Export)
## 10. Event Exhibit Tracking Export (Leads Export)
Allows an exhibitor to download all lead-capture records for their exhibit as a CSV or XLSX file.
@@ -603,7 +638,7 @@ const url = URL.createObjectURL(blob);
---
## 10. Troubleshooting 403 Forbidden
## 11. Troubleshooting 403 Forbidden
If you receive a 403 on a valid ID:
1. Verify `x-aether-api-key` is correct.

View File

@@ -565,7 +565,7 @@ export const get_data_store_obj_w_code =
/* BEGIN: Utility: Email Related */
// Updated 2023-06-29
// Updated 2026-05-01 — migrated to the V3 action endpoint
export const send_email = async function send_email({
api_cfg,
from_email,
@@ -621,7 +621,7 @@ export const send_email = async function send_email({
return null;
}
const endpoint = `/util/email/send`;
const endpoint = `/v3/action/email/send`;
data['from_email'] = from_email; // Required
data['from_name'] = from_name;
@@ -664,11 +664,8 @@ export const send_email = async function send_email({
if (log_lvl > 1) {
console.log('Response Data:', send_email_post_promise);
}
if (return_obj) {
return send_email_post_promise;
} else {
return send_email_post_promise.event_abstract_id_random;
}
return send_email_post_promise;
};
/* END: Utility: Email Related */