POST
/
autocompose
/
v1
/
spellcheck
/
correction
curl --request POST \
  --url https://api.sandbox.asapp.com/autocompose/v1/spellcheck/correction \
  --header 'Content-Type: application/json' \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>' \
  --data '{
  "text": "How is tihs ",
  "typingEvent": {
    "cursorStart": 11,
    "cursorEnd": 12
  },
  "userDictionary": [
    "Hellooo"
  ]
}'
{
  "id": "01BX5ZZKBKACTAV9WEVGEMMVS1",
  "misspelledText": "tihs",
  "correctedText": "this",
  "position": 7
}

Authorizations

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

Body

application/json
The parameters for getting a spelling correction as a message is being typed.
text
string
required

text being typed by the agent, already entered into the composer

typingEvent
object
required
userDictionary
string[]

Words that should not be corrected if they are present on the text

Response

200
application/json
Successfully checked for a spelling mistake.
id
string

ID for the spelling correction that was returned (to be used in analytics events)

Example:

"01BX5ZZKBKACTAV9WEVGEMMVS1"

misspelledText
string

misspelling that needs to be replaced with the corrected text

Example:

"tihs"

correctedText
string

correction for the misspelling

Example:

"this"

position
integer

position where the misspelling starts

Example:

7