Reject External Account
The Reject External Account endpoint allows authorized users to disapprove or terminate the connection of an external bank account associated with a specific profile. Once the rejection is processed, the external account's status is updated and it is effectively removed from the user's profile. This operation is essential for maintaining control over which external accounts remain linked within the Netevia Banking platform.
Endpoint
POST /netevia/externalAccount/reject/{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 an external bank account linked to a profile needs to be rejected during or after the underwriting/verification process. This is typically called by partners managing account onboarding workflows where an external account fails verification or is no longer permitted. Only authorized users with the appropriate permissions may perform this action.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| profileId | integer (int32) | Yes | The unique identifier of the user profile whose external account is being rejected. |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| financialAccountId | string | No | The identifier of the specific financial account to reject. If omitted, the default linked external account for the profile is targeted. |
| reason | string | No | A textual reason explaining why the external account is being rejected. Useful for audit trails and user notifications. |
Response
200 OK
The response is one of two schemas depending on context. The base boarding response is returned in most cases; the open financial account response extends it with an additional financialAccountId field.
BoardingResponse
| Field | Type | Description |
|---|---|---|
| profileId | integer (int32) | The profile ID associated with this operation. |
| errors | string | null | Error message if the operation encountered issues; otherwise null. |
| success | boolean | Indicates whether the rejection was processed successfully. |
| changeLog | array | null | List of changelog entries describing changes made during this operation. |
ChangeLog entry
| Field | Type | Description |
|---|---|---|
| requestType | integer (int32) | Enum value representing the type of bank request performed. |
| changes | string | null | Description of the specific change recorded. |
OpenFinancialAccountResponse (extends BoardingResponse)
| Field | Type | Description |
|---|---|---|
| financialAccountId | string | null | The financial account ID associated with the rejection, when applicable. |
{
"profileId": 100234,
"errors": null,
"success": true,
"changeLog": [
{
"requestType": 5,
"changes": "External account status updated to rejected."
}
]
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields or validation error (e.g., invalid profileId format) |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to reject an external account for this profile |
| 404 | Profile or external account not found |
| 500 | Internal server error |
Common Mistakes
- Passing a
profileIdthat does not exist or belongs to a different partner context will result in a 404 error. - Omitting the
financialAccountIdwhen multiple external accounts exist for the profile may cause ambiguous results; always specify it when the profile has more than one linked external account. - Using an expired Bearer token (lifetime is 10 minutes) will return a 401 — refresh the token via
POST /api/auth/refreshbefore retrying. - Sending the request without the required permissions for the target profile will return a 403; confirm the authenticated user has the appropriate access level.
Related Endpoints
POST /netevia/externalAccount/approve/{profileId}— Approve an external bank account linked to a user profileGET /netevia/externalAccount/{profileId}— Retrieve external accounts associated with a user profilePOST /api/auth/v2— Obtain a Bearer authentication tokenPOST /api/auth/refresh— Refresh an existing Bearer token
Example
curl -X POST "https://api.banking.netevia.dev/netevia/externalAccount/reject/100234?financialAccountId=fa-abc123&reason=FailedVerification" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"