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

# Update account

> Update the picture, display name, and / or status (about) of the instance profile

**Auth:** `TokenAccount` or `TokenInstance` • **Rate limit:** `Global` (100/min) • **Idempotent:** yes (setting the same value again is a no-op)

## Description

Updates one or more fields of the connected account's profile: **picture**, **display name** (push name), and / or **status** (about). Partial update, at least one field must be sent. The `updatedFields` array in the response lists what was actually changed.

## Examples

### Everything

Updates all three profile fields in a single call: picture (public URL), display name ("João Silva"), and status ("Disponível"). The response lists which ones were actually changed in `updatedFields`.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/profile/account/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "profilePicture": "https://example.com/photo.jpg",
      "profileName": "João Silva",
      "profileStatus": "Disponível"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/profile/account/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      profilePicture: "https://example.com/photo.jpg",
      profileName:    "João Silva",
      profileStatus:  "Disponível"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/profile/account/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "profilePicture": "https://example.com/photo.jpg",
          "profileName":    "João Silva",
          "profileStatus":  "Disponível"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "profilePicture": "https://example.com/photo.jpg",
          "profileName":    "João Silva",
          "profileStatus":  "Disponível"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/profile/account/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Name only

Updates only `profileName` (push name) to "Vendas Empresa". The current picture and status are left unchanged, the handler accepts partial updates.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/profile/account/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "profileName": "Vendas Empresa"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/profile/account/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      profileName: "Vendas Empresa"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/profile/account/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "profileName": "Vendas Empresa"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "profileName": "Vendas Empresa"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/profile/account/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Base64 picture

Updates only the picture, sending the image inline as a `data:` URL with base64. The server decodes it, converts to JPEG 640x640, and applies it as the new profile picture.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/profile/account/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "profilePicture": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/profile/account/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      profilePicture: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/profile/account/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "profilePicture": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "profilePicture": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/profile/account/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Remove picture

Send `profilePicture: ""` (empty string) to delete the current picture. The profile is left without an image, showing WhatsApp's default avatar.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/profile/account/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "profilePicture": ""
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/profile/account/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      profilePicture: ""
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/profile/account/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "profilePicture": ""
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "profilePicture": ""
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/profile/account/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

Returns a simple envelope with `success`, a fixed `message` (`Profile updated successfully`), and `updatedFields`, an array with the names of the fields actually changed (`profilePicture`, `profileName`, `profileStatus`). Use this array to confirm which updates went through, fields that were not sent or were ignored (e.g., empty `profileName` is a no-op) are left out of the list.

```json 200 OK theme={null}
{
  "success": true,
  "message": "Profile updated successfully",
  "updatedFields": ["profileName", "profileStatus"]
}
```

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name.
</ParamField>

## Headers

<ParamField header="token" type="string" required>
  `TokenAccount` or `TokenInstance`.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Request body

At least **one** field is required.

<ParamField body="profilePicture" type="string">
  URL or base64. An empty string (`""`) **removes** the current picture. Converted to JPEG (max 640×640).
</ParamField>

<ParamField body="profileName" type="string">
  Push name, the name displayed to other contacts.
</ParamField>

<ParamField body="profileStatus" type="string">
  Text shown in the "About" section. Can be an empty string to clear it.
</ParamField>

## Notes

<Note>
  * `profilePicture: ""` **removes** the picture. `profileName: ""` is treated as a **no-op**. `profileStatus: ""` **clears** the status.
  * Picture URLs must be public, the server blocks downloads from internal networks (RFC1918, link-local) via SSRF guard.
  * Accepted formats: JPEG, PNG, WebP, GIF (first frame). Everything is converted to JPEG Q90 before upload.
  * The local cache (`profile_name`, `profile_picture_url`) is updated in the background, there may be a few seconds of lag.
  * Frequent changes may be rate-limited by WhatsApp.
</Note>

## Errors

| HTTP | Message                                                                               |
| ---- | ------------------------------------------------------------------------------------- |
| 400  | `At least one field must be provided (profilePicture, profileName, or profileStatus)` |
| 400  | `Instance is not connected to WhatsApp`                                               |
| 500  | `failed to process profile picture: <reason>`                                         |
| 500  | `failed to set profile picture: <reason>`                                             |
| 500  | `failed to set profile name: <reason>`                                                |
| 500  | `failed to set profile status: <reason>`                                              |

Envelope:

```json theme={null}
{
  "success": false,
  "error": { "message": "At least one field must be provided (profilePicture, profileName, or profileStatus)" }
}
```
