Bold360 ai widget protocol API

The Bold360 ai API is an XML over HTTP protocol, which communicates with the Bold360 ai services. All requests are sent to with a POST HTTP request method.

For each request, you need a session ID that you obtain with a Login request. When you have a session ID, you can use the API to search, open tickets, request Analytics and statistics information, and more.

This article walks you through how to send and receive the various types of API requests. For more information, visit the Bold360 ai Support Center on our website.

Note: All implementations of the Bold360 ai API require the placement of the Bold360 ai logo, or the text 'powered by Bold360 ai' in a clear location next to the user UI, unless specifically authorized in writing by LogMeIn.

Logging in - Creating a Session

The Login request provides you with a new unique session ID, which is required for sending queries to the system. Any attempt to use an invalid session ID results in a 400 BAD REQUEST response from the server, which is common with session expiration occurring after an idle timeout. Therefore, you should be prepared to handle these errors and send a new Login request before you send additional queries:

   <Login anonymous='true'>
<WidgetAPI version="1.22" account="account" enableStats="enableStats">

Bold360 ai Account name.
Accepts 'true' or 'false', enables analytics tracking for this session.
The URL of the page from which the API is used.

After sending a Login request, the service will reply with a Login response, which contains information about the generated session (if succeeded), or error information (if failed):

   <LoginResponse sessionId='sessionId' initCode='0' lang='en'
          timeout='sessionIdleTimeout'> message </LoginResponse>

When non-zero, login is successful. Otherwise, the message contains information regarding the failure.
Specifies the maximum time in seconds a session can be idle before it expires on the service. When a session expires you are required to send a new login request to obtain a new session ID.

Note: When you use an expired session ID, you get an error code 400 response, after which you can send a new login request.

If you receive error code 400 for the login request, then your login request was illegal. In this case, check your account name, and referring page configuration.

After successful login, you may use the provided sessionId to send queries to the service.

Query Request Structure

All Bold360 ai API requests share a common structure, containing an XML envelope, and a <Session> tag with common parameters:

<?xml version='1.0' encoding='UTF-8' ?>
                 <Session id='sessionId' userUniqueId='0' requestId=''requestId'/>

The session ID you received in the login response.

A unique ID (for this session only) used by the service, normally this ID starts with a fixed number (i.e 1, although it can start at any number) and is incremented for each subsequent request.

Request ID should never be repeated, and is used by the service to uniquely identify requests, in cases of network errors and re-transmissions.

Beside the <Session> tag, the XML envelope contains additional query syntax. For example, a valid search query request will look as follows:

Connection: keep-alive