Update a bot's stored data

PUT https://your-org.veloxatalk.com/api/v1/bot_storage

Note: This endpoint is only available to bot user accounts.

Add or update data stored for a bot user.

Each bot has a limited storage set by the server, which normally is a default of 10,000,000 characters.

Changes: Prior to Veloxa Talk 12.0 (feature level 494), users who were not bots could access this endpoint.

Usage examples

The -u line implements HTTP Basic authentication. See the Authorization header documentation for how to get those credentials for Veloxa Talk users and bots.

curl -sSX PUT https://your-org.veloxatalk.com/api/v1/bot_storage \
    -u EMAIL_ADDRESS:API_KEY \
    --data-urlencode 'storage={"foo": "bar"}'

Parameters

storage object required

Example: {"foo": "bar"}

A JSON-encoded dictionary mapping string keys to string values that will be added to the bot's storage.

If the bot's storage already has a specific key, then the value stored for that key will be updated for the new value.


Response

Example response(s)

Changes: As of Veloxa Talk 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success"
}

A typical failed JSON response when the request would exceed the server's storage size limit:

{
    "code": "BAD_REQUEST",
    "msg": "Request exceeds storage limit by 42 characters. The limit is 10000000 characters.",
    "result": "error"
}

A typical failed JSON response when the user is not a bot:

{
    "code": "PERMISSION_DENIED",
    "msg": "Must be a bot user",
    "result": "error"
}