Update user
const url = 'https://api.foldspace.ai/v1/user/example';const options = { method: 'PUT', headers: { 'X-FOLDSPACE-API-KEY': '<X-FOLDSPACE-API-KEY>', 'Content-Type': 'application/json' }, body: '{"userType":"ANONYMOUS","identifyId":"bTMwUidOQiZhMazBDWGAAmuRnu9N2","email":"alice.johnson@foldspace.io","name":"Alice Johnson","role":"Admin","phone":"+1-202-555-0147","timezone":"America/New_York","leadDate":1734539909141,"signUpDate":1734539909141,"firstVisitDate":1734539909141,"lastSeenDate":1731863535216,"lastSubscriptionIdentifier":"3a7d6f3b-8f1e-46b5-8731-c3e981e9abf7","allSubscriptionIdentifiers":["example"],"location":{"country":"United States","region":"California","state":"CA","city":"San Francisco","postalCode":"94107","countryCode":"US"},"customAttributes":{"additionalProperty":{}},"products":[{"product":"X7B69NRTTBM7","environment":1}],"image":"https://lh3.googleusercontent.com/a/AcBcq...","pqlScore":75.5}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.foldspace.ai/v1/user/example \ --header 'Content-Type: application/json' \ --header 'X-FOLDSPACE-API-KEY: <X-FOLDSPACE-API-KEY>' \ --data '{ "userType": "ANONYMOUS", "identifyId": "bTMwUidOQiZhMazBDWGAAmuRnu9N2", "email": "alice.johnson@foldspace.io", "name": "Alice Johnson", "role": "Admin", "phone": "+1-202-555-0147", "timezone": "America/New_York", "leadDate": 1734539909141, "signUpDate": 1734539909141, "firstVisitDate": 1734539909141, "lastSeenDate": 1731863535216, "lastSubscriptionIdentifier": "3a7d6f3b-8f1e-46b5-8731-c3e981e9abf7", "allSubscriptionIdentifiers": [ "example" ], "location": { "country": "United States", "region": "California", "state": "CA", "city": "San Francisco", "postalCode": "94107", "countryCode": "US" }, "customAttributes": { "additionalProperty": {} }, "products": [ { "product": "X7B69NRTTBM7", "environment": 1 } ], "image": "https://lh3.googleusercontent.com/a/AcBcq...", "pqlScore": 75.5 }'Updates user information.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Unique identifier for the user
Request Body required
Section titled “Request Body required ”User DTO for update. Certain fields like identifyId are not updatable.
User Data Transfer Object
object
System-managed user ID (not updatable)
Specifies user type (ANONYMOUS, LEAD, USER)
Unique identifier for the user (not updatable)
Example
bTMwUidOQiZhMazBDWGAAmuRnu9N2User’s email address
Example
alice.johnson@foldspace.ioUser’s display name
Example
Alice JohnsonUser’s role
Example
AdminUser’s phone number
Example
+1-202-555-0147User’s time zone
Example
America/New_YorkLead date in epoch milliseconds
Example
1734539909141Sign-up date in epoch milliseconds
Example
1734539909141Last modified date (system-managed)
First visit date in epoch milliseconds
Example
1734539909141Last seen date in epoch milliseconds
Example
1731863535216Last subscription identifier
Example
3a7d6f3b-8f1e-46b5-8731-c3e981e9abf7All subscription identifiers associated with the user
User location details
object
Location country
Example
United StatesLocation region
Example
CaliforniaLocation state
Example
CALocation city
Example
San FranciscoPostal code
Example
94107ISO country code
Example
USCustom attributes as map of key-value pairs
object
Custom attributes as map of key-value pairs
object
Products associated with this user
Details about product and environment association
object
Product code
Example
X7B69NRTTBM7Environment code (1=prod, 2=stage, 3=test, 4=dev)
Example
1Number of visits (system-managed)
Profile image URL
Example
https://lh3.googleusercontent.com/a/AcBcq...PQL score in the range 0.0 - 100.0
Example
75.5Responses
Section titled “ Responses ”User updated successfully
Example
{ "message": "User updated successfully"}Bad Request
Unauthorized
User not found
Rate limit exceeded for subscription
Example
{ "error": "Rate limit exceeded for subscription"}Internal server error