Needs banking:admin. If your API client does not have the banking:admin scope, the API answers 403
and this method throws ScopeRequiredError; ask Astrada to enable it if you need this operation.
Needs the banking:admin scope. If your API client does not have it, the API answers 403 Forbidden; ask Astrada to enable it if you need this operation. Imports historical bank transactions for this account from the provider over a date range, then runs matching against the account's full current card set. Unlike the backfill object on PATCH /bank-accounts/{bankAccountId} (which imports history for cards being added in that same request), this endpoint recovers a date window without touching card links. Each imported bank transaction sends banktransaction.created and each new match transaction.match.created. Requires a backing connection. Starting a backfill while another sync already holds the account's connection returns 409 Conflict; retry shortly. For Mastercard accounts at US banks (provider: mastercard, countryCode: USA), loadHistoric: true additionally asks the provider to generate deep history (up to 2 years) for this account before the import runs. This is a billable provider operation and generation is asynchronous on the provider side: if the immediate import returns few rows, re-run the same window without the flag once generation completes (typically within minutes). Providers without a deep-history operation reject the flag with 400 Bad Request.
Backfill bank account history
OptionalinitOverrides: RequestInit | InitOverrideFunctionNeeds banking:admin. If your API client does not have the banking:admin scope, the API answers 403
and this method throws ScopeRequiredError; ask Astrada to enable it if you need this operation.
Needs the banking:admin scope. If your API client does not have it, the API answers 403 Forbidden; ask Astrada to enable it if you need this operation. Imports historical bank transactions for this account from the provider over a date range, then runs matching against the account's full current card set. Unlike the backfill object on PATCH /bank-accounts/{bankAccountId} (which imports history for cards being added in that same request), this endpoint recovers a date window without touching card links. Each imported bank transaction sends banktransaction.created and each new match transaction.match.created. Requires a backing connection. Starting a backfill while another sync already holds the account's connection returns 409 Conflict; retry shortly. For Mastercard accounts at US banks (provider: mastercard, countryCode: USA), loadHistoric: true additionally asks the provider to generate deep history (up to 2 years) for this account before the import runs. This is a billable provider operation and generation is asynchronous on the provider side: if the immediate import returns few rows, re-run the same window without the flag once generation completes (typically within minutes). Providers without a deep-history operation reject the flag with 400 Bad Request.
Backfill bank account history
OptionalinitOverrides: RequestInit | InitOverrideFunctionNeeds banking:admin. If your API client does not have the banking:admin scope, the API answers 403
and this method throws ScopeRequiredError; ask Astrada to enable it if you need this operation.
Needs the banking:admin scope. If your API client does not have it, the API answers 403 Forbidden; ask Astrada to enable it if you need this operation. Deletes a bank account and all associated bank transactions, transaction matches, and card links. Cards are not deleted. A bank-feed subscription created from this account is deactivated; a card enrolled by its number only loses its bank account. The account sends bankaccount.state_changed with reason deleted. Note: This action is irreversible. Deleting the last account of a bank connection also removes the connection at the bank.
Delete bank account
OptionalinitOverrides: RequestInit | InitOverrideFunctionNeeds banking:admin. If your API client does not have the banking:admin scope, the API answers 403
and this method throws ScopeRequiredError; ask Astrada to enable it if you need this operation.
Needs the banking:admin scope. If your API client does not have it, the API answers 403 Forbidden; ask Astrada to enable it if you need this operation. Deletes a bank account and all associated bank transactions, transaction matches, and card links. Cards are not deleted. A bank-feed subscription created from this account is deactivated; a card enrolled by its number only loses its bank account. The account sends bankaccount.state_changed with reason deleted. Note: This action is irreversible. Deleting the last account of a bank connection also removes the connection at the bank.
Delete bank account
OptionalinitOverrides: RequestInit | InitOverrideFunctionReturns detailed information about a specific bank account by its identifier. Retrieve bank account
OptionalinitOverrides: RequestInit | InitOverrideFunctionReturns detailed information about a specific bank account by its identifier. Retrieve bank account
OptionalinitOverrides: RequestInit | InitOverrideFunctionProtectedisCheck if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json
MIME (Multipurpose Internet Mail Extensions)
True if the given MIME is JSON, false otherwise.
Admin backfill/retry for immediate mask-linking: matches the subaccount's ENROLLED cards against its credit bank accounts by mask (an enrolled card's last 4 digits) and links each exact match. The same exactly-one-or-skip rules as completion-time linking apply: a mask matching multiple cards, or multiple accounts claiming a mask, links nothing (the scheduled mask sweep retries this every few hours). Idempotent: already-linked pairs are skipped. Intended for onboarding backfills (cards enrolled before the bank link) and recovery after a transient directory failure at completion. Emits no webhook; linked cardIds appear on subsequent bank-account reads. The body takes subaccountId only; any other field is a 400. The admin actions (minting cards for cardless accounts, the cardholder backfill) are on POST /bank-accounts/maintenance at banking:admin.
Link enrolled cards to bank accounts (admin backfill)
OptionalinitOverrides: RequestInit | InitOverrideFunctionAdmin backfill/retry for immediate mask-linking: matches the subaccount's ENROLLED cards against its credit bank accounts by mask (an enrolled card's last 4 digits) and links each exact match. The same exactly-one-or-skip rules as completion-time linking apply: a mask matching multiple cards, or multiple accounts claiming a mask, links nothing (the scheduled mask sweep retries this every few hours). Idempotent: already-linked pairs are skipped. Intended for onboarding backfills (cards enrolled before the bank link) and recovery after a transient directory failure at completion. Emits no webhook; linked cardIds appear on subsequent bank-account reads. The body takes subaccountId only; any other field is a 400. The admin actions (minting cards for cardless accounts, the cardholder backfill) are on POST /bank-accounts/maintenance at banking:admin.
Link enrolled cards to bank accounts (admin backfill)
OptionalinitOverrides: RequestInit | InitOverrideFunctionReturns a list of bank accounts under the account. Bank accounts are created automatically when a bank link enrollment is completed. By default, GET /bank-accounts returns bank accounts ordered by the latest createdAt. This endpoint supports cursor-based pagination.
List bank accounts
OptionalinitOverrides: RequestInit | InitOverrideFunctionReturns a list of bank accounts under the account. Bank accounts are created automatically when a bank link enrollment is completed. By default, GET /bank-accounts returns bank accounts ordered by the latest createdAt. This endpoint supports cursor-based pagination.
List bank accounts
OptionalinitOverrides: RequestInit | InitOverrideFunctionCreates a new hosted link URL for the user to re-authenticate an account in auth_required. Any other state answers 400. To ask the bank for new transactions, use POST /bank-accounts/{bankAccountId}/transactions/refresh.
Refresh bank account
OptionalinitOverrides: RequestInit | InitOverrideFunctionCreates a new hosted link URL for the user to re-authenticate an account in auth_required. Any other state answers 400. To ask the bank for new transactions, use POST /bank-accounts/{bankAccountId}/transactions/refresh.
Refresh bank account
OptionalinitOverrides: RequestInit | InitOverrideFunctionNeeds banking:admin. If your API client does not have the banking:admin scope, the API answers 403
and this method throws ScopeRequiredError; ask Astrada to enable it if you need this operation.
Needs the banking:admin scope. If your API client does not have it, the API answers 403 Forbidden; ask Astrada to enable it if you need this operation. Asks the data provider to check this account's institution now, instead of waiting for its own schedule (typically one to four checks a day). The call returns once the check has run, usually within seconds but occasionally 30 seconds or more. It imports nothing itself: anything the check finds arrives through the normal update path within moments. Billable per successful call. Use it at moments that matter, not on a timer. Returns 400 Bad Request when the account has no backing connection, or when its provider or institution doesn't support an on-demand refresh (e.g. some card issuers), and 502 Bad Gateway when the provider's check fails.
Refresh transactions
OptionalinitOverrides: RequestInit | InitOverrideFunctionNeeds banking:admin. If your API client does not have the banking:admin scope, the API answers 403
and this method throws ScopeRequiredError; ask Astrada to enable it if you need this operation.
Needs the banking:admin scope. If your API client does not have it, the API answers 403 Forbidden; ask Astrada to enable it if you need this operation. Asks the data provider to check this account's institution now, instead of waiting for its own schedule (typically one to four checks a day). The call returns once the check has run, usually within seconds but occasionally 30 seconds or more. It imports nothing itself: anything the check finds arrives through the normal update path within moments. Billable per successful call. Use it at moments that matter, not on a timer. Returns 400 Bad Request when the account has no backing connection, or when its provider or institution doesn't support an on-demand refresh (e.g. some card issuers), and 502 Bad Gateway when the provider's check fails.
Refresh transactions
OptionalinitOverrides: RequestInit | InitOverrideFunctionProtectedrequestSends the request. Network errors and timeouts (while waiting for the answer or reading its body), 408, 429 and 5xx are retried for idempotent methods (see ConfigurationParameters.maxRetries). A 401 is retried once with a new token. Any other status outside 200 to 299 throws a ResponseError subclass. The body is read here, whole.
OptionalinitOverrides: RequestInit | InitOverrideFunctionNeeds banking:admin. If your API client does not have the banking:admin scope, the API answers 403
and this method throws ScopeRequiredError; ask Astrada to enable it if you need this operation.
Needs the banking:admin scope. If your API client does not have it, the API answers 403 Forbidden; ask Astrada to enable it if you need this operation. Admin maintenance over one subaccount. It first runs the same mask pass as POST /bank-accounts/link-enrolled-cards, then each action the request asks for. The actions create cards on the cards platform or rewrite stored rows, so this route needs banking:admin, while the mask pass alone stays on link-enrolled-cards at banking:write. The caller's account comes from its token: it can run maintenance on any subaccount of its own account, and a subaccount of another account simply matches nothing (an empty result, not a 403). Three optional actions, each off by default: - mint: true runs the completion-time mint pass over the subaccount's credit bank accounts that a completed link left without a card (the same-last-4 American Express case), so each gains a bank-feed card. Idempotent: an account that already holds a minted card is skipped. - backfillJunctionLast4: true fills, for the subaccount's card links, the last 4 each link answers to where it is still unknown, from the cards directory. Idempotent. - createCardholderCards: true runs, now and for this subaccount only, what a scheduled job does every 30 minutes: it gives each cardholder behind a pooled American Express billing account (a supplementary card that is not its own Plaid account) a bank-feed card of their own, with the cardholder's name, so their transactions can be emitted on that card. It does nothing unless Astrada has switched the feature on for the subaccount; the switches are set by Astrada only, from inside the platform, and no request can set them. Idempotent: a cardholder who already has a card is never given another. The actions run in the order above, after the mask pass. If the cards directory cannot be read, the mask pass links nothing and still returns 201; each action then reads the directory again on its own and says so in its result (directoryUnavailable), or, for mint with accounts to screen, fails rather than mint unscreened. Any step that fails returns 400 and runs nothing after it (steps before it have done their work, and every step is idempotent, so the request can simply be repeated). Emits no webhook from banking; a card created here produces the cards platform's usual card-subscription events.
Bank account maintenance for a subaccount
OptionalinitOverrides: RequestInit | InitOverrideFunctionNeeds banking:admin. If your API client does not have the banking:admin scope, the API answers 403
and this method throws ScopeRequiredError; ask Astrada to enable it if you need this operation.
Needs the banking:admin scope. If your API client does not have it, the API answers 403 Forbidden; ask Astrada to enable it if you need this operation. Admin maintenance over one subaccount. It first runs the same mask pass as POST /bank-accounts/link-enrolled-cards, then each action the request asks for. The actions create cards on the cards platform or rewrite stored rows, so this route needs banking:admin, while the mask pass alone stays on link-enrolled-cards at banking:write. The caller's account comes from its token: it can run maintenance on any subaccount of its own account, and a subaccount of another account simply matches nothing (an empty result, not a 403). Three optional actions, each off by default: - mint: true runs the completion-time mint pass over the subaccount's credit bank accounts that a completed link left without a card (the same-last-4 American Express case), so each gains a bank-feed card. Idempotent: an account that already holds a minted card is skipped. - backfillJunctionLast4: true fills, for the subaccount's card links, the last 4 each link answers to where it is still unknown, from the cards directory. Idempotent. - createCardholderCards: true runs, now and for this subaccount only, what a scheduled job does every 30 minutes: it gives each cardholder behind a pooled American Express billing account (a supplementary card that is not its own Plaid account) a bank-feed card of their own, with the cardholder's name, so their transactions can be emitted on that card. It does nothing unless Astrada has switched the feature on for the subaccount; the switches are set by Astrada only, from inside the platform, and no request can set them. Idempotent: a cardholder who already has a card is never given another. The actions run in the order above, after the mask pass. If the cards directory cannot be read, the mask pass links nothing and still returns 201; each action then reads the directory again on its own and says so in its result (directoryUnavailable), or, for mint with accounts to screen, fails rather than mint unscreened. Any step that fails returns 400 and runs nothing after it (steps before it have done their work, and every step is idempotent, so the request can simply be repeated). Emits no webhook from banking; a card created here produces the cards platform's usual card-subscription events.
Bank account maintenance for a subaccount
OptionalinitOverrides: RequestInit | InitOverrideFunctionUpdates a bank account. Card links are detected automatically: a scheduled sweep re-checks each cardless credit account every few hours and links an enrolled card whose last 4 digits match the account's mask, without any API call. This endpoint is the manual override: use it to pre-link a card immediately, correct an assignment, or import history. Each card in cardIds must belong to the same subaccount as the bank account. A card can only be linked to one bank account at a time; attempting to link a card that is already associated with another bank account will return a 409 Conflict error. A card that cannot take a bank-account link is also rejected with 409 Conflict before any change is applied: one whose only enrollment is a bulk feed, or whose subscriptions are all in a dead, non-attachable state. The message names the card and says whether it is bulk-enrolled or has no live subscription. This body, like the "already linked" 409, has no code. If the cards directory cannot be consulted, this screen is skipped (fail-open) rather than blocking the update. cardIds is a full replacement. Send cardIds: [] to clear explicit links (the scheduled mask sweep can re-link a matching card on its next run). Cards Astrada created for the individual cardholders of a pooled American Express billing account are managed by the platform: a cardIds list without them does not remove them (they leave when the card is deactivated or the account is disconnected or deleted). An enrolled card that was linked for one such cardholder can be removed here, and stays removed: it is not linked again automatically. Optionally include a backfill object with startDate and/or endDate to trigger a backfill of historical bank transactions for the specified date range. An automatically detected link re-matches the account's already-synced unmatched transactions around the new card's activity on its own; IMPORTING bank history from before the link (pulling older transactions from the provider) still happens only through this endpoint's backfill. The current card set is always readable at GET /bank-accounts/{bankAccountId} (cardIds), and GET /bank-accounts?cardId= finds the account a card is linked to.
Update bank account
OptionalinitOverrides: RequestInit | InitOverrideFunctionUpdates a bank account. Card links are detected automatically: a scheduled sweep re-checks each cardless credit account every few hours and links an enrolled card whose last 4 digits match the account's mask, without any API call. This endpoint is the manual override: use it to pre-link a card immediately, correct an assignment, or import history. Each card in cardIds must belong to the same subaccount as the bank account. A card can only be linked to one bank account at a time; attempting to link a card that is already associated with another bank account will return a 409 Conflict error. A card that cannot take a bank-account link is also rejected with 409 Conflict before any change is applied: one whose only enrollment is a bulk feed, or whose subscriptions are all in a dead, non-attachable state. The message names the card and says whether it is bulk-enrolled or has no live subscription. This body, like the "already linked" 409, has no code. If the cards directory cannot be consulted, this screen is skipped (fail-open) rather than blocking the update. cardIds is a full replacement. Send cardIds: [] to clear explicit links (the scheduled mask sweep can re-link a matching card on its next run). Cards Astrada created for the individual cardholders of a pooled American Express billing account are managed by the platform: a cardIds list without them does not remove them (they leave when the card is deactivated or the account is disconnected or deleted). An enrolled card that was linked for one such cardholder can be removed here, and stays removed: it is not linked again automatically. Optionally include a backfill object with startDate and/or endDate to trigger a backfill of historical bank transactions for the specified date range. An automatically detected link re-matches the account's already-synced unmatched transactions around the new card's activity on its own; IMPORTING bank history from before the link (pulling older transactions from the provider) still happens only through this endpoint's backfill. The current card set is always readable at GET /bank-accounts/{bankAccountId} (cardIds), and GET /bank-accounts?cardId= finds the account a card is linked to.
Update bank account
OptionalinitOverrides: RequestInit | InitOverrideFunction
The middleware of this instance; protected so hand-written subclasses can pass it on.