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

# Update Beneficiary

> Updates an existing beneficiary's details. Also used to backfill the account_owner_type and account_category classification fields on beneficiaries created before those fields existed.

Update the details of an existing saved beneficiary.

<Info>
  `PATCH` is the current update verb. `PUT /beneficiaries/{beneficiaryId}` remains supported as a
  backward-compatible alias with identical behaviour, but new integrations should use `PATCH`.
</Info>

## Example Request

```bash theme={null}
curl -X PATCH "https://api.rolla.xyz/api/v1/external/beneficiaries/c3d4e5f6-a7b8-9012-cdef-123456789012" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "currency": "NGN",
    "label": "Updated label",
    "account_name": "JOHN DOE",
    "account_number": "0123456789",
    "bank_name": "Access Bank",
    "bank_code": "000014",
    "account_owner_type": "business",
    "email": "john.updated@example.com"
  }'
```

<Tip>
  `PATCH`/`PUT` is also how you backfill the new classification fields on an existing
  beneficiary that predates them — send `account_owner_type` (and `account_category` for USD)
  to bring a legacy record into compliance.
</Tip>

## Example Response

```json theme={null}
{
  "status": 200,
  "success": true,
  "message": "Beneficiary updated successfully",
  "data": {
    "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "currency": "NGN",
    "label": "Updated label",
    "account_name": "JOHN DOE",
    "account_number": "0123456789",
    "bank_name": "Access Bank",
    "bank_code": "000014",
    "withdrawal_method": null,
    "account_owner_type": "business",
    "email": "john.updated@example.com",
    "created_at": "2024-01-10T08:00:00.000Z",
    "updated_at": "2024-01-15T12:00:00.000Z"
  }
}
```

<Note>
  The same validation rules apply as when creating a beneficiary, including the new
  `account_owner_type` and `account_category` fields and their grace-period behaviour. See the
  [Create Beneficiary](/api-reference/endpoint/beneficiaries/create) endpoint for required
  fields by withdrawal method, and the
  [Beneficiary Account Fields](/api-reference/endpoint/beneficiaries/account-fields) migration guide.
</Note>

<Warning>
  The body is validated as a whole, not as a partial patch — send the method's full required
  field set, not just the fields you are changing. In particular, a beneficiary on
  `"withdrawal_method": "ach"` or `"domestic_wire"` must include `routing_number` in the same
  request, now that it is enforced for both rails.
</Warning>


## OpenAPI

````yaml PATCH /beneficiaries/{beneficiaryId}
openapi: 3.1.0
info:
  title: Rolla Developer API
  description: >-
    API for programmatic transaction management on the Rolla platform. Monetary
    `amount` fields use the smallest unit of the referenced currency unless an
    endpoint says otherwise (e.g. NGN = kobo, USD = cents, where **100 cents =
    USD 1.00**).
  version: 1.0.0
servers:
  - url: https://api.rolla.xyz/api/v1/external
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /beneficiaries/{beneficiaryId}:
    patch:
      summary: Update Beneficiary
      description: >-
        Updates an existing beneficiary's details. Also used to backfill the
        account_owner_type and account_category classification fields on
        beneficiaries created before those fields existed.
      operationId: updateBeneficiary
      parameters:
        - name: beneficiaryId
          in: path
          required: true
          description: Beneficiary UUID
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BeneficiaryRequest'
      responses:
        '200':
          description: Beneficiary updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Beneficiary updated successfully
                  data:
                    type: object
                    properties:
                      beneficiary:
                        $ref: '#/components/schemas/SavedBeneficiary'
        '400':
          description: Bad request - Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Beneficiary not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    BeneficiaryRequest:
      type: object
      required:
        - currency
      properties:
        currency:
          type: string
          description: Currency code (e.g., NGN, USD)
          example: NGN
        label:
          type: string
          description: Friendly label for the beneficiary
        account_name:
          type: string
          description: Account holder name
          maxLength: 100
          example: JOHN DOE
        account_number:
          type: string
          description: Bank account number
          maxLength: 50
          example: '0123456789'
        bank_name:
          type: string
          description: Bank name
          maxLength: 100
          example: Access Bank
        bank_code:
          type: string
          description: Bank code (required for NGN beneficiaries)
          maxLength: 20
          example: '000014'
        bank_address:
          type: object
          description: >-
            Bank's physical address. Required for USD domestic and international
            wire transfers.
          properties:
            street:
              type: string
              example: 270 Park Ave
            city:
              type: string
              example: New York
            state:
              type: string
              example: NY
            postalCode:
              type: string
              example: '10017'
            country:
              type: string
              example: US
        swift_code:
          type: string
          description: SWIFT/BIC code (required for international wire)
          maxLength: 20
        email:
          type: string
          format: email
          description: Beneficiary email
          maxLength: 100
        contact_person:
          type: string
          description: Contact person name
          maxLength: 100
        beneficiary_address:
          type: object
          description: >-
            Beneficiary's physical address. Required for USD domestic and
            international wire transfers.
          properties:
            street:
              type: string
              example: 123 Main St
            city:
              type: string
              example: New York
            state:
              type: string
              example: NY
            postalCode:
              type: string
              example: '10001'
            country:
              type: string
              example: US
        withdrawal_method:
          type: string
          description: Withdrawal method
          enum:
            - domestic_wire
            - international_wire
            - ach
            - crypto_usdt
            - crypto_usdc
            - rolla_transfer
        routing_number:
          type: string
          description: 9-digit ABA routing number. Required for USD ach and domestic_wire.
          maxLength: 20
        wallet_address:
          type: string
          description: Crypto wallet address (for crypto withdrawals)
        wallet_chain:
          type: string
          description: Blockchain network (for crypto withdrawals)
          maxLength: 50
        intermediary_bank_name:
          type: string
          description: Intermediary bank name
          maxLength: 255
        intermediary_bank_routing_number:
          type: string
          description: Intermediary bank routing number
          maxLength: 50
        recipient_business_id:
          type: string
          format: uuid
          description: >-
            Required for rolla_transfer. The UUID of the destination Rolla
            business.
          example: d4e5f6a7-b8c9-0123-defa-456789012345
        account_owner_type:
          type: string
          enum:
            - individual
            - business
          description: >-
            Whether the account is held by an individual or a business. Required
            for every bank-account beneficiary (any fiat method that is not
            crypto or rolla_transfer, including NGN bank transfer,
            domestic_wire, and international_wire). Not applicable to
            crypto_usdt, crypto_usdc, or rolla_transfer. During the deprecation
            grace period, requests that omit this field still succeed but return
            a `deprecation_warning` object; after the enforcement date the
            request is rejected with a 400. See the Beneficiary Account Fields
            migration guide.
          example: business
        account_category:
          type: string
          enum:
            - checking
            - savings
          description: >-
            Whether a USD account is checking or savings. Required only when
            `currency` is USD. If you are not sure, use "checking". Subject to
            the same grace-period behaviour as account_owner_type.
          example: checking
    SavedBeneficiary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        currency:
          type: string
          example: NGN
        label:
          type: string
          example: Office rent
        account_name:
          type: string
          example: JOHN DOE
        account_number:
          type: string
          example: '0123456789'
        bank_name:
          type: string
          example: Access Bank
        bank_code:
          type: string
          example: '000014'
        bank_address:
          type: string
        swift_code:
          type: string
        email:
          type: string
          format: email
        contact_person:
          type: string
        beneficiary_address:
          type: string
        withdrawal_method:
          type: string
          enum:
            - domestic_wire
            - international_wire
            - ach
            - crypto_usdt
            - crypto_usdc
            - rolla_transfer
        routing_number:
          type: string
        wallet_address:
          type: string
        wallet_chain:
          type: string
        intermediary_bank_name:
          type: string
        intermediary_bank_routing_number:
          type: string
        recipient_business_id:
          type: string
          format: uuid
          description: >-
            Required for rolla_transfer. The UUID of the destination Rolla
            business.
        account_owner_type:
          type: string
          enum:
            - individual
            - business
          description: >-
            Whether the account is held by an individual or a business. Present
            for bank-account beneficiaries; null on legacy records that predate
            this field.
          example: business
        account_category:
          type: string
          enum:
            - checking
            - savings
          description: >-
            Whether a USD account is checking or savings. Present for USD
            beneficiaries; null on legacy records that predate this field.
          example: checking
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Rolla API key

````