Skip to main content
POST
Link two user accounts
Admin-only endpoint to link a secondary user account into a primary account. The userToLinkId account will be deleted after merging its linked accounts into the primary userId.

Request

Headers

Request Body

Request Body Schema

Response

200 OK - Successfully linked accounts

400 Bad Request

401 Unauthorized

404 Not Found

500 Internal Server Error

Example

Notes

  • This is an admin-only endpoint - requires administrative privileges
  • Both user IDs must be valid MongoDB ObjectIds
  • The secondary account (userToLinkId) will be permanently deleted
  • All linked accounts from the secondary user are merged into the primary
  • This action is irreversible - the secondary account cannot be restored
  • Use this to consolidate duplicate user accounts
  • The primary user retains their original ID and all merged linked accounts
  • Permissions and department assignments from the secondary account are lost

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
payload
object

Response

Successfully linked accounts

message
string
data
object