> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trycurious.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# A user's history did not merge after identify

> Anonymous and account ids are still separate: the call was refused, the ids are swapped, the decision raced the link, or the environments differ.

You called `identify`, but a reward under the account id did not credit the decision made under the anonymous id, or the dashboard still shows two users.

## The call was refused

A publishable key cannot identify: the browser never holds the authority to merge identities. The response is a `403`. Call `identify` from your server with a secret key. See [Identify users](https://docs.trycurious.ai/guides/identify.md).

## The ids are swapped

`anonymous_id` is the id you decided with before the person was known; `user_id` is the account they turned out to be. Swapping them links the account into the anonymous id. Check the request against the decision's `user_id`.

## The decision raced the link

`identify` is an ordered mutation. A `decide` sent before the `identify` response arrived may have been selected against the unmerged profile, and in rare cases is answered `409` with `Identity changed during selection; retry the request`. Await `identify` before the next `decide` that should see the merged profile; the server SDK never queues it behind events.

## The link conflicts

A `409` with `Identity conflicts with an existing user` means the anonymous id is already linked to a different account. The usual cause is reusing an anonymous id after logout. Mint a fresh anonymous id on logout. See [The API returns 409 conflict](https://docs.trycurious.ai/troubleshooting/conflict-409.md).

## The environments differ

A decision under a test key and an `identify` under a live key concern different users: identity is scoped to the environment. Use the same environment end to end.

## What merging does and does not do

After a successful link, decisions and events on either id attribute to the same person, and the merged user carries the `identifiers` and `attributes` you sent. The link is durable and a repeat is a no-op. It does not rename anything in your own systems: keep sending the account's `user_id` from then on.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.