AddAttributesByEmail
Add custom attributes to contacts according to email address. Ensure that imported attributes have been created in SmartLink > All contacts > Attribute settings.
POST /api/v3/userinfo/add_attributes_by_email
Request parameters
For more information on the query parameters, see Query parameters.
Attribute | Data type | Remarks | Description |
---|---|---|---|
string | required | ||
modify_ts | bigint | required | Timestamp of last update (in milliseconds) |
attributes | object | required | Custom user attribute. Supports updating other contact attributes, such as gender and birthday. Used in user segmentation, for the creation of personalized campaigns:
|
update_strategy | int | optional | Controls whether the subscribe field is updated, see Update strategy for more details. |
Request sample
curl --request POST "https://openapi.smartlink.intlgame.com/api/v3/userinfo/add_attributes_by_email?gameid=${GAME_ID}&seq=${YOUR_RANDOM_STRING}&sig=${SIGNATURE}&ts=${TS}" \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "545058834@qq.com",
"modify_ts": 1691225447577,
"attributes": {
"nickname": "tang",
"level": "10",
"birthday": "1990-05-09 00:00:00+08:00",
"prop":["option1","option2"]
}
}'
Response parameters
Attribute | Data type | Description |
---|---|---|
code | int | Return code |
msg | string | Return message |
Response sample
{
"code": 0,
"msg": "Success",
"seq": "{YOUR_RANDOM_STRING}"
}