---
updatedAt: 2026-11-12T11:27:16.000Z
agentTools:
  projectIndex: https://docs.decentro.tech/llms.txt
---

# Update Ledger Account

This API is used to update the status of a Ledger account

> 🙌 Important Note
>
> Please use only **Staging Credentials** on each API Reference page to test the APIs directly from our Documentation.

### API Endpoints

| Environment       | Endpoint                                                                                 |
| :---------------- | :--------------------------------------------------------------------------------------- |
| Staging / Sandbox | <https://in.staging.decentro.tech/v2/ledger/journal/{journal_urn}/account/{account_urn}> |
| Production        | <https://in.decentro.tech/v2/ledger/journal/{journal_urn}/account/{account_urn}>         |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "decentro-staging",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://in.staging.decentro.tech"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/v2/ledger/journal/{journal_urn}/account/{account_urn}": {
      "put": {
        "summary": "Update Ledger Account",
        "description": "This API is used to update the status of a Ledger account",
        "operationId": "update-ledger-account",
        "parameters": [
          {
            "name": "journal_urn",
            "in": "path",
            "description": "Journal URN received from Decentro at the time of creation under which a ledger account exists that needs to be updated",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "client_id",
            "in": "header",
            "description": "Decentro assigned client_id for the company",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "client_secret",
            "in": "header",
            "description": "Decentro assigned client_secret for the company",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "module_secret",
            "in": "header",
            "description": "Decentro assigned module_secret for the company",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_urn",
            "in": "path",
            "description": "Account URN received from Decentro at the time of creation against the ledger account that needs to be updated",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reference_id",
                  "status",
                  "purpose",
                  "consent"
                ],
                "properties": {
                  "reference_id": {
                    "type": "string",
                    "description": "Your unique API reference id"
                  },
                  "status": {
                    "type": "string",
                    "description": "Status of the ledger account. Accepted value - ACTIVE, INACTIVE, HOLD"
                  },
                  "purpose": {
                    "type": "string",
                    "description": "Purpose of the ledger account"
                  },
                  "consent": {
                    "type": "boolean",
                    "description": "Consent of creation"
                  }
                }
              },
              "examples": {
                "Success: Update Account to Inactive": {
                  "value": {
                    "reference_id": "001-02",
                    "status": "INACTIVE",
                    "purpose": "this is to update the status of a ledger account",
                    "consent": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"decentroTxnId\": \"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF\",\n    \"status\": \"SUCCESS\",\n    \"responseCode\": \"S00000\",\n    \"message\": \"Transaction successful\",\n    \"data\": {\n        \"transactionStatus\": \"SUCCESS\",\n        \"transactionDescription\": \"Ledger account updated successfully\",\n        \"urn\": \"LA0001\",\n        \"referenceId\": \"ledger_account_1\",\n        \"name\": \"Ledger Account 1\",\n        \"journal\": {\n            \"urn\": \"JOURNAL001\",\n            \"referenceId\": \"test_journal_1\",\n            \"name\": \"Test journal 1\"\n        },\n        \"consumer\": {\n            \"urn\": \"C0001\",\n            \"referenceId\": \"consumer_1\",\n            \"name\": \"Consumer 1\"\n        },\n        \"purpose\": \"this is to create a ledger account\",\n        \"additionalParameters\": {\n            \"parameter1\": \"value1\",\n            \"parameter2\": \"value2\"\n        },\n        \"currency\": \"INR\",\n        \"balance\": {\n            \"available\": 70.0,\n            \"blocked\": 30.5\n        },\n        \"status\": \"INACTIVE\",\n        \"creationTimestamp\": \"2022-06-06 21:21:21\",\n        \"lastModificationTimestamp\": \"2022-06-06 22:22:22\"\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "decentroTxnId": {
                      "type": "string",
                      "example": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF"
                    },
                    "status": {
                      "type": "string",
                      "example": "SUCCESS"
                    },
                    "responseCode": {
                      "type": "string",
                      "example": "S00000"
                    },
                    "message": {
                      "type": "string",
                      "example": "Transaction successful"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "transactionStatus": {
                          "type": "string",
                          "example": "SUCCESS"
                        },
                        "transactionDescription": {
                          "type": "string",
                          "example": "Ledger account updated successfully"
                        },
                        "urn": {
                          "type": "string",
                          "example": "LA0001"
                        },
                        "referenceId": {
                          "type": "string",
                          "example": "ledger_account_1"
                        },
                        "name": {
                          "type": "string",
                          "example": "Ledger Account 1"
                        },
                        "journal": {
                          "type": "object",
                          "properties": {
                            "urn": {
                              "type": "string",
                              "example": "JOURNAL001"
                            },
                            "referenceId": {
                              "type": "string",
                              "example": "test_journal_1"
                            },
                            "name": {
                              "type": "string",
                              "example": "Test journal 1"
                            }
                          }
                        },
                        "consumer": {
                          "type": "object",
                          "properties": {
                            "urn": {
                              "type": "string",
                              "example": "C0001"
                            },
                            "referenceId": {
                              "type": "string",
                              "example": "consumer_1"
                            },
                            "name": {
                              "type": "string",
                              "example": "Consumer 1"
                            }
                          }
                        },
                        "purpose": {
                          "type": "string",
                          "example": "this is to create a ledger account"
                        },
                        "additionalParameters": {
                          "type": "object",
                          "properties": {
                            "parameter1": {
                              "type": "string",
                              "example": "value1"
                            },
                            "parameter2": {
                              "type": "string",
                              "example": "value2"
                            }
                          }
                        },
                        "currency": {
                          "type": "string",
                          "example": "INR"
                        },
                        "balance": {
                          "type": "object",
                          "properties": {
                            "available": {
                              "type": "integer",
                              "example": 70,
                              "default": 0
                            },
                            "blocked": {
                              "type": "number",
                              "example": 30.5,
                              "default": 0
                            }
                          }
                        },
                        "status": {
                          "type": "string",
                          "example": "INACTIVE"
                        },
                        "creationTimestamp": {
                          "type": "string",
                          "example": "2022-06-06 21:21:21"
                        },
                        "lastModificationTimestamp": {
                          "type": "string",
                          "example": "2022-06-06 22:22:22"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid - Journal unique reference": {
                    "value": "{\n    \"decentroTxnId\": \"92178DE35E94441295855D2FEFAF5C93\",\n    \"status\": \"FAILURE\",\n    \"responseCode\": \"E00009\",\n    \"message\": \"No active journal found for the given `journal_unique_reference_number`. Please check the value and try again.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "decentroTxnId": {
                      "type": "string",
                      "example": "92178DE35E94441295855D2FEFAF5C93"
                    },
                    "status": {
                      "type": "string",
                      "example": "FAILURE"
                    },
                    "responseCode": {
                      "type": "string",
                      "example": "E00009"
                    },
                    "message": {
                      "type": "string",
                      "example": "No active journal found for the given `journal_unique_reference_number`. Please check the value and try again."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```