Send a test email
const url = 'https://api.sloose.com/billing/admin/email-test';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"to":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sloose.com/billing/admin/email-test \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "to": "example" }'Backoffice route: a staff session, or ADMIN_TOKEN; never a customer’s session. Sends one message from hello@sloose.com through the Worker’s Email Service binding, to prove a deployment can send. Answers what the sender answered; a missing binding is sent: false, not an error.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The address to send to.
Examplegenerated
{ "to": "example"}Responses
Section titled “Responses”Whether the message left, and why not if it did not.
to is missing or is not an email address.
object
Examplegenerated
{ "error": "example"}A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_REQUIRED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}