POST
/
autocompose
/
v1
/
conversations
/
{conversationId}
/
suggestions
curl --request POST \
  --url https://api.sandbox.asapp.com/autocompose/v1/conversations/{conversationId}/suggestions \
  --header 'Content-Type: application/json' \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>' \
  --data '{
  "query": "Hello, how can",
  "message": {
    "text": "Hello, I would like to upgrade my internet plan to GOLD.",
    "sender": {
      "role": "customer",
      "externalId": "customer-x"
    },
    "timestamp": "2023-06-01T19:16:55.706Z"
  }
}'
{
  "id": "<string>",
  "message": {
    "id": "01BX5ZZKBKACTAV9WEVGEMMVS1"
  },
  "suggestions": [
    {
      "text": "Hello John, how can I help you?",
      "templateText": "Hello {NAME}, how can I help you?",
      "title": "Greeting"
    }
  ],
  "phraseCompletion": {
    "text": "Hello, how can I help you?"
  },
  "autopilotMessage": {
    "text": "Hello John, how can I help you?",
    "templateText": "Hello {NAME}, how can I help you?",
    "title": "Greeting",
    "delaySeconds": 5,
    "triggerAfterSeconds": 0
  }
}

Authorizations

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

Path Parameters

conversationId
string
required

The identifier for a conversation.

Body

application/json

The parameters for getting suggestions for the next agent message.

A suggestions request with an optional message to add to the conversation

Response

200
application/json

Successfully fetched suggestions for the conversation

Suggestions for next agent message