API Reference

Create a condolence

Form Submission

If submitting a request with a media file to this endpoint from an HTML form, please add enctype="multipart/form-data" to your form tag in order to submit the form as a multipart/form-data form.

Markup

Below is the code that is used to sanitize the HTML markup that is POSTed. If it's not on the list below the tags are stripped from the markup. Additionally, any backticks, i.e., `, are converted to single quotes to avoid Javascript rendering issues and code injection.

const sanitizeConfig = {
  'allowedTags': [
    'span',
    'b',
    'br',
    'font',
    'i',
    'li',
    'p',
    'h1',
    'h2',
    'h3',
    'h4',
    'h5',
    'h6',
    'u',
    'div',
    'strong'
  ],
  'allowedAttributes': {
    'span': [ "style" ],
    'font': [ "color", "face", "size" ],
    'p': [ "align", "style" ]
  }
}

Media

If uploading an image file during the request, the image must have one of the following mimetypes:

  • image/jpeg
  • image/png
  • image/gif
  • image/tiff

media_id vs media

If you provide a media_id parameter on your request, i.e., specify a known pre-existing media element's UUID in a new condolence request, it will always take preference over any media file you include in the same request.

NOTE:

The maximum size of any media image is 4194304 bytes (4MB). Due to an AWS Lambda Invocation Payload Limit (see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html) the maximum request size for any POST to this endpoint is 6MB - if you exceed this limit, you will receive a generic AWS error rather than a custom API error.

Language
Authorization