---
title: "Add Whitelist"
method: POST
path: "/api/admin/whitelist"
tags: ["Admin - Whitelist"]
---

# Add Whitelist

`POST /api/admin/whitelist`

Add a whitelist rule. 409-equivalent if the pattern already exists.

## Request body

- WhitelistCreateRequest
  - `pattern` string, required
  - `credit_limit_usd` number, nullable
  - `notes` string, nullable
  - `source` 'manual' | 'key_approval'

## Response `200`

Successful Response

- WhitelistEntry
  - `id` string, required
  - `pattern` string, required — "user@company.com" or "@company.com"
  - `credit_limit_usd` number, nullable
  - `created_by` string, nullable
  - `notes` string, nullable
  - `created_at` string, required
  - `source` string
  - `detected_user_count` integer, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/compresr/apis/compresr-platform-api.md) · [All operations](https://skmtc.net/compresr/apis/compresr-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/compresr/compresr-platform-api/revisions/93ee959dfa51/schema)
