> This page is for BaaS.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://en.docs.api.corpx.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.docs.api.corpx.com/_mcp/server.

# Update boleto beneficiary registration data

PATCH https://tenant.api.corpx.com/v1/accounts/{accountId}/boleto/charge/beneficiary
Content-Type: application/json

Updates registration data of this account's beneficiary. The facade looks up the beneficiary from the account; do not send a beneficiary id. At least one field is required. A person account accepts `name` and `socialName`; a company account accepts `legalName` and `tradeName`. `email`, `phone` and representative fields apply to both. Asynchronous: **202** with `operationId`. Scope `boleto_charge.manage`. Requires `boleto_charge`.

Reference: https://en.docs.api.corpx.com/baas/referencia/boleto-charge/update-boleto-charge-beneficiary

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `accountId` (string, required) — Account identifier.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.
- `Idempotency-Key` (string, optional) — Optional client-generated idempotency token (recommended for safe retries).

### Body (application/json)

This endpoint expects a BoletoChargeBeneficiaryUpdate.

- `legalName` (string, optional)
- `tradeName` (string, optional)
- `name` (string, optional)
- `socialName` (string, optional)
- `email` (string, optional)
- `phone` (string, optional)
- `representativeName` (string, optional)
- `representativeEmail` (string, optional)
- `representativePhone` (string, optional)

## Response

### 202

Accepted. The settlement bank confirms later.

- `operationId` (string, optional)
- `beneficiaryId` (string, optional)
- `processingStatus` (enum, optional)
  - Allowed values: `ELIGIBLE`, `PENDING`, `INELIGIBLE`, `UNDER_REVIEW`

## Errors

### 400 Bad Request Error

Invalid request sent by client.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 403 Forbidden Error

Requester does not have permission to perform the operation.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 404 Not Found Error

This account has no beneficiary yet.

- `any`

### 422 Unprocessable Entity Error

Holder is unknown to the boleto module, or the account is neither PF nor PJ.

- `any`

## Types

### ErrorResponsePartner

Raw error from the settlement bank, when the failure came from it. Diagnostic only.

- `code` (string, optional)
- `message` (string, optional)
- `field` (string, optional) — Field the partner pointed at, when any.

## Examples

**Request**

```json
{
  "legalName": "MARIA DA SILVA",
  "tradeName": "MARIA DA SILVA",
  "name": "MARIA DA SILVA",
  "socialName": "MARIA DA SILVA",
  "email": "maria.silva@example.com",
  "phone": "+5511999999999",
  "representativeName": "MARIA DA SILVA",
  "representativeEmail": "maria.silva@example.com",
  "representativePhone": "+5511999999999"
}
```

**Response**

```json
{
  "operationId": "8c1f6a2e-4d3b-4b9a-9f0e-1a2b3c4d5e6f",
  "beneficiaryId": "8c1f6a2e-4d3b-4b9a-9f0e-1a2b3c4d5e6f",
  "processingStatus": "ELIGIBLE"
}
```

**SDK Code**

```python Boleto Charge_updateBoletoChargeBeneficiary_example
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary"

payload = {
    "legalName": "MARIA DA SILVA",
    "tradeName": "MARIA DA SILVA",
    "name": "MARIA DA SILVA",
    "socialName": "MARIA DA SILVA",
    "email": "maria.silva@example.com",
    "phone": "+5511999999999",
    "representativeName": "MARIA DA SILVA",
    "representativeEmail": "maria.silva@example.com",
    "representativePhone": "+5511999999999"
}
headers = {
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Boleto Charge_updateBoletoChargeBeneficiary_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary';
const options = {
  method: 'PATCH',
  headers: {
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"legalName":"MARIA DA SILVA","tradeName":"MARIA DA SILVA","name":"MARIA DA SILVA","socialName":"MARIA DA SILVA","email":"maria.silva@example.com","phone":"+5511999999999","representativeName":"MARIA DA SILVA","representativeEmail":"maria.silva@example.com","representativePhone":"+5511999999999"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Boleto Charge_updateBoletoChargeBeneficiary_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary"

	payload := strings.NewReader("{\n  \"legalName\": \"MARIA DA SILVA\",\n  \"tradeName\": \"MARIA DA SILVA\",\n  \"name\": \"MARIA DA SILVA\",\n  \"socialName\": \"MARIA DA SILVA\",\n  \"email\": \"maria.silva@example.com\",\n  \"phone\": \"+5511999999999\",\n  \"representativeName\": \"MARIA DA SILVA\",\n  \"representativeEmail\": \"maria.silva@example.com\",\n  \"representativePhone\": \"+5511999999999\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Boleto Charge_updateBoletoChargeBeneficiary_example
require 'uri'
require 'net/http'

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"legalName\": \"MARIA DA SILVA\",\n  \"tradeName\": \"MARIA DA SILVA\",\n  \"name\": \"MARIA DA SILVA\",\n  \"socialName\": \"MARIA DA SILVA\",\n  \"email\": \"maria.silva@example.com\",\n  \"phone\": \"+5511999999999\",\n  \"representativeName\": \"MARIA DA SILVA\",\n  \"representativeEmail\": \"maria.silva@example.com\",\n  \"representativePhone\": \"+5511999999999\"\n}"

response = http.request(request)
puts response.read_body
```

```java Boleto Charge_updateBoletoChargeBeneficiary_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"legalName\": \"MARIA DA SILVA\",\n  \"tradeName\": \"MARIA DA SILVA\",\n  \"name\": \"MARIA DA SILVA\",\n  \"socialName\": \"MARIA DA SILVA\",\n  \"email\": \"maria.silva@example.com\",\n  \"phone\": \"+5511999999999\",\n  \"representativeName\": \"MARIA DA SILVA\",\n  \"representativeEmail\": \"maria.silva@example.com\",\n  \"representativePhone\": \"+5511999999999\"\n}")
  .asString();
```

```php Boleto Charge_updateBoletoChargeBeneficiary_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary', [
  'body' => '{
  "legalName": "MARIA DA SILVA",
  "tradeName": "MARIA DA SILVA",
  "name": "MARIA DA SILVA",
  "socialName": "MARIA DA SILVA",
  "email": "maria.silva@example.com",
  "phone": "+5511999999999",
  "representativeName": "MARIA DA SILVA",
  "representativeEmail": "maria.silva@example.com",
  "representativePhone": "+5511999999999"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

echo $response->getBody();
```

```csharp Boleto Charge_updateBoletoChargeBeneficiary_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary");
var request = new RestRequest(Method.PATCH);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"legalName\": \"MARIA DA SILVA\",\n  \"tradeName\": \"MARIA DA SILVA\",\n  \"name\": \"MARIA DA SILVA\",\n  \"socialName\": \"MARIA DA SILVA\",\n  \"email\": \"maria.silva@example.com\",\n  \"phone\": \"+5511999999999\",\n  \"representativeName\": \"MARIA DA SILVA\",\n  \"representativeEmail\": \"maria.silva@example.com\",\n  \"representativePhone\": \"+5511999999999\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Boleto Charge_updateBoletoChargeBeneficiary_example
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "legalName": "MARIA DA SILVA",
  "tradeName": "MARIA DA SILVA",
  "name": "MARIA DA SILVA",
  "socialName": "MARIA DA SILVA",
  "email": "maria.silva@example.com",
  "phone": "+5511999999999",
  "representativeName": "MARIA DA SILVA",
  "representativeEmail": "maria.silva@example.com",
  "representativePhone": "+5511999999999"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```