> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llmgenerator.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Atualizar perfil da conta

> Este endpoint atualiza o perfil do usuário autenticado.

## PUT /accounts/profile

Este endpoint permite atualizar as informações de perfil do usuário.

### Corpo da requisição

<ParamField body="firstName" type="string">
  Novo nome (1–50 caracteres).
</ParamField>

<ParamField body="lastName" type="string">
  Novo sobrenome (1–50 caracteres).
</ParamField>

<ParamField body="company" type="string">
  Novo nome da empresa (máximo 100 caracteres).
</ParamField>

### Resposta

<ResponseField name="success" type="boolean">
  Se a atualização foi bem-sucedida.
</ResponseField>

<ResponseField name="message" type="string">
  Mensagem de status.
</ResponseField>

<ResponseField name="account" type="object">
  Dados atualizados da conta.

  <Expandable title="Propriedades de account">
    <ResponseField name="id" type="string">
      Identificador único do usuário.
    </ResponseField>

    <ResponseField name="firstName" type="string">
      Nome atualizado.
    </ResponseField>

    <ResponseField name="lastName" type="string">
      Sobrenome atualizado.
    </ResponseField>

    <ResponseField name="company" type="string">
      Nome da empresa atualizado.
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      Data e hora da atualização em ISO 8601.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT https://api.llmgenerator.com/api/v1/accounts/profile \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "firstName": "Jane",
      "company": "New Company Inc"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.llmgenerator.com/api/v1/accounts/profile',
    {
      method: 'PUT',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        firstName: 'Jane',
        company: 'New Company Inc'
      })
    }
  );
  ```
</RequestExample>

<ResponseExample>
  ```json Sucesso (200) theme={null}
  {
    "success": true,
    "message": "Profile updated successfully",
    "account": {
      "id": "user_abc123def456",
      "firstName": "Jane",
      "lastName": "Doe",
      "company": "New Company Inc",
      "updatedAt": "2026-01-27T10:00:00.000Z"
    }
  }
  ```

  ```json Erro de validação (400) theme={null}
  {
    "message": "Validation error: First name must be at least 1 character"
  }
  ```
</ResponseExample>
