/v1/apps/{app_id}/notifications/{slot}/testAuthSend me a test of one email.
Sends the slot's real Mail template, with this app's real sender (the workspace default or the custom address) and example values for every variable, to your own verified account address. It cannot be sent anywhere else. It uses your own Mail access, goes through the same send path as real emails, and shows up in Mail > Emails. At most 10 tests per person per hour. Not available to API keys (a key has no inbox).
Path parameters
app_id*stringId of the app.
slot*enum (6)The email to test.
Headers
Idempotency-KeystringStripe-style idempotency key. A retried request with the same key returns the first response instead of sending a second email. 24h TTL.
Response · 202 Accepted by Mail and queued for delivery.
to*string · emailYour own verified account address: tests only ever go to the person who asked.
Example: "you@acme.com"
template_name*stringThe Mail template that was sent.
Example: "auth-verification"
from*stringThe From it went out with (the workspace default sender or the app's custom address).
Example: "Acme <hello@acme.com>"
message_id*string · uuidThe Mail message id; look it up in Mail > Emails to follow delivery.
Example: "0d6c1c3e-5f2a-4b8e-9d17-3a4b5c6d7e8f"
Example
Request
POST https://api.auth.productcraft.co/v1/apps/{app_id}/notifications/{slot}/test
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const notificationTest = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").notifications.test("verification");auth.admin.app(…).notifications.test(slot, options?): Auth.NotificationTest
Response
{
"to": "you@acme.com",
"template_name": "auth-verification",
"from": "Acme <hello@acme.com>",
"message_id": "0d6c1c3e-5f2a-4b8e-9d17-3a4b5c6d7e8f"
}