Interaction Copy API
Move a visitor's interaction history onto their account.
Call it when an anonymous visitor signs in or registers. Miso copies every interaction recorded against the from identity to the to identity, so their personalization survives the sign-in.
Send user_id or anonymous_id in each of from and to. The two must differ.
{
"from": { "anonymous_id": "visitor-8f3a1c" },
"to": { "user_id": "u-10293" }
}
Add dry_run=1 to validate the request without copying anything.
Body·
required
application/json
- Type: objectfromrequired
The identity to copy from. Send
user_idoranonymous_id. - Type: objecttorequired
The identity to copy to. It must differ from
from.
Responses
- application/json
- 401
The API key is missing or wrong.
- 404
The app has no interaction data.
- 422
The request did not pass validation.
Request Example for post/v1/interactions/_copy
curl 'https://api.askmiso.com/v1/interactions/_copy?api_key=YOUR_SECRET_TOKEN' \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"from": {
"anonymous_id": "visitor-8f3a1c"
},
"to": {
"user_id": "u-10293"
}
}'
{
"message": "success"
}