Replace part of an entity with a value. The entity.replace call can be destructive. Any object attributes that you do not specify are replaced with null values. Plural values are replaced, and all new elements are automatically assigned ids. For an additive operation, use entity.update.

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

This endpoint includes the following methods:

  • POST


Base URL

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


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

Example: Replace an entity by UUID

This example shows how to request the replacement of an entityType of 'user' by UUID with a new set of attributes.

curl -X POST \
    -H "Authorization: Basic aW1fYV...NfbXk="\
    --data-urlencode type_name=user \
    --data-urlencode uuid=0987098709870987 \
    --data-urlencode attributes='{"givenName":"Bob","familyName":"Smith"}'\

Running Code Samples Using Postman

The Janrain REST API code samples are written using Curl, but they can easily be run from within Postman. To use one of our code samples in Postman:

  1. Click the Copy to Clipboard button located directly beneath the code sample
  2. In Postman, click Import to display the Import dialog box.
  3. In the Import dialog box, click Paste Raw Text, and then paste in the copied code. The Import dialog box should look similar to this:

  4. Click Import, and the Curl command will be converted to a format that can be run from within Postman. All you need to do now is configure the command to work with your Janrain implementation.

Example Response

  "stat": "ok"

Example: Replace an entity by email

This example shows how to request the replacement of an entityType of 'user' by email with a new set of attributes.

curl -X POST \
    -H "Authorization: Basic aW1fYV...NfbXk="\
    --data-urlencode type_name=user \
    --data-urlencode key_attribute=email \
    --data-urlencode key_value='"parkerm@example.com"' \
    --data-urlencode attributes='{"givenName":"Mathew","familyName":"Parkerson",
    "email":"parkerm@example.com"}' \

Example Response

  "stat": "ok"

Authorized Clients

  • owner 
  • direct_access


  •  janrain-signed
  •  basic-auth
  •  janrain-oauth

Query Parameters

Parameter Type Required Description
id string ID of the user record. Required unless you are using the uuid or key_attribute parameter.
uuid string UUID of the user record. Required unless you are using the id or key_attribute parameter.
key_attribute string Name of a unique attribute in the schema. This parameter is required unless you are using the uuid or id parameter, and must be used in conjunction with the key_value parameter.
key_value string Value assigned to the key_attribute parameter.
type_name string Yes Name of the entity type.
value string Yes JSON-formatted value assigned to the attribute_name parameter. For backward compatibility, this attribute can also be referred to as the attributes parameter.
attribute_name string Yes Path of the attribute to be updated. This value path contains ids for each plural element. The default is the root path, which results in the entire record being updated.
created string Timestamp generated when the entity was created. If this parameter is present but te value is incorrect, the command will fail. 
lastUpdated string Timestamp generated when the entity was last updated. If this parameter is present but te value is incorrect, the command will fail. 
include_record string When 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.