Skip to main content
POST
/
account-closures
curl --request POST \
  --url https://{host}/account-closures \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-user-id: <x-user-id>' \
  --data '
{
  "bankAccountId": "64f0c51e7fb3fc001234abcd"
}
'
{
  "id": "64f0c51e7fb3fc001234a001",
  "userId": "64f0c51e7fb3fc001234a002",
  "bankAccountId": "64f0c51e7fb3fc001234abcd",
  "status": "Created",
  "createdAt": "2024-10-03T10:30:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-user-id
string
required

The external user identifier of the acting customer.

Pattern: ^[a-f0-9]{24}$
Example:

"64f0c51e7fb3fc001234a002"

Body

application/json
bankAccountId
string

MongoDB ObjectId of the bank account to receive withdrawn cash during disassociation. Required when the user has withdrawable cash in an active portfolio; optional otherwise.

Pattern: ^[a-f0-9]{24}$
Example:

"64f0c51e7fb3fc001234abcd"

Response

Account closure created

id
string
required

Unique identifier of the account closure (MongoDB ObjectId)

Pattern: ^[a-f0-9]{24}$
Example:

"64f0c51e7fb3fc001234a001"

userId
string
required

Identifier of the user who owns this account closure

Pattern: ^[a-f0-9]{24}$
Example:

"64f0c51e7fb3fc001234a002"

status
enum<string>
required

Current status of the account closure.

  • Created: Closure request has been submitted and is being processed.
  • Completed: Closure has been fully processed.
Available options:
Created,
Completed
createdAt
string<date-time>
required

Timestamp when the account closure was created

Example:

"2024-10-03T10:30:00Z"

bankAccountId
string

Identifier of the bank account to receive withdrawn cash, if provided at creation

Pattern: ^[a-f0-9]{24}$
Example:

"64f0c51e7fb3fc001234abcd"