Creating User Connections
This endpoint creates a directional link between two Netevia users. Either user can be a sub-account, primary account, or consumer. Once established, the connection associates the initiating user (fromUserId) with the target user (toUserId), enabling shared account visibility or delegated access workflows supported by the platform.
Endpoint
POST /api/LinkedAccount/link
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 partner needs to associate two user profiles within the Netevia platform — for example, linking a sub-account user to a primary account holder, or connecting a consumer to a business user. This is typically called during onboarding flows where account relationships must be established programmatically. The link enables downstream operations that depend on user associations, such as delegated transfers or shared account access.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
fromUserId | integer (int32) | Yes | The ID of the user initiating the connection. Can be a sub-account, primary account, or consumer. |
toUserId | integer (int32) | Yes | The ID of the user to whom the connection will be made. Can be a sub-account, primary account, or consumer. |
{
"fromUserId": 100234,
"toUserId": 100567
}Response
200 OK
The response is one of two possible schemas depending on the operation context:
BoardingResponse
| Field | Type | Description |
|---|---|---|
profileId | integer (int32) | The profile ID associated with the operation result. |
errors | string | null | Error message string if the operation encountered issues; otherwise null. |
success | boolean | Indicates whether the connection was successfully created. |
changeLog | array | null | List of change log entries describing what was modified during the operation. |
changeLog item fields:
| Field | Type | Description |
|---|---|---|
requestType | integer (int32) | Numeric code representing the type of banking request performed. |
changes | string | null | Description of the specific change that was applied. |
OpenFinancialAccountResponse (extends BoardingResponse)
| Field | Type | Description |
|---|---|---|
profileId | integer (int32) | The profile ID associated with the operation result. |
errors | string | null | Error message string if applicable; otherwise null. |
success | boolean | Indicates whether the connection was successfully created. |
changeLog | array | null | List of change log entries. |
financialAccountId | string | null | The ID of the financial account opened or associated as part of this operation, if applicable. |
{
"profileId": 100234,
"errors": null,
"success": true,
"changeLog": [
{
"requestType": 3,
"changes": "User link established between profileId 100234 and profileId 100567"
}
]
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields (fromUserId or toUserId) or invalid user IDs provided |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to link the specified user accounts |
| 404 | One or both of the specified user IDs do not exist |
| 500 | Internal server error |
Common Mistakes
- Providing a
fromUserIdortoUserIdthat does not correspond to an existing Netevia user profile will result in a 400 or 404 error. - Submitting string values for
fromUserIdortoUserIdinstead of integers will cause a 400 validation error. - Using an expired or missing Bearer token will result in a 401 Unauthorized response.
- Attempting to link the same user to themselves (identical
fromUserIdandtoUserId) may result in a 400 BadRequest.
Related Endpoints
POST /api/auth/v2— Obtain a Bearer token for authenticationPOST /api/auth/refresh— Refresh an expiring Bearer tokenGET /api/LinkedAccount— Retrieve existing linked account connections for a user
Example
curl -X POST https://api.banking.netevia.dev/api/LinkedAccount/link \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fromUserId": 100234,
"toUserId": 100567
}'