# A person switches the own MTA on or off for a domain

`POST /deliverability/domains/{d}/own-mta` · Rivier · domains

A person switches the own MTA on or off for a domain. On is refused unless every check passes.

- Scope: domains:write
- Graphql: Mutation.domainsDeliverabilityOwnMtaSet
- Sdk: domains.deliverabilityOwnMta.set
- Cli: domains deliverability own mta set
- Events: domains.deliverabilityOwnMta.changed

## Parameters

- `d` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "on": {
      "type": "boolean"
    }
  },
  "required": [
    "on"
  ],
  "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/deliverability/domains/{d}/own-mta' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "on": false
}'
```
