Palbase Auth API · API
/admin/templates/{key}/send-testSend a test auth email
Sends one mail of this template to a real address, down the same rail a user's mail takes, rendered with sample data (overridable through variables). A refused address or unrenderable template is 400 send_refused, a spent quota 429, a delivery hop that failed 502. Answers the message id its delivery report is filed under.
Called by your server, with the project's secret key.
Path
keystring · requiredThe template.Request body
localestring · optionalLanguage to render in; absent: the request's Accept-Language, then the project's default.to_emailstring · requiredThe address the test mail goes to.variablesobject · optionalSample values to render the test mail with; an absent one keeps its example. The recipient is always to_email.curl -X POST "https://<your-ref>.palbase.studio/admin/templates/<key>/send-test" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"to_email":"string"}'Responses
200The mail was sent
400Validation failed or required field missing
401Missing, invalid, or expired credentials
403Not permitted with this key; or the project is the platform's own (`owner_only`): every change on its admin surface — any account's address, password, factors, sessions or roles, an account made or imported, a sign-in minted, a setting — is its owner's or its operator's alone. The request carries, besides the project's key, the owner's access token (X-Palbase-Owner; a passkey sign-in of the last 15 minutes, else 401 `insufficient_user_authentication`) or the operator's token (X-Palbase-Operator). Its key reads.
404Resource does not exist or is not visible to the caller
429Rate limit exceeded
502The mail could not be handed to the delivery rail
503Downstream dependency unavailable (typically HIBP / breach service)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation AdminSendTestTemplate of auth's contract.