Mail this deployment tried to send (development only)
const url = 'https://api.sloose.com/auth/dev/mail';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.sloose.com/auth/dev/mail \ --header 'Authorization: Bearer <token>'The last messages the Worker handed to the email binding, newest last, so a test can read the link out of a magic-link or invitation email the way a person would from their inbox. Answers 404 anywhere but a development deployment; the messages are kept in memory only.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”What was sent.
object
object
Examplegenerated
{ "messages": [ { "to": [ "example" ], "subject": "example", "text": "example" } ]}Missing or wrong 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"}Not a development deployment.
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"}The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).