Remove external account

Remove External Account

This endpoint removes a linked external bank account from a specified customer profile. Before processing the closure, the API validates that all prerequisites are met — such as no pending transactions and a zero account balance — to ensure a clean and complete removal. Upon successful validation, the external account is unlinked from the profile and any associated services are terminated.

Endpoint

POST /netevia/externalAccount/close/{profileId}

Authentication

Bearer token required. Obtain via:

POST https://api.banking.netevia.dev/api/auth/v2

Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.

When to use

Use this endpoint when a customer wishes to disconnect a previously linked external bank account (connected via Finicity or Plaid) from their profile. This is appropriate when a customer wants to remove an outdated or unneeded external account, or when closing their relationship with a particular external institution. Ensure all pending transactions have cleared and the account balance is zero before calling this endpoint to avoid validation errors.

Path Parameters

ParameterTypeRequiredDescription
profileIdinteger (int32)YesThe unique identifier of the customer profile whose external account is to be removed.

Query Parameters

ParameterTypeRequiredDescription
financialAccountIdstringNoThe identifier of the specific financial account to close. If omitted, the default linked external account for the profile is targeted.

Response

200 OK

The response may return one of two schemas depending on context:

boardingresponse (base response):

FieldTypeDescription
profileIdinteger (int32)The profile ID associated with the request.
errorsstring or nullError message if the operation encountered an issue; null on success.
successbooleanIndicates whether the external account was successfully removed.
changeLogarray or nullList of change log entries describing what was modified during the operation.

changeLog item fields:

FieldTypeDescription
requestTypeinteger (int32)Enum value indicating the type of banking request performed.
changesstring or nullDescription of the specific change recorded in this log entry.

openfinancialaccountresponse (extended response, includes all boardingresponse fields plus):

FieldTypeDescription
financialAccountIdstring or nullThe identifier of the financial account that was affected by this operation.
{
  "profileId": 100234,
  "errors": null,
  "success": true,
  "changeLog": [
    {
      "requestType": 5,
      "changes": "External account unlinked from profile."
    }
  ]
}

Error Codes

CodeWhen it happens
400Missing required fields, validation error, pending transactions exist, or account balance is not zero
401Token missing, expired, or invalid
403Insufficient permissions to remove external account for this profile
404Profile ID not found or no external account linked to the specified profile
500Internal server error

Common Mistakes

  • Calling this endpoint while the external account still has a non-zero balance or pending transactions; ensure the account is fully settled before requesting closure.
  • Omitting financialAccountId when a profile has multiple external accounts linked, which may result in an ambiguous or unexpected account being targeted.
  • Using an expired or invalid Bearer token; tokens expire after 10 minutes and must be refreshed via POST /api/auth/refresh before retrying.
  • Passing a profileId that belongs to a profile type that does not support external accounts, or using a profile ID from a different partner context.

Related Endpoints

  • POST /netevia/externalAccount/add/{profileId} — Link a new external bank account to a customer profile
  • GET /netevia/externalAccount/{profileId} — Retrieve linked external accounts for a customer profile
  • POST https://api.banking.netevia.dev/api/auth/v2 — Obtain a Bearer authentication token
  • POST /api/auth/refresh — Refresh an existing Bearer token

Example

curl -X POST "https://api.banking.netevia.dev/netevia/externalAccount/close/100234?financialAccountId=fa-XXXXXXXXXX" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"
Path Params
int32
required
Query Params
string
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json