Using The New Public API
Capri now offers a public API for our V3 (beta) users to engage with agents they've built and trained with our platform to be used with any other public REST API!
Last updated
// https://api.capriai.us/v1/{endpoint}https://api.capriai.us/v1/conversation/query{
"finalResponse" : //Your agent's final conversational response,
"actions" : //array of actions your agent took during it's turn
[
{
"eventId" : //unique Id representing the action
"sender" : //who sent the message ('bot' or 'human'),
"kind" : // the kind of action (i.e., googleSheet, ghlCalendar, etc),
"accountId" : //id of which resource was used for this action,
"accountName" : //name of which resource was used for this action,
"deleted" : //boolean, represents if a user manually corrected the action from the emulator,
"action" : //the action type (i.e., 'read', 'write', tag', etc),
"eventData" : //event details (optional, only present if required such as calendar event dates and time ranges)
"reference" : //reference url for the resource that was used (optional),
"timestamp" : //time the action took place (epoch time in milliseconds)
},
{...}
]
}{
"message": string,
"error": 'Unauthorized'
"statusCode": 401
}{
"message": string,
"error": 'Bad Request'
"statusCode": 400
}https://api.capriai.us/v1/extension/leadconnector/conversations{
"conversations": [
{
"conversationId": "string",
"participants": [
{
"participantId": "string",
"name": "string",
"role": "string"
},
...
],
"messages": [
{
"messageId": "string",
"sender": "string",
"content": "string",
"timestamp": "epoch time in milliseconds"
},
...
]
},
...
],
"pagination": {
"currentPage": number,
"totalPages": number,
"pageSize": number,
"totalItems": number
}
}