# Close Account

Use this endpoint for closing a customer's account by passing the `accountNumber` and `closureReason` in the request body. <br>

<mark style="color:green;">`POST`</mark> `/api/postings/v1/closeaccount`

{% hint style="info" %}
You can also pass a GUID to the `instrumentNumber` parameter, but a generated GUID reference will be created by default if you don't provide one. \
\
This request does not deactivate a customer account. To deactivate a customer account, use the [Deactivate Customer Account](/udara360-docs-1/customer/customer-api/deactivate-customer-account.md) API.
{% endhint %}

**Headers**

| Name                                            | Value                |
| ----------------------------------------------- | -------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | `application/json`   |
| Authorization<mark style="color:red;">\*</mark> | `Bearer <token>`     |
| Request-Reference                               | `{unique_reference}` |

**Body**

<table><thead><tr><th width="194">Name</th><th width="173">Data Type (length)</th><th width="100" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>accountNumber</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(150)</em></a></td><td>true</td><td>The account number that needs to be closed</td></tr><tr><td><code>closureReason</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(150)</em></a></td><td>true</td><td>The reason for closing the account.<br><br><em>Suggested Options:</em><br><em>i. Customer's request</em> <br><em>ii. Regulatory requirement</em> <br><em>iii. Fraud related concern</em> <br><em>iv. Court order</em> <br><em>v. Duplication</em> <br><em>vi. Management discretion</em></td></tr><tr><td><code>instrumentNumber</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(150)</em></a></td><td>false</td><td>Instrument number for tranasction status associated with the account closure<br><br><em>If empty, a globally unique identifier (GUID) is generated by default</em></td></tr></tbody></table>

Here is an example request and response with a sample payload sent to the endpoint in Curl format.

<details>

<summary>Sample Request</summary>

```json
curl --location -g '{{baseurl}}/api/postings/v1/closeaccount' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer {token}' \
--header 'request-reference: {unique_reference}' \
--data '{
  "accountNumber": "string",
  "closureReason": "string",
  "instrumentNumber": "string"
}'
```

</details>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "status": true,
  "message": "string",
  "data": {
    "statusCode": "string",
    "referenceNumber": "string",
    "instrumentNumber": "string",
    "duration": "string"
  }
}
```

{% endtab %}
{% endtabs %}

[^1]: This is the maximum number of characters allowed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.udara360.io/udara360-docs-1/account/editor/close-account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
