---
title: "Apply data merge"
method: POST
path: "/auth/merge"
tags: ["Auth"]
---

# Apply data merge

`POST /auth/merge`

This function is to solve the problem of multiple users with the same email address, should be called after user login and then check, and perform data merge.

## Request body

- HandlerRequestAuthDataMergeApply
  - `user_name` string, required

## Response `200`

OK

- HandlerResponseAuthDataMergeApply
  - `deleted_user_count` integer, required
  - `update_comments_count` integer, required
  - `update_notifies_count` integer, required
  - `update_votes_count` integer, required
  - `user_token` string, required — Empty if login user is target user no need to re-login

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

## Changes

- **2024-05-03** `f3ab55eb13e7` — 1 info
  - endpoint added
- **2023-01-28** `6a7a8a92e7c3` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/artalkjs/apis/artalk-api/changes/auth/merge/post.md)

---

[API](https://skmtc.dev/artalkjs/apis/artalk-api.md) · [All operations](https://skmtc.dev/artalkjs/apis/artalk-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/artalkjs/artalk-api/revisions/2f927b464019/schema)
