# Change the settings

`PUT /crm/settings` · Rivier · contacts

Change the settings. The autonomy of agents and campaigns is a person's to change.

- Scope: contacts:admin
- Sdk: contacts.settings.save
- Cli: contacts settings save

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "senderName": {
      "type": "string",
      "maxLength": 100
    },
    "senderAddress": {
      "type": "string",
      "maxLength": 300,
      "description": "The postal address that goes in every marketing email footer"
    },
    "fromEmail": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 320
        },
        {
          "type": "null"
        }
      ]
    },
    "replyTo": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 320
        },
        {
          "type": "null"
        }
      ]
    },
    "sendingDomain": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "widgetDomain": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "doubleOptIn": {
      "type": "boolean"
    },
    "policyVersion": {
      "type": "string",
      "maxLength": 40
    },
    "policyUrl": {
      "anyOf": [
        {
          "type": "string",
          "format": "uri",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "defaultCountry": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 2,
          "maxLength": 2
        },
        {
          "type": "null"
        }
      ]
    },
    "customFields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,39}$"
          },
          "label": {
            "type": "string",
            "maxLength": 80
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "boolean",
              "date",
              "select"
            ]
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 80
            },
            "maxItems": 40
          },
          "sensitive": {
            "type": "boolean"
          }
        },
        "required": [
          "key",
          "label",
          "type"
        ],
        "additionalProperties": false
      },
      "maxItems": 60
    },
    "autonomy": {
      "type": "object",
      "properties": {
        "campaigns": {
          "type": "string",
          "enum": [
            "human_review",
            "assisted",
            "autonomous"
          ]
        },
        "autoSendCap": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "agentDefault": {
          "type": "object",
          "properties": {
            "read": {
              "type": "boolean",
              "default": true
            },
            "write": {
              "type": "boolean",
              "default": false
            },
            "send": {
              "type": "boolean",
              "default": false
            },
            "view": {
              "type": "string",
              "enum": [
                "basic",
                "full"
              ],
              "default": "basic"
            },
            "maxExport": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            }
          },
          "additionalProperties": false
        },
        "agents": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "read": {
                "type": "boolean",
                "default": true
              },
              "write": {
                "type": "boolean",
                "default": false
              },
              "send": {
                "type": "boolean",
                "default": false
              },
              "view": {
                "type": "string",
                "enum": [
                  "basic",
                  "full"
                ],
                "default": "basic"
              },
              "maxExport": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000,
                "default": 0
              }
            },
            "additionalProperties": false
          },
          "propertyNames": {
            "maxLength": 80
          }
        }
      },
      "additionalProperties": false
    },
    "limits": {
      "type": "object",
      "properties": {
        "perHour": {
          "type": "integer",
          "minimum": 1
        },
        "perDay": {
          "type": "integer",
          "minimum": 1
        }
      },
      "additionalProperties": false
    },
    "trackOpens": {
      "type": "boolean"
    },
    "trackClicks": {
      "type": "boolean"
    },
    "testMode": {
      "type": "boolean"
    },
    "testRecipients": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 320
      },
      "maxItems": 20
    },
    "sms": {
      "type": "object",
      "properties": {
        "numberId": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 80
            },
            {
              "type": "null"
            }
          ]
        },
        "quietFrom": {
          "type": "string",
          "pattern": "^\\d{2}:\\d{2}$"
        },
        "quietTo": {
          "type": "string",
          "pattern": "^\\d{2}:\\d{2}$"
        },
        "timezone": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 60
            },
            {
              "type": "null"
            }
          ]
        },
        "maxSegments": {
          "type": "integer",
          "minimum": 1,
          "maximum": 6
        }
      },
      "additionalProperties": false
    },
    "hubspot": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "connectionId": {
          "type": "string",
          "maxLength": 80
        },
        "direction": {
          "type": "string",
          "enum": [
            "pull",
            "push",
            "both"
          ],
          "default": "both"
        }
      },
      "required": [
        "enabled"
      ],
      "additionalProperties": false
    }
  },
  "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/crm/settings' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "senderName": "string",
  "senderAddress": "string",
  "fromEmail": "string",
  "replyTo": "string",
  "sendingDomain": "string",
  "widgetDomain": "string",
  "doubleOptIn": false,
  "policyVersion": "string"
}'
```
