Modify a User Profile

Endpoint URL: {registrationDomain} /entity.update


Updates a user profile. Unlike the /entity.replace endpoint, /entity.update only modifies attributes specified in the API call: attributes not included in the API call will be ignored and will not be deleted. Plural values are appended, unless an ID is provided; in that case, the plural data is replaced.

Refer to the Registration Error Codes section for details on error codes.

This endpoint includes the following methods:

  • POST


POST

API Client Permissions

The following table indicates the API clients that can (and the API clients that can't) be used to call this endpoint:

owner
access_issuer
direct_access
direct_read_access
login_client
Yes
No
Yes
No
No


Authentication

This endpoint supports Basic authentication (recommended) as well as janrain-oauth and janrain-signed authentication.

How to Create an Authentication String

Base URL

The base URL for this endpoint is your Identity Cloud Capture domain; for example:

https://educationcenter.us- dev.janraincapture.com

Your Capture domains (also known as Registration domains) can be found in the Console on the Manage Application page:

Examples

Example: Update specific attributes for a user record

This command uses the uuid parameter to locate the user with the UUID 6bbe7e58-bede-41b8-940b-5614c7607a4e, then updates the givenName and familyName attributes for that user.


curl -X POST \
  -H "Authorization: Basic c2dueXZ1czZwYzRqbTdraHIybmVxNWdzODlnYnIyZXE6d3Q0YzN1bjl3a2tjZnZ5a25xeDQ0eW5jNDc2YWZzNjg=="\
  --data-urlencode type_name=user \
  --data-urlencode uuid=6bbe7e58-bede-41b8-940b-5614c7607a4e \
  --data-urlencode attributes='{"givenName":"Matt","familyName":"Parker"}' \
  https://my-app.janraincapture.com/entity.update
          

      Running this command in Postman


Example Response


{
  "stat":"ok"
}
          


Example: Update a plural entry for a user record

This command updates the statuses plural (plural ID 5253) for the user with the ID 5252. In this example, the status attribute is set to active.


curl -X POST \
    -H "Authorization: Basic aW1fYV...NfbXk=" \
    --data-urlencode type_name=user \
    --data-urlencode id=5252 \
    --data-urlencode attribute_name='/statuses#5253' \
    --data-urlencode value='{"status":"active"}' \
   https://my-app.janraincapture.com/entity.update
          

      Running this command in Postman


Example Response


{
  "stat": "ok"
}        
                                                    


Example: Update a user record by key_attribute and key_value

The following command uses the key_attribute and key_values parameters to locate the user profile for the user with the email address of gjack@test.com, then changes the displayName in that user profile to Gary Jackson.


curl -X POST \
    -H "Authorization: Basic dXQ0YmdycmE3dzI4MmpjZm15cGZxeDlwemhxaGpqMmI6dW5qemU5bndrZnV5NmpwdzgzOHFwYTdhZDNoZG55YTY="\
    --data-urlencode type_name=user \
    --data-urlencode key_attribute=email \
    --data-urlencode key_value='"gjack@test.com"'\
    --data-urlencode attribute_name='displayName' \
    --data-urlencode value='{"Gary Jackson"}'\
    https://my-app.janraincapture.com/entity.update
          

      Running this command in Postman


Example Response


{
  "stat": "ok"
}        
                                                    


Query Parameters

ParameterTypeRequiredDescription
uuidstringNoUUID for the user record. Required if you are not using the id or key_attribute parameter.
 
idstringNoID of the user record. Required if you are not using the uuid or key_attribute parameter.
 
key_attributestringNoName of a unique attribute used in the schema. Required if you are not using the id or uuid parameter.
 
key_valuestringNoValue for the key_attribute parameter.
 
type_namestringNoName of the entityType where the user record is stored.
 
valuestringYesJSON value to be assigned to the attribute_name parameter. This parameter can refer to a single value to add to the attribute_name (for example "Fred"), or contain JSON pairs of attributes and names to update (for example: {"Name":"Bob","Description":"Smith"}).
 
attribute_namestringNoDefines a subset of the user record to be updated. If an attribute path is supplied, entity_update will change only attributes from this point forward in the schema. The default is root, meaning the entire entity will be updated.

For backward compatibility, you can also refer to this parameter as the attributes parameter.
 
createdstringNoTimestamp generated when the entity was created. If this value is present but is incorrect, the call will fail.
 
lastUpdatedstringNoTimestamp generated when the entity was last updated. If this value is present but is incorrect, the call will fail.
 
include_recordstringNoWhen set to true, the newly-updated user record is returned as part of the API response. Note that, if the attribute_name is pointed to root, the entire record is returned. If it points to a subset of the record, only that data will be returned.