---
title: "Basic Authentication"
method: PUT
path: "/sites/{id}/basic-authentication"
tags: ["sites"]
---

# Basic Authentication

`PUT /sites/{id}/basic-authentication`

## Request

- Base URL: `https://my.pressable.com/v1`
- URL: `https://my.pressable.com/v1/sites/{id}/basic-authentication`
- Auth: none declared
- TypeScript: <https://skmtc.dev/pressable/apis/pressable-api-documentation-v1/docs/sites/:id/basic-authentication/put.ts> (a function with typed inputs; its response is checked against the schema)

The "Basic Authentication" feature allows you to easily restrict public access to your website. When installed, it activates the Pressable Basic Authentication plugin, which requires anyone visiting your site to enter a username and password before gaining access. This is especially useful for in-progress development sites where you want to keep content private. Removing the Basic Authentication plugin removes this login requirement, making your site fully open to the public. Be sure all content is production-ready before turning it off to ensure a professional experience for your audience.

## Path parameters

- `id` integer, required

## Request body

- object
  - `enabled` boolean

## Response `200`

Successful Response

- object
  - `message` string

---

[API](https://skmtc.dev/pressable/apis/pressable-api-documentation-v1.md) - [All operations](https://skmtc.dev/pressable/apis/pressable-api-documentation-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/pressable/apis/pressable-api-documentation-v1/revisions/267a95219f47?raw)
