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

# Update Managed Account

> Update permitted managed-account metadata.

Update the metadata fields permitted for a visible managed account.

### Endpoint

`POST /v3/onboarding/managed_accounts/update`

### Authentication and target

A user-scoped owner credential is required. The selected managed account must be visible through the user's active Master Account relationship. This route does not become accessible merely by adding account-targeting headers.

Do not send X-ISPB or X-Account-Number. This user-only management route rejects account-targeting headers. The account selector documented below belongs in the JSON request body.

### Request body

Send exactly one of `reference_id` or `account`. Optional patch fields are `trading_name`, `notification_email`, and `return_url`.

### Success data

The updated `managed_account` object.

### Behavior and validation

`trading_name` is accepted only for MOR. `return_url` is accepted only for a VA using Hosted Link while its compliance session is `PENDING_SUBMISSION`. The v3 handler does not perform email-format validation, does not require a non-empty patch, and has no version precondition.

### Errors

Every call can fail for missing or invalid signature headers, an expired timestamp, nonce replay, an invalid body hash or signature, insufficient permission, or a downstream service error. Endpoint-specific errors include:

* `invalid_parameter` for an invalid selector.
* `field_invalid` for model or compliance-session restrictions.
* `invalid_user`, `permission_denied`, or `not_found` for ownership/visibility failures.

### Example request

```bash theme={null}
curl --request POST "${BASE_URL}/v3/onboarding/managed_accounts/update" \
  --header "Content-Type: application/json" \
  --header "X-Client-ID: ${CLIENT_ID}" \
  --header "X-Timestamp: ${TIMESTAMP_MS}" \
  --header "X-Nonce: ${NONCE}" \
  --header "X-Signature: ${SIGNATURE}" \
  --data '{"reference_id":"managed-mor-demo-001","trading_name":"Demo Store"}'
```

### Example response

```json theme={null}
{"code":200,"message":"success","data":{"managed_account":{"reference_id":"managed-mor-demo-001","model":1,"trading_name":"Demo Store","status":2}},"time":1710002300000}
```
