Comment on page
Updating Identities
Mutations can be used to update the email identities in Nosto. An "identity" is the personal information associated with an email address.
The
upsertIdentity
mutation allows you to upsert the details of an identity. The given example updates the customer attributes for the email [email protected] and requests the details of all the attributes of the identity.If the identity for jo[email protected] does not exist, a new identity will be created.
Note: If a specified attribute already exists on that identity, it will be overwritten.
curl -0 -v -X POST https://api.nosto.com/v1/graphql \
-u ":<token>" \
-H 'Content-Type: application/graphql' \
-d @- << EOF
mutation {
upsertIdentity(identity: {
email: "[email protected]",
attributes: [
{name: "loyalty-tier", value: "Gold"},
{name: "shoe-size", value: "42"},
]
}) {
email,
attributes {
name,
value
}
}
}
EOF
The attributes associated with an identity can be used to segment users. This works similarly to how the attributes can be leveraged when importing them via a CSV.
There is currently no way to delete an identity.
Last modified 11mo ago