# Set the site's rules for declared agents

`PUT /agents` · Praecise Shield · Agents as customers

A field sent replaces that field whole; one left out is kept.

## Parameters

- `site` (query, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "default": {
      "type": "string",
      "enum": [
        "welcome",
        "read_only",
        "refuse",
        "accountable_only"
      ],
      "description": "For a declared agent no rule names. read_only unless set."
    },
    "agents": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "welcome",
              "read_only",
              "ceiling",
              "refuse"
            ]
          },
          "perMinute": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000,
            "description": "Only with mode ceiling."
          },
          "note": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "mode"
        ]
      },
      "description": "Keyed by the agent's name: the host of its key directory. Up to 200."
    }
  },
  "required": []
}
```

## Responses

- `200`

## Example

```sh
curl -X PUT 'https://shield.praecise.com/agents' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "default": "welcome",
  "agents": {}
}'
```
