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

# Update beneficiary

> Change a saved beneficiary's details.



## OpenAPI

````yaml PUT /api/b2b/external-accounts/{externalAccountId}
openapi: 3.1.0
info:
  title: Tanda API
  version: 1.0.0
  description: >-
    Collect and send KES payments in Kenya through M-PESA, Airtel Money and bank
    transfer.
servers:
  - url: https://api.tandapay.io
    description: Sandbox and production (your keys decide which)
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Account
  - name: Checkout
  - name: Collections
  - name: Payouts
  - name: Beneficiaries
  - name: Transactions
  - name: Reference data
  - name: Webhooks
paths:
  /api/b2b/external-accounts/{externalAccountId}:
    put:
      tags:
        - Beneficiaries
      summary: Update beneficiary
      description: >-
        Updates a saved beneficiary, for example when a recipient changes banks.
        Send only the fields you're changing.
      operationId: update-external-account
      parameters:
        - name: externalAccountId
          in: path
          required: true
          description: The beneficiary's ID.
          schema:
            type: string
          example: ea_9Xk2LmPq
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                country:
                  type: string
                  description: ISO 3166-1 alpha-2 country code. Tanda supports `KE`.
                  enum:
                    - KE
                  example: KE
                currency:
                  type: string
                  description: ISO 4217 currency code. Tanda supports `KES`.
                  enum:
                    - KES
                  example: KES
                destination:
                  type: string
                  enum:
                    - MoMo
                    - Bank Account
                    - Paybill
                    - Till
                payoutMethod:
                  type: object
                  properties:
                    accountName:
                      type: string
                    accountNumber:
                      type: string
                    code:
                      type: string
                    businessNumber:
                      type: string
            example:
              payoutMethod:
                accountName: Kilimo Supplies Ltd
                accountNumber: '01100765432100'
                code: '1243'
      responses:
        '200':
          description: Updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
              example:
                success: true
                message: External account updated successfully.
        '401':
          description: Missing, invalid or expired bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: Unauthorized
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          description: Human-readable; may change.
        errorCode:
          type: string
          description: Stable code to branch on.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token from Generate bearer token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.