---
title: "Set custom DNS servers"
method: POST
path: "/v1/projects/update-dns"
tags: ["Configuration"]
---

# Set custom DNS servers

`POST /v1/projects/update-dns`

## Request

- Base URL: `https://api.liara.ir`
- URL: `https://api.liara.ir/v1/projects/update-dns`
- Auth: HTTP bearer

Sets up to 4 DNS servers for the app to use. Send an empty list to go back to the defaults. Your bundle plan must support custom DNS. Team permission: `operate` or `manage`.

## Query parameters

- `teamID` string: 24-character hexadecimal ID.

## Request body

- object
  - `projectID` string, required: The app's ID.
  - `dns` string[]: IPv4 or IPv6 addresses.

## Response `201`

The DNS servers were saved. The response body is empty.

## Other responses

- `400`: The body or a parameter is invalid (`message` says which), or `teamID` isn't a valid ID.
- `401`: The API token is missing, invalid or expired.
- `403`: With `teamID`: you aren't a member of the team (`team_not_found`), or you don't have the required permission on this app (`no_permission`).
- `404`: The app doesn't exist.
- `428`: Your bundle plan doesn't support custom DNS servers.

## Changes

- **2026-11-02** `610162e8a623`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/liara-cloud/apis/paas/changes/v1/projects/update-dns/post.md)

---

[API](https://skmtc.dev/liara-cloud/apis/paas.md) - [All operations](https://skmtc.dev/liara-cloud/apis/paas/llms.txt) - [OpenAPI document](https://skmtc.dev/liara-cloud/apis/paas/revisions/610162e8a623?raw)
