Update User Attributes
Última actualización:2024-08-15

Update User Attributes

Supports batch updating of user attribute values via API. Developers can flexibly set user attributes according to business needs for better user profiling and recommendations.

Request Method

POST

Request URL

https://api.gptbots.ai/v1/property/update

Request Authentication

For details, refer to the authentication method description in the API overview.

Request

Request Example

curl -X POST "https://api.gptbots.ai/v1/property/update" \ -H "Content-Type: application/json" \ -d '{ "user_id": "example_user_id", "property_values": [ { "property_name": "example_property_name", "value": "example_value" } ] }'
          curl -X POST "https://api.gptbots.ai/v1/property/update" \
-H "Content-Type: application/json" \
-d '{
  "user_id": "example_user_id",
  "property_values": [
    {
      "property_name": "example_property_name",
      "value": "example_value"
    }
  ]
}'

        
Este bloque de código en la ventana flotante

Request Headers

Field Type Description
Authorization Bearer ${token} Use Authorization: Bearer ${token} to verify the call. Please obtain the key as a token from the API key page.
Content-Type application/json Data type, value is application/json.

Request Body

Parameter Type Description Required
user_id string User ID for which attributes need to be set true
property_values list List of attributes to be updated true
property_values.property_name string Attribute name true
property_values.value object Attribute value true

Response

Parameter Type Description
success_update list List of successfully updated user attributes
success_update.propertyName string Successfully updated attribute name
success_update.value object Successfully updated attribute value
fail_update list List of user attributes that failed to update
fail_update.value object Value of the failed update
fail_update.property_name string Name of the failed attribute