Get User
const url = 'https://api.foldspace.ai/v1/user/example';const options = {method: 'GET', headers: {'X-FOLDSPACE-API-KEY': '<X-FOLDSPACE-API-KEY>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.foldspace.ai/v1/user/example \ --header 'X-FOLDSPACE-API-KEY: <X-FOLDSPACE-API-KEY>'Retrieves a single user by identifyId.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The unique identifier of the user to be retrieved
Responses
Section titled “ Responses ”User retrieved successfully
User Data Transfer Object
object
System-managed user ID (not updatable)
Specifies user type (ANONYMOUS, LEAD, USER)
Unique identifier for the user (not updatable)
User’s email address
User’s display name
User’s role
User’s phone number
User’s time zone
Lead date in epoch milliseconds
Sign-up date in epoch milliseconds
Last modified date (system-managed)
First visit date in epoch milliseconds
Last seen date in epoch milliseconds
Last subscription identifier
All subscription identifiers associated with the user
User location details
object
Location country
Location region
Location state
Location city
Postal code
ISO country code
Custom 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
Environment code (1=prod, 2=stage, 3=test, 4=dev)
Number of visits (system-managed)
Profile image URL
PQL score in the range 0.0 - 100.0
Examples
Example Response
{ "id": "f63d4158-0171-4f0d-bc62-29112c0fc82c", "userType": "USER", "identifyId": "bTMwUidOQiZhMazBDWGAAmuRnu9N2", "email": "alice.johnson@foldspace.io", "name": "Alice Johnson", "role": null, "phone": null, "timezone": null, "leadDate": null, "signUpDate": 1734539909141, "lastModifiedDate": 1731863535216, "firstVisitDate": 1734539909141, "lastSeenDate": 1731863535216, "lastSubscriptionIdentifier": "3a7d6f3b-8f1e-46b5-8731-c3e981e9abf7", "allSubscriptionIdentifiers": [ "3a7d6f3b-8f1e-46b5-8731-c3e981e9abf7", "562e6da7-13ad-4c16-adfc-572932ed3749" ], "location": null, "customAttributes": { "key1": "value1", "key2": 6 }, "products": [ { "product": "X7B69NRTTBM7", "environment": 1 } ], "numberOfVisits": 77, "image": "https://lh3.googleusercontent.com/a/AcBcqILXSthaPBfUYlnMPF9msfBbPUojM0_BYjtq0dG8vJshWF_wg=s96-c", "pqlScore": null}Unauthorized
Example
{ "error": "Unauthorized"}User not found
Example
{ "error": "User not found"}Rate limit exceeded for subscription
Example
{ "error": "Rate limit exceeded for subscription"}Internal server error
Example
{ "error": "Internal server error"}