> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/api-reference/userpoint/userpoint-profile.md).

# Userpoint Profile

Operations related to **UserPoint Profiles**, the storage of timeless user information and attributes. Profiles are scoped to a **Compartment** (representing different account systems like websites or apps):

* **Profile types** - Identified (linked to user\_account\_id) or anonymous
* **Common attributes** - Demographics, contact details, preferences, loyalty status, newsletter subscriptions
* **Custom properties** - Any key-value pairs defined in schema
* **Update methods** - Bulk imports from CRM systems, real-time updates via $set\_user\_profile\_properties events

Profiles support partial updates (PARTIAL\_UPDATE) or full replacement (force\_replace).

Relevant documentation:

* [UserProfile](https://developer.mediarithmics.io/user-points/user-profiles)
* [Compartments](https://developer.mediarithmics.io/user-points/compartments)

## GET /datamarts/{datamart\_id}/user\_profiles/user\_account\_id={user\_account\_id}

> Find a user profile by a user account id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Mediarithmics most used API","description":"These operations where flagged by mediarithmics teams as most useful."},{"name":"Userpoint Profile","description":"Operations related to **UserPoint Profiles**, the storage of timeless user information and attributes. Profiles are scoped to a **Compartment** (representing different account systems like websites or apps):\n- **Profile types** - Identified (linked to user_account_id) or anonymous\n- **Common attributes** - Demographics, contact details, preferences, loyalty status, newsletter subscriptions\n- **Custom properties** - Any key-value pairs defined in schema\n- **Update methods** - Bulk imports from CRM systems, real-time updates via $set_user_profile_properties events\n\nProfiles support partial updates (PARTIAL_UPDATE) or full replacement (force_replace).\n\nRelevant documentation:\n- [UserProfile](https://developer.mediarithmics.io/user-points/user-profiles)\n- [Compartments](https://developer.mediarithmics.io/user-points/compartments)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/user_profiles/user_account_id={user_account_id}":{"get":{"summary":"Find a user profile by a user account id","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UserProfileResource1"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"parameters":[{"required":true,"explode":false,"style":"simple","schema":{"type":"integer","format":"int64"},"in":"path","name":"datamart_id"},{"in":"path","explode":false,"required":true,"schema":{"type":"string"},"name":"user_account_id","style":"simple"},{"schema":{"type":"integer","format":"int64"},"explode":true,"style":"form","name":"compartment_id","in":"query","required":false}],"description":"","tags":["Userpoint Profile","Mediarithmics most used API"],"operationId":"findUserProfileByUserAccountId"}}},"components":{"schemas":{"UserProfileResource1":{"type":"object","properties":{"first_name":{"type":"string","readOnly":false},"compartment_id":{"type":"string","readOnly":false},"last_name":{"type":"string","readOnly":false},"creation_date":{"$ref":"#/components/schemas/DateTime"},"is_client":{"type":"boolean","default":false,"readOnly":false},"email":{"type":"string","readOnly":false},"birth_date":{"$ref":"#/components/schemas/DateTime"},"user_account_id":{"type":"string","readOnly":false}}},"DateTime":{"type":"string","format":"date-time","description":"iso8601 date time"},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /datamarts/{datamart\_id}/user\_profiles/user\_account\_id={user\_account\_id}

> Update a user profile by a user account id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Mediarithmics most used API","description":"These operations where flagged by mediarithmics teams as most useful."},{"name":"Userpoint Profile","description":"Operations related to **UserPoint Profiles**, the storage of timeless user information and attributes. Profiles are scoped to a **Compartment** (representing different account systems like websites or apps):\n- **Profile types** - Identified (linked to user_account_id) or anonymous\n- **Common attributes** - Demographics, contact details, preferences, loyalty status, newsletter subscriptions\n- **Custom properties** - Any key-value pairs defined in schema\n- **Update methods** - Bulk imports from CRM systems, real-time updates via $set_user_profile_properties events\n\nProfiles support partial updates (PARTIAL_UPDATE) or full replacement (force_replace).\n\nRelevant documentation:\n- [UserProfile](https://developer.mediarithmics.io/user-points/user-profiles)\n- [Compartments](https://developer.mediarithmics.io/user-points/compartments)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/user_profiles/user_account_id={user_account_id}":{"put":{"tags":["Userpoint Profile","Mediarithmics most used API"],"requestBody":{"description":"The User Profile to Update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResource1"}}},"required":true},"description":"","summary":"Update a user profile by a user account id","parameters":[{"schema":{"type":"integer","format":"int64"},"in":"path","required":true,"name":"datamart_id","style":"simple","explode":false},{"name":"user_account_id","required":true,"schema":{"type":"string"},"in":"path","style":"simple","explode":false},{"in":"query","schema":{"type":"integer","format":"int64"},"explode":true,"style":"form","required":false,"name":"compartment_id"},{"schema":{"type":"boolean"},"required":false,"name":"force_replace","in":"query","style":"form","explode":true},{"name":"merge_objects","required":false,"schema":{"type":"boolean"},"explode":true,"style":"form","in":"query"},{"schema":{"$ref":"#/components/schemas/UpdateStrategy"},"description":"new update strategy (ignore merge_objects and force_replace)","name":"update_strategy","style":"form","explode":true,"in":"query","required":false}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UserProfileResource1"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"upsertUserProfileByUserAccountId"}}},"components":{"schemas":{"UserProfileResource1":{"type":"object","properties":{"first_name":{"type":"string","readOnly":false},"compartment_id":{"type":"string","readOnly":false},"last_name":{"type":"string","readOnly":false},"creation_date":{"$ref":"#/components/schemas/DateTime"},"is_client":{"type":"boolean","default":false,"readOnly":false},"email":{"type":"string","readOnly":false},"birth_date":{"$ref":"#/components/schemas/DateTime"},"user_account_id":{"type":"string","readOnly":false}}},"DateTime":{"type":"string","format":"date-time","description":"iso8601 date time"},"UpdateStrategy":{"type":"string","enum":["FORCE_REPLACE","PARTIAL_UPDATE","PARTIAL_DELETE"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datamarts/{datamart\_id}/user\_profiles/{user\_point\_identifier}

> Find a user profile by a user identifier

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Mediarithmics most used API","description":"These operations where flagged by mediarithmics teams as most useful."},{"name":"Userpoint Profile","description":"Operations related to **UserPoint Profiles**, the storage of timeless user information and attributes. Profiles are scoped to a **Compartment** (representing different account systems like websites or apps):\n- **Profile types** - Identified (linked to user_account_id) or anonymous\n- **Common attributes** - Demographics, contact details, preferences, loyalty status, newsletter subscriptions\n- **Custom properties** - Any key-value pairs defined in schema\n- **Update methods** - Bulk imports from CRM systems, real-time updates via $set_user_profile_properties events\n\nProfiles support partial updates (PARTIAL_UPDATE) or full replacement (force_replace).\n\nRelevant documentation:\n- [UserProfile](https://developer.mediarithmics.io/user-points/user-profiles)\n- [Compartments](https://developer.mediarithmics.io/user-points/compartments)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/user_profiles/{user_point_identifier}":{"get":{"parameters":[{"in":"path","style":"simple","explode":false,"schema":{"type":"integer","format":"int64"},"required":true,"name":"datamart_id"},{"explode":false,"schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"},"required":true,"name":"user_point_identifier","style":"simple","in":"path"},{"in":"query","explode":true,"style":"form","name":"compartment_id","schema":{"type":"integer","format":"int64"},"required":false},{"schema":{"type":"boolean","default":false},"required":false,"explode":true,"style":"form","in":"query","name":"anonymousProfile"}],"description":"","tags":["Userpoint Profile","Mediarithmics most used API"],"operationId":"findUserProfileByUserIdentifier","summary":"Find a user profile by a user identifier","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UserProfileResource1"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"PublicUserIdentifiers":{"type":"string","description":"User identifier in one of the following format : - a UUID (a.k.a userpoint id) - user_point_id=xxx where xxx is a UUID - compartment_id=xxx,user_account_id=yyy - user_agent_id=xxx - email_hash=xxx ","pattern":"^([0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|user_point_id=[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|compartment_id=\\d+,user_account_id=\\S+|user_account_id=\\S+(,compartment_id=\\d+)?|user_agent_id=\\S+|email_hash=\\S+)$"},"UserProfileResource1":{"type":"object","properties":{"first_name":{"type":"string","readOnly":false},"compartment_id":{"type":"string","readOnly":false},"last_name":{"type":"string","readOnly":false},"creation_date":{"$ref":"#/components/schemas/DateTime"},"is_client":{"type":"boolean","default":false,"readOnly":false},"email":{"type":"string","readOnly":false},"birth_date":{"$ref":"#/components/schemas/DateTime"},"user_account_id":{"type":"string","readOnly":false}}},"DateTime":{"type":"string","format":"date-time","description":"iso8601 date time"},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /datamarts/{datamart\_id}/user\_profiles/{user\_point\_identifier}

> Update a user profile by a user identifier

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Mediarithmics most used API","description":"These operations where flagged by mediarithmics teams as most useful."},{"name":"Userpoint Profile","description":"Operations related to **UserPoint Profiles**, the storage of timeless user information and attributes. Profiles are scoped to a **Compartment** (representing different account systems like websites or apps):\n- **Profile types** - Identified (linked to user_account_id) or anonymous\n- **Common attributes** - Demographics, contact details, preferences, loyalty status, newsletter subscriptions\n- **Custom properties** - Any key-value pairs defined in schema\n- **Update methods** - Bulk imports from CRM systems, real-time updates via $set_user_profile_properties events\n\nProfiles support partial updates (PARTIAL_UPDATE) or full replacement (force_replace).\n\nRelevant documentation:\n- [UserProfile](https://developer.mediarithmics.io/user-points/user-profiles)\n- [Compartments](https://developer.mediarithmics.io/user-points/compartments)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/user_profiles/{user_point_identifier}":{"put":{"tags":["Userpoint Profile","Mediarithmics most used API"],"description":"","operationId":"upsertUserProfileByUserIdentifier","requestBody":{"description":"The User Profile to Update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResource1"}}},"required":true},"summary":"Update a user profile by a user identifier","parameters":[{"name":"datamart_id","required":true,"in":"path","schema":{"type":"integer","format":"int64"},"explode":false,"style":"simple"},{"name":"user_point_identifier","schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"},"in":"path","explode":false,"style":"simple","required":true},{"in":"query","name":"compartment_id","required":false,"style":"form","schema":{"type":"integer","format":"int64"},"explode":true},{"in":"query","required":false,"schema":{"type":"boolean"},"explode":true,"style":"form","name":"force_replace"},{"name":"merge_objects","explode":true,"style":"form","required":false,"in":"query","schema":{"type":"boolean"}},{"schema":{"$ref":"#/components/schemas/UpdateStrategy"},"in":"query","description":"new update strategy (ignore merge_objects and force_replace)","explode":true,"name":"update_strategy","style":"form","required":false}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UserProfileResource1"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"UserProfileResource1":{"type":"object","properties":{"first_name":{"type":"string","readOnly":false},"compartment_id":{"type":"string","readOnly":false},"last_name":{"type":"string","readOnly":false},"creation_date":{"$ref":"#/components/schemas/DateTime"},"is_client":{"type":"boolean","default":false,"readOnly":false},"email":{"type":"string","readOnly":false},"birth_date":{"$ref":"#/components/schemas/DateTime"},"user_account_id":{"type":"string","readOnly":false}}},"DateTime":{"type":"string","format":"date-time","description":"iso8601 date time"},"PublicUserIdentifiers":{"type":"string","description":"User identifier in one of the following format : - a UUID (a.k.a userpoint id) - user_point_id=xxx where xxx is a UUID - compartment_id=xxx,user_account_id=yyy - user_agent_id=xxx - email_hash=xxx ","pattern":"^([0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|user_point_id=[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|compartment_id=\\d+,user_account_id=\\S+|user_account_id=\\S+(,compartment_id=\\d+)?|user_agent_id=\\S+|email_hash=\\S+)$"},"UpdateStrategy":{"type":"string","enum":["FORCE_REPLACE","PARTIAL_UPDATE","PARTIAL_DELETE"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/api-reference/userpoint/userpoint-profile.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
