Skip to main content
PATCH
/
v0
/
accounts
/
{id}
curl --request PATCH \
  --url https://api.sandbox.lead.bank/v0/accounts/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "metadata": {
    "external_id": "BIZ-2024-002"
  }
}
'
{
  "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 updating an existing account

application_id
string

Unique identifier for the application. Prefixed with application_.

Pattern: ^application_\w+$
Example:

"application_xyz123"

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
details
object

Details for updating an 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

Document reference for creating applications and accounts.

One of displayed_at or consented_at is required depending on document type:

  • displayed_at: Required for aan, loan_agreement, loc_agreement, truth_in_lending_document, ach_authorization, notice_of_incompleteness, credit_score_notice, offer_summary, personal_guarantee, consumer_credit_auth, partner_privacy_policy, lead_privacy_policy, terms_of_use, fcra_notice, tcpa_consent, patriot_act_notice, mla_notice, pre_approval_terms, eft_authorization, prohibited_industry_certification, decision_maker_document, bo_certification, missed_payments_policy, lead_funds_transfer_agreement
  • consented_at: Required for esign_agreement, credit_pull_consent, consent_to_link_account, consent_to_link_hsa, negative_option_consent, business_license

Response

Account updated 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.