# inbox.settings_update

Alterar configurações do atendimento. Altera as configurações da caixa. Campos omitidos não mudam. `autoCloseMinutes` é `null` (desliga) ou de 5 a 10080. Presets do balão: default, accent, graphite, sky, sand. Fundo: none, pattern, solid.

- Endpoint: `POST https://app.atomiks.com.br/api/v1/inbox.settings_update` (corpo JSON)
- Quem pode chamar: administrador da conta
- Escopo da chave: `messages:manage`
- Grava dados: sim
- Pela chave de API: sim
- Ferramenta MCP: `inbox_settings_update`
- Ficha em JSON: `https://app.atomiks.com.br/api/v1/openapi.json` (operationId `inbox.settings_update`)

## Entrada

| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
| `restrictToFreeAndOwn` | boolean | não |  |
| `autoCloseMinutes` | integer \| null | não |  |
| `appearance` | object | não |  |

<details><summary>JSON Schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "restrictToFreeAndOwn": {
      "type": "boolean"
    },
    "autoCloseMinutes": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 5,
          "maximum": 10080
        },
        {
          "type": "null"
        }
      ]
    },
    "appearance": {
      "type": "object",
      "properties": {
        "sentBubble": {
          "type": "object",
          "properties": {
            "whatsapp": {
              "type": "string",
              "enum": [
                "default",
                "accent",
                "graphite",
                "sky",
                "sand"
              ]
            },
            "other": {
              "type": "string",
              "enum": [
                "default",
                "accent",
                "graphite",
                "sky",
                "sand"
              ]
            }
          }
        },
        "background": {
          "type": "string",
          "enum": [
            "none",
            "pattern",
            "solid"
          ]
        }
      }
    }
  }
}
```

</details>

## Exemplo

```bash
curl -X POST https://app.atomiks.com.br/api/v1/inbox.settings_update \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"autoCloseMinutes":60,"appearance":{"background":"solid"}}'
```

CLI:

```bash
node cli/atomiks.mjs inbox.settings_update --json '{"autoCloseMinutes":60,"appearance":{"background":"solid"}}'
```

MCP: ferramenta `inbox_settings_update` com a mesma entrada.

## Saída

Sucesso: `{"data": ...}` com o formato abaixo.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "restrictToFreeAndOwn": {
      "type": "boolean"
    },
    "autoCloseMinutes": {
      "type": [
        "number",
        "null"
      ]
    },
    "appearance": {
      "type": "object",
      "properties": {
        "sentBubble": {
          "type": "object",
          "properties": {
            "whatsapp": {
              "type": "string",
              "enum": [
                "default",
                "accent",
                "graphite",
                "sky",
                "sand"
              ]
            },
            "other": {
              "type": "string",
              "enum": [
                "default",
                "accent",
                "graphite",
                "sky",
                "sand"
              ]
            }
          },
          "required": [
            "whatsapp",
            "other"
          ],
          "additionalProperties": false
        },
        "background": {
          "type": "string",
          "enum": [
            "none",
            "pattern",
            "solid"
          ]
        }
      },
      "required": [
        "sentBubble",
        "background"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "restrictToFreeAndOwn",
    "autoCloseMinutes",
    "appearance"
  ],
  "additionalProperties": false
}
```

## Erros

`{"error": {"code", "message", "requestId"}}`. Códigos: `invalid_input` (400), `unauthorized` (401), `forbidden` / `account_pending` / `scope_missing` (403), `not_found` (404), `limit_reached` (409), `internal` (500).
