Skip to main content
POST/users/update_or_create/

Update or create user

You can create or update users based on the "custom_id" key value. If a user with the provided value exists, we will update his profile with provided data, otherwise, a new user will be created. You can also set up any custom attribute of your choice. Custom attributes have to be created in the User.com app before sending them within requests.

AttributesTypeRequiredDescription
custom_idstringnoThe unique identifier for the user which is provided by the client.
company_custom_idstringnoA unique identifier for the company which is provided by the client.
custom_attrstringnoAn example value of your custom attribute.
emailstringnoA user email address.
first_namestringnoA first name for a user (the maximum number of characters is 40).
last_namestringnoA last name for a user (the maximum number of characters is 40).
tagslist(strings)noA list of tag names.

Request​

curl -X POST -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2" -H "Content-Type: application/json" -d '{
"custom_id": "my_custom_id",
"first_name": "John",
"last_name": "Doe",
"tags": ["updated", "verified"]
}' "https://<your_app_subdomain>.user.com/api/public/users/update_or_create/"

Response​

{
"created": true,
"id": 5577
}