# Allow or block a sender or domain, or clear the rule (owner or manager)

`PUT /workspace/inbox/senders` · Rivier · inbox

Allow or block a sender or domain, or clear the rule (owner or manager).

- Scope: inbox:write
- Graphql: Mutation.inboxSenderSet
- Sdk: inbox.sender.set
- Cli: inbox sender set

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "pattern": {
      "type": "string",
      "minLength": 3,
      "maxLength": 254
    },
    "rule": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "allow",
            "block"
          ]
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "pattern",
    "rule"
  ],
  "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 PUT 'https://api.rivier.ai/workspace/inbox/senders' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "pattern": "string",
  "rule": "allow"
}'
```
