# Accounts

### Creating a New Account for a Customer

A new account for a customer can be created using the `POST` endpoint: `/customers/{customerId}/accounts`. .

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/customers/{customerId}/accounts" method="post" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

### Account Entity Updates

Any internal updates to the account entity will be reported through webhook update events. For details on how to set up and manage webhook subscriptions, please refer to [Webhooks](/developer-guides/api-integration/api-reference/webhooks.md).

### Blockchain Updates

To proceed with account deployment and activation, a challenge issued by the endpoint must be signed and verified (see [Blockchain Updates](/developer-guides/api-integration/blockchain-updates.md)).

### Retrieve Account Entities

To retrieve a list of all account entities registered for the programme, make a `GET` request to `/accounts`.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/accounts" method="get" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

### Retrieve an Individual Customer's Accounts

To retrieve information about an individual customer's accounts, make a `GET` request to `/customers/{customerId}/account` with the customer ID as a path parameter.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/customers/{customerId}/accounts" method="get" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

### Retrieve an Individual Account

To retrieve information about an individual account, make a `GET` request to `/accounts/{accountId}`.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/accounts/{accountId}" method="get" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

### Deactivate an Account

To deactivate an account, use a `PATCH` request to `/accounts/{accountId}/deactivate`. This action will also deactivate all associated resources, such as cards.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/accounts/{accountId}/deactivate" method="patch" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

### Reactivate an Account

To reactivate a previously deactivated account, use a `PATCH` request to `/accounts/{accountId}/activate`.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/accounts/{accountId}/activate" method="patch" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

### Closing an Account

An account can be closed and subsequently removed from the programme using a `DELETE` request to `/account/{accountId}`. This will also deactivate all associated resources, including cards, and irreversibly deactivate the smart contract associated with it. All data will be preserved for audit and compliance purposes.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/accounts/{accountId}" method="delete" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}


---

# 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.offblocks.xyz/developer-guides/api-integration/api-reference/accounts.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.
