---
title: "Update Pages settings for a project"
method: PATCH
path: "/api/v4/projects/{id}/pages"
tags: ["gitlab_pages"]
---

# Update Pages settings for a project

`PATCH /api/v4/projects/{id}/pages`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/pages`
- Auth: none declared

Updates Pages settings for a specified project. You must have the Maintainer or Owner role for the project.

## Path parameters

- `id` string, required

## Request body

- PatchApiV4ProjectsIdPages: Update Pages settings for a project
  - `pages_unique_domain_enabled` boolean: Whether to use unique domain
  - `pages_https_only` boolean: Whether to force HTTPS
  - `pages_primary_domain` string: Set pages primary domain

## Response `200`

Update Pages settings for a project

## Other responses

- `401`: Unauthorized
- `404`: Not Found

---

[API](https://skmtc.dev/gitlab/apis/gitlab-api.md) - [All operations](https://skmtc.dev/gitlab/apis/gitlab-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gitlab/apis/gitlab-api/revisions/b234947ef3f2?raw)
