Skip to main content
POST
/
v0
/
accounts
/
{id}
/
deactivate
Deactivate an account
curl --request POST \
  --url https://api.sandbox.lead.bank/v0/accounts/{id}/deactivate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "status_reason": "dormant"
}
'
{
  "id": "account_xyz123",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "application_id": "application_xyz123",
  "status": "active",
  "status_reason": "client_closed",
  "capabilities": [
    "deposit"
  ],
  "entities": {
    "account_holder_type": "consumer"
  },
  "details": {
    "product_name": "<string>",
    "closed_at": "2023-11-07T05:31:56Z",
    "credit": {
      "is_secured": true,
      "is_mla": true,
      "underwriting_grade": "<string>",
      "currency": "USD",
      "available_credit": 123,
      "limit": 123,
      "max_limit": 123,
      "scra": {
        "start_date": "2023-12-25",
        "end_date": "2023-12-25"
      },
      "report": {
        "score": 575,
        "pulled_at": "2023-11-07T05:31:56Z",
        "source": "equifax"
      }
    },
    "adverse_action_notice": {
      "delivered_at": "2023-11-07T05:31:56Z",
      "reason": "<string>",
      "delivery_method": "email"
    }
  },
  "metadata": {},
  "documents": [
    {
      "document_id": "document_2N5Hk8xYmQpL9rBvC3jD",
      "type": "aan",
      "displayed_at": "2023-11-07T05:31:56Z",
      "consented_at": "2023-11-07T05:31:56Z",
      "version": "v1"
    }
  ],
  "client_account_id": "<string>"
}

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string
required

Unique key to ensure idempotent requests

Maximum string length: 255

Path Parameters

id
string
required

Account ID The ID of the Account object.

Pattern: ^account_\w+$
Example:

"account_xyz123"

Body

application/json

Request body for deactivating an account

status_reason
enum<string>
required

Valid reasons for deactivating an account

Available options:
dormant,
frozen,
other

Response

Account deactivated successfully.

An account object

id
string

The ID of the Account object.

Pattern: ^account_\w+$
Example:

"account_xyz123"

created_at
string<date-time>

Creation timestamp

updated_at
string<date-time>

Last update timestamp

application_id
string

Unique identifier for the application. Prefixed with application_.

Pattern: ^application_\w+$
Example:

"application_xyz123"

status
enum<string>

Current state of the account

Available options:
active,
inactive,
closed
status_reason
enum<string>

Machine-readable reason for the current status

Available options:
client_closed,
entity_closed,
frozen,
dormant,
active,
paid_off,
charged_off,
canceled,
other
capabilities
enum<string>[]

List of items that inform Lead how the Account will be used

Capability that informs Lead how the Account will be used

Available options:
deposit,
credit_with_underwriting,
credit_without_underwriting
entities
object

Entity relationships associated with the account (response only)

details
object

Core details of the account

metadata
object

A set of key-value pairs that can be used to store additional information related to this object.

documents
object[]

Array of associated legal or informational documents

client_account_id
string

Client-provided identifier for the account. Only populated in GET /v0/accounts/{id} response.