POST
/
autocompose
/
v1
/
conversations
/
{conversationId}
/
message-analytic-events
curl --request POST \
  --url https://api.sandbox.asapp.com/autocompose/v1/conversations/{conversationId}/message-analytic-events \
  --header 'Content-Type: application/json' \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>' \
  --data '{
  "type": "suggestion-1-inserted",
  "suggestionsId": "4d2fd982640c311394008259594399a1"
}'

Authorizations

asapp-api-id
string
headerrequired
asapp-api-secret
string
headerrequired

Path Parameters

conversationId
string
required

The identifier for a conversation.

Body

application/json

Analytics event reporting actions the agent performed while composing a message.

type
enum<string>
required

The type of message analytic event.

Available options:
suggestion-1-inserted,
suggestion-2-inserted,
suggestion-3-inserted,
phrase-completion-accepted,
spellcheck-applied,
spellcheck-undone,
custom-response-drawer-inserted,
custom-panel-inserted,
global-panel-inserted
suggestionsId
string
required

For suggestion-1-inserted, suggestion-2-inserted, suggestion-3-inserted, phrase-completion-accepted, this is the id from the Suggestions API response that the agent interacted with. This allows ASAPP to connect the event with additional information (e.g., the text of the suggestion that was inserted).

For spellcheck-undone, custom-response-drawer-inserted, custom-panel-inserted, and global-panel-inserted, this is the id of the most recent Suggestions API response in this conversation.

In all of these cases, providing the Suggestions id allows ASAPP to associate the event with the message the agent is composing. During the normal flow of using the AutoCompose API, the Suggestions API will always have been called at least once since the previous agent message by the time a message analytic event occurs, and each time the Suggestions API is called, ASAPP records the ID of the previous agent message. Thus, the Suggestions id in the analytic event links back to the previous agent message. This permits the analytic event to later be linked to the new message the agent is composing, even though the event occurs before the message is sent.

spellcheckApplied
object | null

The details about the spellcheck applied analytic event

spellcheckUndone
object | null

The details about the spellcheck undone analytic event

customResponseDrawerInserted
object | null

The details about the custom response drawer inserted analytic event

customPanelInserted
object | null

The details about the custom panel inserted analytic event

globalPanelInserted
object | null

The details about the global panel inserted analytic event