---
title: "Add allowed hostname"
method: POST
path: "/domains/allowedHostnames/{domainId}"
tags: ["Domains"]
---

# Add allowed hostname

`POST /domains/allowedHostnames/{domainId}`

## Request

- Base URL: `https://api.short.io`
- URL: `https://api.short.io/domains/allowedHostnames/{domainId}`
- Auth: API key in header `Authorization`

Adds a hostname to the domain's allowed-hostnames list.

## Path parameters

- `domainId` integer, required

## Request body

- object
  - `hostname` string, required: Referrer hostname allowed to use this domain's links

## Response `200`

Default Response

---

[API](https://skmtc.dev/short/apis/short-io-api-2.md) · [All operations](https://skmtc.dev/short/apis/short-io-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/short/apis/short-io-api-2/revisions/9e4e60c560b1?raw)
