Adding your Clearing Partner
How to integrate Ask Clio to your clearing partner
Overview
Ask Clio allows you to connect your clearing provider so Ask Clio can access data and respond to client questions.
Alpaca is currently supported via the flow. We expect to be live with Apex, DriveWealth and RQD. Don't hesitate to reach out to support@askclio.ai with questions or requests for clearing coverage.
Connect Your Clearing Firm
In the Integrations tab - click “Connect Your Clearing Partner”

Choose your clearing partner from the list of options

Add you API credentials

Test your tools, and Activate them when you want to set them live!

You can either flag the tools to access your sandbox environment for testing, or connect to production when you’re ready to go live.
Pass Your Client Account Number
In order for the model to access your client account information, you need to provide their clearing account number.
After you add your clearing partner, a clearing ID will populate under the “Dynamic Inputs”

To set up Dynamic Inputs for your client clearing ID:
Once you’ve created a clearing integration, the clearing client ID will automatically populate within the Dynamic Inputs tab.

Create a Signing Identity: Your client ID will automatically populate, name the signing identity and click create.
You can use this Client Signing Identity for creating tokens on your backend side so users can start a new chat session with Ask Clio.
New clients will have a default signing identity.

Connect your backend
With having a Client ID and a API Secret key we now can start integrating your backend data
In order to create a token you need a client_id of the client identity and the client_secret of the client signing identity.
The request to create a token is:
POST https://app.askcli.ai/api/auth/v1/client-identities/tokens
An example of request is (with Alpaca integration installed):
Client_id: Use the client id used to create your API keys (found in Dashboard configuration)
Client secret: API Secret Key created in the previous step
User:
Id: This value is optional, but highly recommended. This can be any value you’d prefer to submit, as long as this value is unique. The id is then used to recover previous conversations for this user.
Email: The email that can be used when the user requests any support tickets. Even if you decide to use email address as unique user ID, this value will have to be passed through.
Tools_input:
This is the object used during the conversation with the user. This object is custom to your configuration. Depending on the integrations installed, dynamic fields will be exposed to be
alpaca_account_id is enabled when you have Alpaca installed, this gives us the ability to use this account id when the user requests any alpaca specific chat functions.
{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"user": {
"id": "42",
"email": "paul@askclio.ai"
},
"tools_input": {
"alpaca_account_id": "YOUR_ALPACA_ACCOUNT_ID"
}
}
The response would result in:
{
"token": "...",
"expires_at": "2026-01-04T11:36:18.010627Z"
}
This token is then used to open up a new session with the user. This session token will have to be passed to us through either our sdk modal or directly in the url via the `st` query parameter, e.g:
```
https://app.askclio.ai/?client_id=<ID>&st=<SESSION_TOKEN>
```
Note: Although not explicitly noted, we highly advise against integrating token retrieval on the frontend, this because the user would be exposed to potential malicious network attacks. This is why we recommend this functionality on your backend to pass this token from your backend to your frontend, which in turn passes this to our web integration.
Create a Test Session
Add a client clearing ID to test the endpoints within the configuration tab.

Last updated