# inbox.quick_reply_update

Alterar resposta rápida. Altera nome, atalho (`null` remove) ou texto de uma resposta rápida. Campos omitidos não mudam.

- Endpoint: `POST https://app.atomiks.com.br/api/v1/inbox.quick_reply_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_quick_reply_update`
- Ficha em JSON: `https://app.atomiks.com.br/api/v1/openapi.json` (operationId `inbox.quick_reply_update`)

## Entrada

| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
| `id` | string (uuid) | sim |  |
| `name` | string | não |  |
| `shortcut` | string \| null | não |  |
| `body` | string | não |  |
| `uploadId` | string (uuid) \| null | não |  |
| `channelKind` | "whatsapp_cloud" \| "whatsapp_web" \| "instagram" \| null | não |  |
| `type` | "text" \| "interactive" | não |  |
| `contents` | object | não |  |

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

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "shortcut": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 40,
          "pattern": "^[^\\s/]+$"
        },
        {
          "type": "null"
        }
      ]
    },
    "body": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "uploadId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "channelKind": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "whatsapp_cloud",
            "whatsapp_web",
            "instagram"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "text",
        "interactive"
      ]
    },
    "contents": {
      "type": "object",
      "properties": {
        "header": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "text"
                },
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "image",
                    "video",
                    "document"
                  ]
                },
                "uploadId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "filename": {
                  "type": "string",
                  "maxLength": 255
                }
              },
              "required": [
                "kind",
                "uploadId"
              ],
              "additionalProperties": false
            }
          ]
        },
        "footer": {
          "type": "string",
          "minLength": 1,
          "maxLength": 60
        },
        "buttons": {
          "minItems": 1,
          "maxItems": 3,
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "reply"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  }
                },
                "required": [
                  "kind",
                  "label"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "url"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "pattern": "^https:\\/\\/"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "url"
                ],
                "additionalProperties": false
              }
            ]
          }
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "id"
  ]
}
```

</details>

## Exemplo

```bash
curl -X POST https://app.atomiks.com.br/api/v1/inbox.quick_reply_update \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"00000000-0000-0000-0000-000000000000","body":"Olá! Em que posso ajudar?"}'
```

CLI:

```bash
node cli/atomiks.mjs inbox.quick_reply_update --json '{"id":"00000000-0000-0000-0000-000000000000","body":"Olá! Em que posso ajudar?"}'
```

MCP: ferramenta `inbox_quick_reply_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": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "shortcut": {
      "type": [
        "string",
        "null"
      ]
    },
    "body": {
      "type": "string"
    },
    "uploadId": {
      "type": [
        "string",
        "null"
      ]
    },
    "updatedAt": {
      "type": "string"
    },
    "channelKind": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "whatsapp_cloud",
            "whatsapp_web",
            "instagram"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "text",
        "interactive"
      ]
    },
    "contents": {
      "type": "object",
      "properties": {
        "header": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "text"
                },
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "image",
                    "video",
                    "document"
                  ]
                },
                "uploadId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "filename": {
                  "type": "string",
                  "maxLength": 255
                }
              },
              "required": [
                "kind",
                "uploadId"
              ],
              "additionalProperties": false
            }
          ]
        },
        "footer": {
          "type": "string",
          "minLength": 1,
          "maxLength": 60
        },
        "buttons": {
          "minItems": 1,
          "maxItems": 3,
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "reply"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  }
                },
                "required": [
                  "kind",
                  "label"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "url"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "pattern": "^https:\\/\\/"
                  }
                },
                "required": [
                  "kind",
                  "label",
                  "url"
                ],
                "additionalProperties": false
              }
            ]
          }
        }
      },
      "additionalProperties": false
    },
    "usesVariables": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "name",
    "shortcut",
    "body",
    "uploadId",
    "updatedAt",
    "channelKind",
    "type",
    "contents",
    "usesVariables"
  ],
  "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).
