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!

To get started, sign up for a new account at https://beta.capriai.us and start a 2 week free trial! You'll need an account to get your Agent ID and Token. See the Quickstart Guides for information on setting up an agent (use the "Beta" section)!

Authorization

You'll need a Capri API Token to authorize your API Calls. Grab it here.

Base URL:

// https://api.capriai.us/v1/{endpoint}

Conversations

https://api.capriai.us/v1/conversation/query

Request:

Query your Capri Ai Agent

POST https://api.capriai.us/v1/conversation/query

Send a user query and receive the final response as well as all intermediate actions that your agent predicted during it's conversation turn.

Request Header

Request Body

Response Parameters:

{
  "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)
           },
           {...}
        ]
}

Last updated