You can update an existing metadata or add a new metadata to a user. Metadata stores additional user information such as phone number, email or a description of the user.
The following table lists the parameters that this action supports.
Parameters
Required | Type | Description |
---|---|---|
user_id | string | Specifies the unique ID of a user. |
Optional | Type | Description |
---|---|---|
key | string | Specifies the key of a metadata item. If not specified, all items of the metadata are updated. If specified, only the specified item is updated. Urlencoding a key is recommended. |
The following table lists the properties of an HTTP request that this action supports.
Properties
Required | Type | Description |
---|---|---|
metadata | nested object | Specifies a |
Optional | Type | Description |
---|---|---|
upsert | boolean | Determines whether to add new items in addition to updating existing items. If true, the new key-value items are added when the keys don't exist in the metadata property. The existing items are updated with new values when there are already items with the same keys. If false, only the item with a key that you specify is updated. (Default: false) |
If successful, this action returns the updated and added items in the metadata in the response body.
In the case of an error, an error object like below is returned. See the error codes section for more details.