POST
/
generativeagent
/
v1
/
analyze
curl --request POST \
  --url https://api.sandbox.asapp.com/generativeagent/v1/analyze \
  --header 'Content-Type: application/json' \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>' \
  --data '{
  "conversationId": "01BX5ZZKBKACTAV9WEVGEMMVS0",
  "message": {
    "text": "Hello, I would like to upgrade my internet plan to GOLD.",
    "sender": {
      "role": "agent",
      "externalId": 123
    },
    "timestamp": "2021-11-23T12:13:14.555Z"
  },
  "taskName": "UpgradePlan",
  "inputVariables": {
    "context": "Customer called to upgrade their current plan to GOLD",
    "customer_info": {
      "current_plan": "SILVER",
      "customer_since": "2020-01-01"
    }
  },
  "channelType": "digital"
}'
{
  "conversationId": "01BX5ZZKBKACTAV9WEVGEMMVS0",
  "messageId": "01BX5ZZKBKACTAV9WEVGEMMVS1"
}

Authorizations

asapp-api-id
string
header
required
asapp-api-secret
string
header
required

Body

application/json

The parameters for triggering the analysis and response to a conversation

Response

200
application/json
Successfully triggered the bot to analyze and respond to a conversation

Conversation identifier and message identifier if passed in the request