Variables

The Variables endpoint can be used to retrieve all or a subset of a specific conversation variables.

Request

The following request can be used to retrieve a bot audiences:

curl --location --request GET 'https://publicapi.xenioo.com/peoples/conversations/variables/<ID>/<FIELDS>' \
--header 'Authorization: Bearer <BOT_AUTH_TOKEN>' \

The ID parameter can be either a conversation id or a user id while the FIELDS parameter can be either a wildcard (*) or a comma separated list of variable names.

To request all variables for a conversations with ID equal to 12345, the call would look like this:

curl --location --request GET 'https://publicapi.xenioo.com/peoples/conversations/variables/12345/*' \
--header 'Authorization: Bearer <BOT_AUTH_TOKEN>' \

To request instead just the user email, it would look like this:

curl --location --request GET 'https://publicapi.xenioo.com/peoples/conversations/variables/12345/user_email' \
--header 'Authorization: Bearer <BOT_AUTH_TOKEN>' \

Or, instead, to request user email and phone number, it would look like this:

curl --location --request GET 'https://publicapi.xenioo.com/peoples/conversations/variables/12345/user_email,user_phone_number' \
--header 'Authorization: Bearer <BOT_AUTH_TOKEN>' 

Response

If the call is successful, the complete list of selected variables will be returned.

{
    "first_name":"...",
    "last_contact_day":"...",
    [...]
}

Response Codes

This endpoint will reply with the following standard HTTP codes.

Code

Meaning

200

Ok. The request has been successfully fulfilled.

400

Bad Request. The call does not contain the data required to be fulfilled or you attempted to access the same conversation during the 15 minutes throttling.

401

Unauthorized. The account associated to the token is not authorized

Last updated

Was this helpful?