---
title: "Create alias"
method: POST
path: "/api/v1/add/alias"
tags: ["Aliases"]
---

# Create alias

`POST /api/v1/add/alias`

You may create your own mailbox alias using this action. It takes a JSON object containing a domain informations.
Only one `goto*` option can be used, for ex. if you want learn as spam, then send just `goto_spam = 1` in request body.

## Request body

- object
  - `active` boolean — is alias active or not
  - `address` string — alias address, for catchall use "@domain.tld"
  - `goto` string — destination address, comma separated
  - `goto_ham` boolean — learn as ham
  - `goto_null` boolean — silently ignore
  - `goto_spam` boolean — learn as spam
  - `sogo_visible` boolean — toggle visibility as selectable sender in SOGo

## Response `200`

OK

- object
  - `log` unknown[] — contains request object
    - unknown
  - `msg` unknown[]
    - unknown
  - `type` 'success' | 'danger' | 'error'

## Other responses

- `401` — Unauthorized

## Changes

> 51 revisions in range; 1 could not be searched.

- **2021-01-30** `a6344b515d8c` — 1 info
  - added the new optional request property `sogo_visible`
- **2020-06-07** `47523aca063a` — 1 warning
  - removed the request property `sogo_visible`

[Change history](https://skmtc.dev/mailcow/apis/mailcow-api/changes/api/v1/add/alias/post.md)

---

[API](https://skmtc.dev/mailcow/apis/mailcow-api.md) · [All operations](https://skmtc.dev/mailcow/apis/mailcow-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mailcow/mailcow-api/revisions/ae01d1d7886a/schema)
