Email endpoints allow you to send emails to your users by doing a POST request to our service. These are created under the project view.
To be able to send emails you need to add an email configuration to your project - the configuration is stored as a JSON with your email provider settings. YAWE uses nodemailer internally, the provided options need to be compatible with nodemailer transporter. This is done in the project view, under configuration.
The email endpoint also supports GET requests to read the emails sent, and DELETE requests requests to delete emails. It does not support PUT requests as the data stored for emails cannot be modified.
URL format: https://baseUrl/versionNumber/customEndpointRoute/userEndpoint?key=apiKey
The following table describes the Request parameters.
Base url for calling the APIValue: app.yawe.dev/api
Service version.Value: The current value is 1.
|customEndpointRoute||The route which identifies custom endpoints. Default value: ce||Yes|
|userEndpoint||The endpoint name generated by the user. Value: the name created at https://app.yawe.dev||Yes|
|key||The API Key of the project.||Yes|
Overrides the need for Access tokens or restrictions applied to secure endpoints.
Don't use this key in your client application.
For more information please refer to projects.
Value: the masterKey created at https://app.yawe.dev.
The Access token is required for secure endpoints.
It is obtained when doing a login and it is stored in an httpOnly cookie. To automatically include it in the request you need to set the following property:
Alternatively you can also use the Authorization header.For more information please refer to the login documentation and Secure Endpoints documentation.
|Yes - if endpoint is secure and Authorization header is not used|
Specifies the MIME type of the body of the Request. Options:
|The recepient of the email.||Yes|
|body||The body of the email. This can be plain text or HTML.||Yes|
|subject||The subject of the email.||No|
|from||The sender of the email||No|
|412||Email configuration not set in the project.|
|424||There was a problem sending the email, this error is thrown by nodemailer. The reason could be wrong email configuration.|
If the email is sent successfully the service will respond with 200.