# Turn Protection on

`POST /protection/on` · Rivier · hosting

Turn Protection on: the public forms of the project's site ask for a quiet check and the API confirms it before it accepts a write. Creates the Shield site on first use and returns its secret once; repeat to get the same state. Protection never takes a site down: if Shield cannot be reached a write is accepted and counted as unchecked. It is not proof of a human.

- Scope: hosting:write
- Mcp: rivier_protection_on
- Graphql: Mutation.hostingProtectionOn
- Sdk: hosting.protection.on
- Cli: hosting protection on

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "origins": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 300,
        "pattern": "^https:\\/\\/[A-Za-z0-9.-]+(:\\d{1,5})?$"
      },
      "maxItems": 20
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/protection/on' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "origins": [
    "string"
  ]
}'
```
