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

# Update Account

> Update information about a single account



## OpenAPI

````yaml api-reference/openapi.yaml PATCH /api/users/{id}/accounts/{account_id}
openapi: 3.0.1
info:
  title: DebtWise API
  version: '2024-07-01'
  description: >-
    The DebtWise API suite is the primary means for developers to offer debt
    management tools within their existing applications.
  contact:
    name: DebtWise Support
    url: https://debt-wise.com
    email: support@debt-wise.com
servers:
  - url: https://staging.debt-wise.com
    description: Sandbox server (uses test data)
  - url: https://app.debt-wise.com
    description: Production server (uses live data)
security:
  - bearerAuth: []
tags:
  - name: Ping
  - name: Users
  - name: Accounts
  - name: Credit Scores
  - name: Equifax
  - name: Debt Payoff Plan
  - name: Debt Payoff Plan Payments
  - name: Articles
  - name: Debt Calculator
paths:
  /api/users/{id}/accounts/{account_id}:
    parameters:
      - $ref: '#/components/parameters/userIdParam'
      - $ref: '#/components/parameters/accountIdParam'
      - $ref: '#/components/parameters/acceptEncodingParam'
      - $ref: '#/components/parameters/apiVersionParam'
    patch:
      tags:
        - Accounts
      summary: Update Account
      description: ' Update information about a single account'
      operationId: updateAccount
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                nickname:
                  type: string
                  example: Chase credit card
                  description: User's nickname for the account
                user_apr:
                  type: number
                  example: 5.5
                  description: >-
                    User's apr for account. Could be provide if APR from
                    provider invalid or missing.
                user_minimum_payment:
                  type: integer
                  example: 10000
                  description: >-
                    User's minimum payment for account in cents. Could be
                    provide if effective minimum payment from provider invalid
                    or missing.
                user_next_payment_date:
                  type: string
                  example: '2038-03-04'
                  description: >-
                    User's next payment date for account. Could be provide if
                    next payment date from provider invalid or missing.
        required: true
      responses:
        '200':
          description: Returns updated information about an account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  parameters:
    userIdParam:
      name: id
      in: path
      schema:
        type: integer
        example: 1
      description: An userId.
      required: true
    accountIdParam:
      name: account_id
      in: path
      schema:
        type: integer
        example: 1
      description: An accountId.
      required: true
    acceptEncodingParam:
      name: Accept-Encoding
      in: header
      description: We can compress a response with gzip.
      required: false
      schema:
        type: string
        example: gzip deflate
    apiVersionParam:
      name: API-Version
      in: header
      description: API API Version. See Versioning page for more details.
      required: false
      schema:
        type: string
        example: '2024-07-01'
  schemas:
    Account:
      type: object
      required:
        - id
        - name
        - type
        - subtype
        - mask
        - status
      properties:
        id:
          type: integer
          example: 1
          description: Account ID
        nickname:
          type: string
          nullable: true
          example: Primary credit card
          description: User's nickname for account
        user_apr:
          type: number
          nullable: true
          example: 5.5
          description: User's APR for account
        user_minimum_payment:
          type: integer
          nullable: true
          example: 10000
          description: User's minimum payment for account in cents
        effective_minimum_payment:
          type: integer
          nullable: true
          example: 15000
          description: Account minimum payment in cents
        effective_apr:
          type: number
          nullable: true
          example: 6.3
          description: Account's APR
        name:
          type: string
          example: JCP Morgan
          description: Account's name
        type:
          type: string
          enum:
            - depository
            - loan
            - investment
            - other
          example: loan
          description: Account's type
        subtype:
          type: string
          nullable: true
          enum:
            - student_loan
            - credit_card_loan
            - auto_loan
            - personal_loan
            - mortgage_loan
            - medical_loan
            - other_loan
            - checking
            - savings
          example: credit_card_loan
          description: Account's sub type, which indicates which the account type
        mask:
          type: string
          example: '1234'
          minLength: 4
          maxLength: 4
          description: Account's mask, or the last 4 digits of the account number
        original_loan_amount:
          type: integer
          nullable: true
          example: 15000000
          description: Original loan amount in cents
        status:
          type: string
          enum:
            - active
            - disabled
            - closed
          example: active
          description: Account's status
        balance:
          type: integer
          nullable: true
          example: 150000
          description: Balance of account in cents
        limit:
          type: integer
          nullable: true
          example: 0
          description: Maximum limit of account in cents
        last_payment_amount:
          type: integer
          nullable: true
          example: 20000
          description: Last payment amount for the loan in cents
        last_updated_at:
          type: string
          nullable: true
          example: '2024-06-01'
          description: Last data sync for account date
        last_payment_date:
          type: string
          nullable: true
          example: '2024-05-25'
          description: Last payment date
        opened_at:
          type: string
          nullable: true
          example: '2024-05-25'
          description: Date when account was opened
        closed_at:
          type: string
          nullable: true
          example: '2024-05-25'
          description: Date when account was closed
        institution_name:
          type: string
          nullable: true
          example: Chase
          description: Account's Institution name
        institution_logo:
          type: string
          nullable: true
          description: Base 64 encoded image
        next_payment_due_date:
          type: string
          nullable: true
          example: '2024-06-25'
          description: Next payment date
        user_next_payment_date:
          type: string
          nullable: true
          example: '2024-06-25'
          description: User's custom next payment date
        first_time_payment:
          type: boolean
          nullable: true
          example: false
          description: Indicates if next payment will be the first
        expected_payoff_date:
          type: string
          nullable: true
          example: '2052-01-01'
          description: Indicates account's close date if minimum payment will be paid off
        payments_history:
          type: array
          items:
            type: string
            minItems: 0
            maxItems: 25
            enum:
              - '0'
              - '1'
              - '2'
              - '3'
              - '4'
              - '5'
              - '6'
              - '7'
              - '8'
              - '9'
              - ''
              - E
              - '*'
          description: >-
            24 months payment history, where each string represents monthly
            payment status:

            "0" = The account is too new to rate, or has been approved, but not
            yet used;

            "1" = Payments have been made on-time;

            "2" = Two or fewer payments are past due;

            "3" = Three or fewer payments are past due;

            "4" = Four or fewer payments are past due;

            "5" = Either more than four payments are past due, or least one
            payment is more than 120 days past due;

            "6" = The account is with collections (Enhanced Trade Only);

            "7" = Included in Chapter 13;

            "8" = Repossession;

            "9" = Charge-off;

            "E" = The account has a zero balance or is current;

            "*" = Payment status was not available;

            Blank = Not reported;
    InternalServerError:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: internal_server_error
              description: An identifier of an error type inside API.
            message:
              type: string
              example: >-
                We've notified our engineers and hope to address this issue
                shortly.
              description: A human-readable error description.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````