---
title: "Create an email snippet"
method: POST
path: "/1/mail_hostings/{service_mail}/mailboxes/{mailbox}/email-snippets"
tags: ["Service Mail > Mailboxes > Email Snippets"]
---

# Create an email snippet

`POST /1/mail_hostings/{service_mail}/mailboxes/{mailbox}/email-snippets`

## Request

- Base URL: `https://api.infomaniak.com`
- URL: `https://api.infomaniak.com/1/mail_hostings/{service_mail}/mailboxes/{mailbox}/email-snippets`
- Auth: HTTP bearer

Create a new email snippet for the given mailbox and return the id of the created object.

## Path parameters

- `service_mail` string, required
- `mailbox` string, required

## Request body

- object
  - `content` string, nullable: The HTML content of the email snippet
  - `preview` string, nullable: A short preview of the email snippet provided by the client
  - `title` string, nullable: The title of the email snippet

## Response `201`

Created

- object
  - `result` 'success' | 'error' | 'asynchronous', required: Result of the HTTP request
  - `data` string

## Changes

- **2026-10-28** `876c540ed2ae`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/changes/1/mail_hostings/:service_mail/mailboxes/:mailbox/email-snippets/post.md)

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) - [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) - [OpenAPI document](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/revisions/96ca7c8a0545?raw)
