Mail this deployment tried to send (development only)
GET
/auth/dev/mail
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.
Media typeapplication/json
object
messages
required
Array<object>
object
to
required
Array<string>
subject
required
string
text
required
string
Examplegenerated
{ "messages": [ { "to": [ "example" ], "subject": "example", "text": "example" } ]}Missing or wrong ADMIN_TOKEN (code: ADMIN_REQUIRED).
Media typeapplication/json
The error envelope every non-2xx answer uses.
object
error
required
Human-readable explanation.
string
code
Machine-readable reason. Absent on a few legacy 400s.
string
key
additional properties
Examplegenerated
{ "error": "example", "code": "example"}Not a development deployment.
Media typeapplication/json
The error envelope every non-2xx answer uses.
object
error
required
Human-readable explanation.
string
code
Machine-readable reason. Absent on a few legacy 400s.
string
key
additional properties
Examplegenerated
{ "error": "example", "code": "example"}