Email

Send Mail to Arbitrary Addresses

To send an email to an arbitrary e-mail address, send a POST request to the @email-sendendpoint that is available on the site root:

POST /@email-send HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImZ1bGxuYW1lIjoiQWRtaW4iLCJpYXQiOjE2NDkzMTI0NDl9.RS1Ny_r0v7vIylFfK6q0JVJrkiDuTOh9iG9IL8xbzAk
Content-Type: application/json

{
  "name": "John Doe",
  "from": "john@doe.com",
  "to": "jane@doe.com",
  "subject": "Hello!",
  "message": "Just want to say hi."
}

The to, from and message fields are required. The subject and name fields are optional.

The server will respond with status 204 No Content when the email has been sent successfully:

HTTP/1.1 204 OK

Contact Site Owner aka Contact Form

Nick allows the user to contact the site owner via a form on the website. This makes sure the site owner does not have to expose their email addresses publicly and at the same time allow the users to reach out to the site owners.

To send an email notification to the site owner, send a POST request to the /@email-notification endpoint that is available on the site root:

POST /@email-notification HTTP/1.1
Accept: application/json
Content-Type: application/json

{
  "name": "John Doe",
  "from": "john@doe.com",
  "subject": "Hello!",
  "message": "Just want to say hi."
}

The from and message fields are required. The subject and name fields are optional.

The server will respond with status 204 No Content when the email has been sent successfully:

HTTP/1.1 204 OK

Contact Users

To send an email notification to another user of the portal, send a POST request to the /@email-notification endpoint on a particular user (e.g. the admin user):

POST /@users/admin/@email-notification HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImZ1bGxuYW1lIjoiQWRtaW4iLCJpYXQiOjE2NDkzMTI0NDl9.RS1Ny_r0v7vIylFfK6q0JVJrkiDuTOh9iG9IL8xbzAk
Content-Type: application/json

{
  "name": "John Doe",
  "from": "john@doe.com",
  "subject": "Hello!",
  "message": "Just want to say hi."
}

The server will respond with status 204 No Content when the email has been sent successfully:

HTTP/1.1 204 OK