Contentstack introduces the Agentic Experience Platform | Press release
Contentstack introduces the Agentic Experience Platform | Press release
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs
  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing
  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases
  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP
  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support
  • Overview
  • Find a partner
  • Login
  • About us
  • News
  • Customer support portal
  • Contact
  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.

AI Assistant

Ask a question below...

infoAI responses may contain mistakes.
/
  1. Home
  2. APIs
  3. Personalize Edge API
  4. User Attributes

User Attributes

markdownView as Markdown

User attributes are key-value pairs that represent the characteristics, behaviors, or preferences of visitors interacting with your website or application. These attributes can be used to create distinct audience segments for targeted content delivery and personalized user experiences.

Set and Update User Attributes

PATCHhttps://personalize-edge.contentstack.com/user-attributes

Set and Update User Attributes

The Set and Update User Attributes request lets you create and update custom attributes in a project.

Attributes created / updated with this API call needs to have a corresponding custom attribute created in the Attributes module with the same key.

The above request:

- Creates new attributes for the user if they do not already exist.

- Updates existing attributes with the provided values. In case of an attribute conflict (existing attribute has a value), and the new value takes precedence during the update.

- Only the specified key:value pairs for the attributes will be updated, and the non-specified values remain unchanged.

Sample Request
123
{
  "age": "10"
}
Sample Response
Status|204 No Content
1
User Attributes added successfully

Merge User Attributes

POSThttps://personalize-edge.contentstack.com/user-attributes/actions/merge

Merge User Attributes

The Merge User Attributes request lets you merge attributes using the source (anonymous user) and target (custom user) UIDs in a project.

You would want to use this API request, when an anonymous user logs in and converts into a known user of your digital property, and merge the attribute details of the anonymous user (source) into the known user (target).

Note: In case of conflict in attributes set against the source UID and target UID, the attribute value for the source UID is given precedence.

Sample Request
1234
{
  "sourceUserUid": "x-user-id",
  "targetUserUid": "y-user-id"
}
Sample Response
Status|204 No Content
1
User Attributes merged successfully
Hide Parameters

Headers

x-cs-personalize-user-uidoptionalstring

Enter the Personalize user UID

x-project-uidrequiredstring

Enter the Project UID

Hide Parameters

Headers

x-project-uidrequiredstring

Enter the Project UID