Our API provides an endpoint that allows you to update user data in your Clice account. This lets you make any modifications you wish, including adding custom tags.


Request

1. Details

Endpoint URL https://api.clice.app/ext/public/user/update
Method POST
Header 0 "Content-type": "application/json"
Header 1 "apiKey": "YOUR_API_KEY"
Header 2 "appId": "YOUR_APP_ID"

2. Body

Field name Type Required Description
cuId string yes The ID of the user to update.
email string no The email to update if needed.
plan string no The plan to update if needed.
name string no The name to update if needed.
createdAt date no The registration date if needed.
pushTags string[] no An array where each element is a string corresponding to a tag to add to the user.
pullTags string[] no An array where each element is a string corresponding to a tag to remove from the user.

3. Request Example

fetch(`https://api.clice.app/ext/public/user/update`, {
    method: "POST",
    headers: {
        "Content-type": "application/json",
        "apiKey": "0fc11e67-f2ce-490d-9794-b4fe7232b67e",
        "appId": "1ce82385-59e6-4887-8b97-40d97ae5b020",
    },
    body: JSON.stringify({
        cuId: "6818b732dec2323cdbda2278",
        plan: "Premium",
        pullTags: ["churn"],
    }),
});

Note that in this example, I’m not adding any tags or modifying the email, name, or createdAt fields, so I don’t include them in the body. The previous values will be kept for all unspecified fields.


Response

1. Details

Field name Type
statusCode number
success boolean
message string

2. Response Examples

  1. Success
{
    statusCode: 200,
    success: true,
    message: "User updated successfully",
}