---
title: "Create alias"
method: POST
path: "/api/mail/v1/mailboxes/{mailboxId}/aliases"
tags: ["Mail: Aliases"]
---

# Create alias

`POST /api/mail/v1/mailboxes/{mailboxId}/aliases`

Create an alias for the given mailbox. The alias address is formed
from the given local part and the domain of the mailbox. Messages
sent to the alias are delivered to the mailbox.

## Path parameters

- `mailboxId` string, required

## Request body

- MailV1SchemaCreateAliasRequestSchema
  - `local_part` string, required — Local part of the alias address (the part before the @). The domain is taken from the mailbox. Case-insensitive and stored lowercase; must start and end with a letter or digit; single dots, underscores and hyphens are allowed in between.

## Response `201`

Created response

- MailV1AliasesAliasResource
  - `id` string — Unique alias identifier
  - `address` string — Email address of the alias
  - `mailbox` MailV1AliasesAliasMailboxResource
    - `id` string — Mailbox resource ID
    - `address` string
  - `is_active` boolean — Whether the alias is active and not suspended
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time

## Other responses

- `401` — Unauthenticated response
- `404` — Error response
- `409` — Error response
- `422` — Error response
- `500` — Error response

---

[API](https://skmtc.net/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.net/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/versions/796bd5194565/schema)
