Skip to main content
POST
/
v1
/
accounts
/
{id}
/
close
JavaScript
import Augustus from '@augustusbank/typescript-sdk';

const client = new Augustus({
  apiKey: process.env['AUGUSTUS_API_KEY'], // This is the default and can be omitted
});

const response = await client.accounts.close('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
  reason: 'aml_risk_fraud',
});

console.log(response.id);
{
  "id": "<string>",
  "type": "account",
  "label": "<string>",
  "financial_addresses": [
    {
      "type": "iban",
      "iban": "<string>",
      "account_holder_name": "<string>",
      "bic": "<string>"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer token for authentication with Augustus Banking API

Headers

Idempotency-Key
string

Idempotency key for safe retries. Reusing a key with an identical request body returns the cached response. Reusing a key with a different body returns 409.

Path Parameters

id
string<uuid>
required

Unique identifier of the account.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$

Body

application/json

Close account parameters

reason
enum<string>
required

Reason for closing the account.

Available options:
aml_risk_fraud,
client_request

Response

200 - application/json

Account closed successfully

id
string
required

Unique identifier of the account.

type
enum<string>
required

Resource type discriminator.

Available options:
account
currency
enum<string>
required

ISO 4217 currency code for the account.

Available options:
EUR,
GBP,
USD,
USDC,
BTC
account_type
enum<string>
required

Type of the account.

Available options:
virtual_account,
payment_account
status
enum<string>
required

Current status of the account.

Available options:
pending,
active,
frozen,
closed
asset_type
enum<string>
required

Asset type of the account.

Available options:
fiat,
crypto
label
string
required

Human-readable label for the account.

financial_addresses
object[]
required

Payment identifiers (e.g. IBAN, account number, wallet address) through which this account can send or receive funds.

created_at
string<date-time>
required

ISO 8601 UTC timestamp when the account was created.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
updated_at
string<date-time>
required

ISO 8601 UTC timestamp when the account was last updated.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$