# Replace the workspace's automated emails

Turn the workspace's system mails on or off and set the name and reply-to they go out under. Admin only, and it replaces the whole document rather than patching — send what the read answered with the changes merged in, or the mails you left out are the ones you turned off. A kind outside the vocabulary, an over-long subject prefix, or a reply-to that is not an email address is refused with the field named.

Access class: `workspace:admin`.

## Endpoint

`PUT /v1/workspace/automated-emails`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "emails": {},
    "sender": {
      "name": "string",
      "reply_to": "string"
    }
  },
  "params": {},
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "emails": {
      "facility_status": {
        "enabled": true,
        "introduction": "string",
        "subject_prefix": "string"
      },
      "merchant_decline": {
        "enabled": true,
        "introduction": "string",
        "subject_prefix": "string"
      },
      "submission_contracts": {
        "enabled": true,
        "introduction": "string",
        "subject_prefix": "string"
      },
      "submission_decision": {
        "enabled": true,
        "introduction": "string",
        "subject_prefix": "string"
      },
      "submission_funding": {
        "enabled": true,
        "introduction": "string",
        "subject_prefix": "string"
      },
      "submission_missing_info": {
        "enabled": true,
        "introduction": "string",
        "subject_prefix": "string"
      },
      "term_loan_readiness": {
        "enabled": true,
        "introduction": "string",
        "subject_prefix": "string"
      }
    },
    "sender": {
      "name": "string",
      "reply_to": "string"
    }
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
