---
title: "Set Locale"
method: PUT
path: "/api/v1/tests/{slug}/locale"
---

# Set Locale

`PUT /api/v1/tests/{slug}/locale`

## Request

- Base URL: `https://email-spam-tester.com` (the document declares no server; this is the origin it was published from)
- URL: `https://email-spam-tester.com/api/v1/tests/{slug}/locale`
- Auth: none declared

Change which language the report and the AI plan will be written in.

The language is fixed when the address is handed out, because the SMTP
connection that arrives ten minutes later carries no hint of who is
waiting for it. That leaves one gap: somebody reserves an address, then
switches the page to their own language before sending. Without this they
would read a German page and get an English plan.

Only while the reservation is unused. Once the mail has arrived the
analysis is either running or done, and rewriting the language then would
mean re-running it — a different operation, and one nobody asked for.

The slug is the capability, as everywhere else here: whoever holds the
address holds the test. There is nothing to leak — a wrong guess sets the
language of a report the guesser cannot read.

## Path parameters

- `slug` string, required

## Request body

- LocaleIn: Which language the reader is on now. Sent when somebody switches language on a reservation they have not used yet. Not validated to a fixed set here: locales.normalise falls back to the base language and then to English, so an unknown tag is a page in English rather than a 422 the visitor cannot act on.
  - `lang` string, required

## Response `204`

Successful Response

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/email-spam-tester/apis/email-spam-tester-api.md) · [All operations](https://skmtc.dev/email-spam-tester/apis/email-spam-tester-api/llms.txt) · [OpenAPI document](https://skmtc.dev/email-spam-tester/apis/email-spam-tester-api/revisions/476a4c86600d?raw)
