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

# Update account

> Suspend, close, or re-activate an account by transitioning its status. Allowed: active→suspended/closed, suspended→active (re-activate) or closed, pending→closed. The KYB-gated pending→active step is not settable here (activation happens after KYB approval); closed is terminal. A PATCH to the current status is a no-op that returns the record; an invalid transition returns 409.



## OpenAPI

````yaml /openapi.json patch /v1/accounts/{accountId}
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Comprehensive payment platform API supporting fiat and crypto payments,
    currency conversion, and compliance management
  title: Zuba Payment Platform API
  version: '1.0'
servers: []
security: []
tags:
  - description: Manage M2M API keys and credentials
    name: API Keys
  - description: Internal ledger accounts and transactions
    name: Ledger
  - description: Handle incoming payments and deposits
    name: Pay-ins
  - description: Manage payouts, beneficiaries, and SEPA transfers
    name: Payouts
  - description: Manage outbound webhook endpoints and deliveries
    name: Webhooks
paths:
  /v1/accounts/{accountId}:
    patch:
      tags:
        - Accounts
      summary: Update account
      description: >-
        Suspend, close, or re-activate an account by transitioning its status.
        Allowed: active→suspended/closed, suspended→active (re-activate) or
        closed, pending→closed. The KYB-gated pending→active step is not
        settable here (activation happens after KYB approval); closed is
        terminal. A PATCH to the current status is a no-op that returns the
        record; an invalid transition returns 409.
      operationId: AccountsController_updateAccount
      parameters:
        - in: path
          name: accountId
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountDto'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponseDto'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponseDto'
          description: insufficient_scope (missing update:accounts)
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponseDto'
          description: Not found or not owned
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponseDto'
          description: Invalid status transition (e.g. pending→active, or out of closed)
      security:
        - bearer: []
components:
  schemas:
    UpdateAccountDto:
      properties:
        status:
          description: Lifecycle transition (suspend or close the account)
          enum:
            - active
            - suspended
            - closed
          example: suspended
          type: string
      required:
        - status
      type: object
    AccountResponseDto:
      properties:
        accountType:
          enum:
            - master
            - sub
          type: string
        country:
          description: ISO-3166 alpha-2
          example: SN
          type: string
        createdAt:
          format: date-time
          type: string
        id:
          description: Account record id
          format: uuid
          type: string
        parentAccountId:
          description: The master that owns this account. Derived from the API key.
          format: uuid
          type: string
        status:
          enum:
            - pending
            - active
            - suspended
            - closed
          type: string
      required:
        - id
        - parentAccountId
        - accountType
        - status
        - country
        - createdAt
      type: object
    GenericErrorResponseDto:
      properties:
        error:
          description: Error type identifier
          example: BAD_REQUEST
          type: string
        message:
          description: Error message
          example: Bad Request
          type: string
        path:
          description: Request path that generated the error
          example: /v1/beneficiaries
          type: string
        statusCode:
          description: HTTP status code
          example: 400
          type: number
        timestamp:
          description: ISO timestamp when the error occurred
          example: '2024-01-15T10:30:00.000Z'
          type: string
      required:
        - statusCode
        - message
        - error
        - timestamp
        - path
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: Enter Auth0 JWT token
      scheme: bearer
      type: http

````