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

# Update Account

> Updates an Account's display name or metadata. Only the fields included in the request body will be changed.



## OpenAPI

````yaml PATCH /accounts/{id}
openapi: 3.1.0
info:
  title: Otim Platform API
  version: v0
  description: >-
    API for managing accounts, entities, transfers, counterparties, and IBANs on
    the Otim platform.
servers:
  - url: https://api.otim.com/v0
security:
  - bearerAuth: []
paths:
  /accounts/{id}:
    patch:
      tags: []
      summary: Update Account
      description: >-
        Updates an Account's display name or metadata. Only the fields included
        in the request body will be changed.
      operationId: updateAccount
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The ID of the Account.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountRequest'
      responses:
        '200':
          description: Updated Account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Account not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateAccountRequest:
      type: object
      properties:
        name:
          type: string
          description: Update the display name for the Account.
        metadata:
          type: object
          nullable: true
          description: >-
            Replace the metadata attached to the Account. Set to `null` to
            clear.
    Account:
      type: object
      properties:
        id:
          type: string
          example: acc_01JA1B2C3D4E5F6G7H8J9K0L
        entityId:
          type: string
          example: ent_01JA1B2C3D4E5F6G7H8J9K0L
        name:
          type: string
          example: Treasury
        type:
          type: string
          enum:
            - wallet
            - bank
          example: wallet
        chain:
          type: string
          nullable: true
          example: base
        availableBalance:
          type: string
          example: '1000000'
        pendingBalance:
          type: string
          example: '0'
        lockedBalance:
          type: string
          example: '0'
        holdingBalance:
          type: string
          example: '0'
        currency:
          type: string
          example: USDC
        status:
          type: string
          enum:
            - active
            - inactive
          example: active
        autoEarn:
          type: boolean
          description: Whether this Account is earning yield on idle balances.
          example: true
        metadata:
          type: object
          nullable: true
        createdAt:
          type: string
          format: date-time
          example: '2025-01-15T12:00:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2025-01-15T12:00:00Z'
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: A machine-readable error code.
        details:
          type: object
          nullable: true
          description: Additional context about the error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key prefixed with `sk_`.

````