# at.happyproto.actor.setNotices

> Turn the caller's maintenance emails on or off, in their preferences space. Account email (links they ask for, a note when their contact email changes, changes to the terms) has no switch. Customers and staff; anyone else is refused.

- Kind: procedure
- Authority: actor.happyproto.at
- Lexicon: 1
- Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.actor.setNotices)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.actor.setNotices/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.actor.setNotices/analytics)

## Procedure (`at.happyproto.actor.setNotices`)

Type: procedure · POST

### Input (application/json)

- `idempotencyKey` (string, required): A UUID the client generates once per action and resends on every retry of it.
- `maintenance` (boolean, required): Whether to get maintenance emails.

### Output (application/json)

- `maintenance` (boolean, required): The setting now saved.

### Errors

- `AuthRequired`: This endpoint requires an authenticated caller.
- `Forbidden`: The caller is neither a customer nor staff, or the provisioner refused them.
- `InvalidRequest`: The input is malformed, or the provisioner refused it as malformed.
- `NotFound`: Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.
- `InvalidSlug`: Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.
- `SlugTaken`: Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.
- `NotEntitled`: Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.
- `InstanceLimit`: Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.
- `NoCapacity`: Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.
- `OperationInProgress`: Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.
- `EmailNotConfigured`: Owner email is not switched on yet.
- `Upstream`: The preferences space or the provisioner could not be reached, or answered with an error it does not explain to callers.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Turn the caller's maintenance emails on or off, in their preferences space. Account email (links they ask for, a note when their contact email changes, changes to the terms) has no switch. Customers and staff; anyone else is refused.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller is neither a customer nor staff, or the provisioner refused them.",
          "name": "Forbidden"
        },
        {
          "description": "The input is malformed, or the provisioner refused it as malformed.",
          "name": "InvalidRequest"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "NotFound"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "InvalidSlug"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "SlugTaken"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "NotEntitled"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "InstanceLimit"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "NoCapacity"
        },
        {
          "description": "Passed through from the provisioner. Not expected here; declared because every provisioner refusal is mapped the same way.",
          "name": "OperationInProgress"
        },
        {
          "description": "Owner email is not switched on yet.",
          "name": "EmailNotConfigured"
        },
        {
          "description": "The preferences space or the provisioner could not be reached, or answered with an error it does not explain to callers.",
          "name": "Upstream"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "idempotencyKey": {
              "description": "A UUID the client generates once per action and resends on every retry of it.",
              "type": "string"
            },
            "maintenance": {
              "description": "Whether to get maintenance emails.",
              "type": "boolean"
            }
          },
          "required": [
            "maintenance",
            "idempotencyKey"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "maintenance": {
              "description": "The setting now saved.",
              "type": "boolean"
            }
          },
          "required": [
            "maintenance"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "at.happyproto.actor.setNotices",
  "lexicon": 1
}
```
