Delete a User Profile

Endpoint URL: {registrationDomain} /entity.delete



Description

Deletes the specified user profile. Alternatively, you can use this endpoint to delete a child attribute of a plural attribute. In that case, only the child attribute is deleted; the rest of the user profile remains as-is.

Warning. Data removed with this API call is permanently deleted.

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


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: Delete a user record

This command deletes the user account where the uuid is equal to c1b6e517-9930-47dd-9fd5-d692053151ce. Note that deleting a user account is permanent: there is no way to restore a deleted account.


curl -X POST \
  -H "Authorization: Basic c2dueXZ1czZwYzRqbTdraHIybmVxNWdzODlnYnIyZXE6d3Q0YzN1bjl3a2tjZnZ5a25xeDQ0eW5jNDc2YWZzNjg" \
  --data-urlencode type_name=user \
  --data-urlencode uuid=c1b6e517-9930-47dd-9fd5-d692053151c \
  https://my-app.janraincapture.com/entity.delete
          

      Running this command in Postman


Example Response


{
  "stat": "ok"
}        
                                                    


Example Error Response


{
  "argument_name": "uuid",
  "request_id": "9mq5bv72q47ehg7g",
  "code": 200,
  "error_description": "uuid was not valid for the following reason: invalid uuid",
  "error": "invalid_argument",
  "stat": "error"
}
          


Example: Delete a plural within a user record

This command deletes a plural value from the user profile with the UUID 30dd1406-f59a-4145-a6de-b94b5e8cacf3. In this example, the value 30721 is removed from the plural janrain.properties.managedBy.

Important. Be careful when using a command similar to this one: if you do not get the attribute_name exactly right, the endpoint will ignore the plural and, instead, delete the entire user record.


curl -X POST \
  -H "Authorization: Basic c2dueXZ1czZwYzRqbTdraHIybmVxNWdzODlnYnIyZXE6d3Q0YzN1bjl3a2tjZnZ5a25xeDQ0eW5jNDc2YWZzNjg" \
  --data-urlencode type_name=user \
  --data-urlencode uuid=30dd1406-f59a-4145-a6de-b94b5e8cacf3 \
  --data-urlencode attribute_name="janrain.properties.managedBy#30721" \
  https://my-app.janraincapture.com/entity.delete
          

      Running this command in Postman


Example Response


{
  "stat": "ok"
}        
                                                    


Query Parameters

ParameterTypeRequiredDescription
attribute_namestringNoAttribute path to the plural element to be deleted. Specific instances within a plural are referenced by a combination of the attribute path, a hashtag (#), and the instance ID. For example, janrain.properties.managedBy#30721 points to plural instance 30721 in the plural attribute janrain.properties.managedBy.
 
createdstringNoTimestamp generated when the entity was created. This value may be used to help identify the entity in this parameter. If a value is present in this parameter but is incorrect, the call will fail.
 
idstringNoID of the entity to be deleted. This parameter is required when not using the uuid or key_attribute and key_value parameters. The primary key of the parent object.
 
key_attribute
NoAny unique attribute found in the schema. This parameter is required if you do not use the uuid or id parameters, and must be used in conjunction with the key_value parameter.
 
key_valuestringNoUnique value of the attribute specified by the key_attribute parameter. Note that all string values must be enclosed in quotes.
 
lastUpdatedstringNoTimestamp indicating when the user profile was last updated. This value may be used to help identify the entity in this parameter. If a value is present in this parameter but is incorrect, the call will fail.
 
type_namestringYesentityType where the user record is stored.
 
uuidstringNoUnique identifier for the entity. Must be used unless you are using the id or key_attribute parameters to identify the user record to be deleted.