X-Api-Key header.
Request
string
required
Your bot’s API key. You may alternatively supply this value in the
X-Api-Key request header instead of the body.string
required
The unique identifier of the target bot user to whom the attribute will be applied.
string
required
The name of the custom attribute you want to set (e.g.,
plan, city, account_tier).string
required
The value to assign to the attribute key (e.g.,
premium, New York, gold).string
An alternative user identifier. You may supply this instead of or in addition to
messenger_user_id when working with users identified by their Messenger session ID.Example Request
Response
A successful request returns a JSON object confirming that the attribute was stored against the user record. The response echoes back thekey and value that were applied, along with the affected user identifier.
