# Change the voice settings

`PUT /calls/settings` · Rivier · voice

Change the voice settings. Recording cannot be turned on until the project confirms its counsel has read the recording rules.

- Scope: voice:write
- Graphql: Mutation.voiceCallSettingsUpdate
- Sdk: calls.settings.update
- Cli: calls settings-set

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "callerIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 3,
        "maxLength": 40
      },
      "maxItems": 50
    },
    "recording": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Off unless turned on. Cannot be on until counselReviewed is true"
        },
        "counselReviewed": {
          "type": "boolean",
          "description": "Your counsel has read the recording rules for the places your callers are in"
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 1,
          "maximum": 365
        }
      },
      "additionalProperties": false
    },
    "allowCountries": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z]{2}$"
      },
      "maxItems": 250
    },
    "denyCountries": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z]{2}$"
      },
      "maxItems": 250
    },
    "blockPremium": {
      "type": "boolean"
    },
    "maxCallsPerHour": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    },
    "maxSecondsPerCall": {
      "type": "integer",
      "minimum": 30,
      "maximum": 3600
    },
    "callerName": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ],
      "description": "The name every call opens with: This is an automated call from ..."
    },
    "quietHours": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "startHour": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23
            },
            "endHour": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23
            },
            "timeZone": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "required": [
            "startHour",
            "endHour",
            "timeZone"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "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/calls/settings' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "callerIds": [
    "string"
  ],
  "recording": {
    "enabled": false,
    "counselReviewed": false,
    "retentionDays": 0
  },
  "allowCountries": [
    "string"
  ],
  "denyCountries": [
    "string"
  ],
  "blockPremium": false,
  "maxCallsPerHour": 0,
  "maxSecondsPerCall": 0,
  "callerName": "string"
}'
```
