---
title: "generate temporary access to email html"
method: POST
path: "/api/v1/mails/{mailServerID}/messages/{messageID}/temporary-access"
tags: ["messages"]
---

# generate temporary access to email html

`POST /api/v1/mails/{mailServerID}/messages/{messageID}/temporary-access`

## Path parameters

- `mailServerID` string, required
- `messageID` string, required

## Query parameters

- `expiration` number

## Response `201`

OK

- TmpAccess
  - `status` string
  - `data` object
    - `token` string

## Other responses

- `400` — Bad Request
- `403` — Generate token limitation
- `404` — Mail Server or Mail Message not found
- `500` — Unexpected error

## Changes

- **2023-10-06** `6ba885651c6f` — 1 breaking, 2 info
  - removed the media type `*/*` for the response with the status `201`
  - for the `query` request parameter `expiration`, the type was generalized from `integer` to `number`
  - added the media type `application/json` for the response with the status `201`
- **2023-10-04** `c63802bd8a38` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/liara-cloud/apis/liara-mail-api-documentaion/changes/api/v1/mails/:mailServerID/messages/:messageID/temporary-access/post.md)

---

[API](https://skmtc.dev/liara-cloud/apis/liara-mail-api-documentaion.md) · [All operations](https://skmtc.dev/liara-cloud/apis/liara-mail-api-documentaion/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/liara-cloud/liara-mail-api-documentaion/revisions/5ae39ee353b2/schema)
