---
title: "Get a download link for the email HTML"
method: GET
path: "/appmail/html/url"
tags: ["App Mail Records"]
---

# Get a download link for the email HTML

`GET /appmail/html/url`

## Request

- Base URL: `https://api.surense.com/api/v1`
- URL: `https://api.surense.com/api/v1/appmail/html/url`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.surense.com/oauth/token`

Generates a pre-signed S3 URL for the rendered HTML body of the email (`text/html`, named `<id>.html`). The URL is returned in the `Location` response header with status 200 and an empty body; this is not a redirect. The link is valid for 120 seconds. With `inline=true` the file is served with `Content-Disposition: inline`, otherwise as an attachment.

The record is looked up within the caller's tenant, and the caller must also be allowed to access the entity the email is linked to (employer, customer, lead, workflow or meeting, checked in that order); otherwise that entity's access check rejects the request.

Errors: 400 if `id` is missing; 404 if the record does not exist in the tenant or has no stored HTML file.

## Query parameters

- `id` string, uuid, required
- `inline` boolean

## Response `200`

Pre-signed URL returned in the `Location` header; empty body.

## Other responses

- `400`: The `id` parameter is missing.
- `404`: Email record not found, or it has no associated HTML file.

---

[API](https://skmtc.dev/surense/apis/appmail-api.md) - [All operations](https://skmtc.dev/surense/apis/appmail-api/llms.txt) - [OpenAPI document](https://skmtc.dev/surense/apis/appmail-api/revisions/dd959778fa2e?raw)
