# me.profile_update

Alterar meu perfil. Altera nome e/ou foto do próprio usuário. `avatarUrl` é um endereço https ou uma imagem PNG/JPEG/WebP em data URL (até ~200 KB); null remove a foto. Campos omitidos não mudam.

- Endpoint: `POST https://app.atomiks.com.br/api/v1/me.profile_update` (corpo JSON)
- Quem pode chamar: qualquer usuário autenticado
- Escopo da chave: nenhum (qualquer chave serve)
- Grava dados: sim
- Pela chave de API: sim
- Ferramenta MCP: `me_profile_update`
- Ficha em JSON: `https://app.atomiks.com.br/api/v1/openapi.json` (operationId `me.profile_update`)

## Entrada

| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
| `name` | string | não |  |
| `avatarUrl` | string \| null | não |  |

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

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "avatarUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 280000
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
```

</details>

## Exemplo

```bash
curl -X POST https://app.atomiks.com.br/api/v1/me.profile_update \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Ana Souza"}'
```

CLI:

```bash
node cli/atomiks.mjs me.profile_update --json '{"name":"Ana Souza"}'
```

MCP: ferramenta `me_profile_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": {
    "name": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "avatarUrl": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "name",
    "email",
    "avatarUrl"
  ],
  "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).
