# Apply masks to samples

**POST** `/v1/masking/mask`

**Operation ID**: `mask`
**Summary**: Apply masks to samples
Applies a masking operator's masks to sample log events and returns the masked result for each, so the editor can preview a configuration without deploying it. The operator's predicate gates which logs are masked in production, not how, so it is ignored here and the masks are applied to every sample.

## Tags
- Masking
## Request Body

**Content-Type**: `application/json`

**Schema**: `MaskingRequest`

## Responses

### 200

Sample masked successfully.

- **Content-Type**: `application/json` / `MaskingResponse`
### 400

The masking configuration is invalid or could not be compiled.

### 401

Unauthorized
